topfans/backend/pkg/proto/event/event.pb.go

237 lines
7.4 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v7.34.0
// source: event.proto
package event
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 单条事件
type Event struct {
state protoimpl.MessageState `protogen:"open.v1"`
EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` // 事件 IDUUID客户端生成用于去重
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户 ID
StarId int64 `protobuf:"varint,3,opt,name=star_id,json=starId,proto3" json:"star_id,omitempty"` // 顶粉星城 ID
EventType string `protobuf:"bytes,4,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` // 事件类型(如 "asset.like", "exhibition.start"
OccurredAt int64 `protobuf:"varint,5,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"` // 事件发生时间ms timestamp
ReceivedAt int64 `protobuf:"varint,6,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"` // 服务端接收时间ms服务端填充
Properties map[string]string `protobuf:"bytes,7,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 自定义属性(扁平 key-value
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Event) Reset() {
*x = Event{}
mi := &file_event_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
mi := &file_event_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
return file_event_proto_rawDescGZIP(), []int{0}
}
func (x *Event) GetEventId() string {
if x != nil {
return x.EventId
}
return ""
}
func (x *Event) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *Event) GetStarId() int64 {
if x != nil {
return x.StarId
}
return 0
}
func (x *Event) GetEventType() string {
if x != nil {
return x.EventType
}
return ""
}
func (x *Event) GetOccurredAt() int64 {
if x != nil {
return x.OccurredAt
}
return 0
}
func (x *Event) GetReceivedAt() int64 {
if x != nil {
return x.ReceivedAt
}
return 0
}
func (x *Event) GetProperties() map[string]string {
if x != nil {
return x.Properties
}
return nil
}
// 批量事件请求
type BatchEventRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BatchEventRequest) Reset() {
*x = BatchEventRequest{}
mi := &file_event_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BatchEventRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchEventRequest) ProtoMessage() {}
func (x *BatchEventRequest) ProtoReflect() protoreflect.Message {
mi := &file_event_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchEventRequest.ProtoReflect.Descriptor instead.
func (*BatchEventRequest) Descriptor() ([]byte, []int) {
return file_event_proto_rawDescGZIP(), []int{1}
}
func (x *BatchEventRequest) GetEvents() []*Event {
if x != nil {
return x.Events
}
return nil
}
var File_event_proto protoreflect.FileDescriptor
const file_event_proto_rawDesc = "" +
"\n" +
"\vevent.proto\x12\rtopfans.event\"\xba\x02\n" +
"\x05Event\x12\x19\n" +
"\bevent_id\x18\x01 \x01(\tR\aeventId\x12\x17\n" +
"\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x17\n" +
"\astar_id\x18\x03 \x01(\x03R\x06starId\x12\x1d\n" +
"\n" +
"event_type\x18\x04 \x01(\tR\teventType\x12\x1f\n" +
"\voccurred_at\x18\x05 \x01(\x03R\n" +
"occurredAt\x12\x1f\n" +
"\vreceived_at\x18\x06 \x01(\x03R\n" +
"receivedAt\x12D\n" +
"\n" +
"properties\x18\a \x03(\v2$.topfans.event.Event.PropertiesEntryR\n" +
"properties\x1a=\n" +
"\x0fPropertiesEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"A\n" +
"\x11BatchEventRequest\x12,\n" +
"\x06events\x18\x01 \x03(\v2\x14.topfans.event.EventR\x06eventsB2Z0github.com/topfans/backend/pkg/proto/event;eventb\x06proto3"
var (
file_event_proto_rawDescOnce sync.Once
file_event_proto_rawDescData []byte
)
func file_event_proto_rawDescGZIP() []byte {
file_event_proto_rawDescOnce.Do(func() {
file_event_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_event_proto_rawDesc), len(file_event_proto_rawDesc)))
})
return file_event_proto_rawDescData
}
var file_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_event_proto_goTypes = []any{
(*Event)(nil), // 0: topfans.event.Event
(*BatchEventRequest)(nil), // 1: topfans.event.BatchEventRequest
nil, // 2: topfans.event.Event.PropertiesEntry
}
var file_event_proto_depIdxs = []int32{
2, // 0: topfans.event.Event.properties:type_name -> topfans.event.Event.PropertiesEntry
0, // 1: topfans.event.BatchEventRequest.events:type_name -> topfans.event.Event
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_event_proto_init() }
func file_event_proto_init() {
if File_event_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_event_proto_rawDesc), len(file_event_proto_rawDesc)),
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_event_proto_goTypes,
DependencyIndexes: file_event_proto_depIdxs,
MessageInfos: file_event_proto_msgTypes,
}.Build()
File_event_proto = out.File
file_event_proto_goTypes = nil
file_event_proto_depIdxs = nil
}