proto

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventService_SendMessage_FullMethodName = "/usercanal.events.EventService/SendMessage"
	EventService_SendBatch_FullMethodName   = "/usercanal.events.EventService/SendBatch"
)

Variables

View Source
var (
	Event_Type_name = map[int32]string{
		0: "UNKNOWN",
		1: "TRACK",
		2: "IDENTIFY",
		3: "ALIAS",
		4: "GROUP",
	}
	Event_Type_value = map[string]int32{
		"UNKNOWN":  0,
		"TRACK":    1,
		"IDENTIFY": 2,
		"ALIAS":    3,
		"GROUP":    4,
	}
)

Enum value maps for Event_Type.

View Source
var EventService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "usercanal.events.EventService",
	HandlerType: (*EventServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendMessage",
			Handler:    _EventService_SendMessage_Handler,
		},
		{
			MethodName: "SendBatch",
			Handler:    _EventService_SendBatch_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "events.proto",
}

EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_events_proto protoreflect.FileDescriptor

Functions

func RegisterEventServiceServer

func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)

Types

type AliasEvent

type AliasEvent struct {
	Base       *MessageBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	PreviousId string       `protobuf:"bytes,2,opt,name=previous_id,json=previousId,proto3" json:"previous_id,omitempty"` // Previous identifier to connect
	// contains filtered or unexported fields
}

Alias event for connecting different user identifiers

func (*AliasEvent) Descriptor deprecated

func (*AliasEvent) Descriptor() ([]byte, []int)

Deprecated: Use AliasEvent.ProtoReflect.Descriptor instead.

func (*AliasEvent) GetBase

func (x *AliasEvent) GetBase() *MessageBase

func (*AliasEvent) GetPreviousId

func (x *AliasEvent) GetPreviousId() string

func (*AliasEvent) ProtoMessage

func (*AliasEvent) ProtoMessage()

func (*AliasEvent) ProtoReflect

func (x *AliasEvent) ProtoReflect() protoreflect.Message

func (*AliasEvent) Reset

func (x *AliasEvent) Reset()

func (*AliasEvent) String

func (x *AliasEvent) String() string

type Array

type Array struct {
	Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

Array type for handling lists of values

func (*Array) Descriptor deprecated

func (*Array) Descriptor() ([]byte, []int)

Deprecated: Use Array.ProtoReflect.Descriptor instead.

func (*Array) GetValues

func (x *Array) GetValues() []*Value

func (*Array) ProtoMessage

func (*Array) ProtoMessage()

func (*Array) ProtoReflect

func (x *Array) ProtoReflect() protoreflect.Message

func (*Array) Reset

func (x *Array) Reset()

func (*Array) String

func (x *Array) String() string

type BatchRequest

type BatchRequest struct {
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchRequest) Descriptor deprecated

func (*BatchRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchRequest.ProtoReflect.Descriptor instead.

func (*BatchRequest) GetEvents

func (x *BatchRequest) GetEvents() []*Event

func (*BatchRequest) ProtoMessage

func (*BatchRequest) ProtoMessage()

func (*BatchRequest) ProtoReflect

func (x *BatchRequest) ProtoReflect() protoreflect.Message

func (*BatchRequest) Reset

func (x *BatchRequest) Reset()

func (*BatchRequest) String

func (x *BatchRequest) String() string

type BatchResponse

type BatchResponse struct {
	Responses []*EventResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchResponse) Descriptor deprecated

func (*BatchResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchResponse.ProtoReflect.Descriptor instead.

func (*BatchResponse) GetResponses

func (x *BatchResponse) GetResponses() []*EventResponse

func (*BatchResponse) ProtoMessage

func (*BatchResponse) ProtoMessage()

func (*BatchResponse) ProtoReflect

func (x *BatchResponse) ProtoReflect() protoreflect.Message

func (*BatchResponse) Reset

func (x *BatchResponse) Reset()

func (*BatchResponse) String

func (x *BatchResponse) String() string

type Event

type Event struct {
	Type Event_Type `protobuf:"varint,1,opt,name=type,proto3,enum=usercanal.events.Event_Type" json:"type,omitempty"`
	// Types that are valid to be assigned to Event:
	//
	//	*Event_Track
	//	*Event_Identify
	//	*Event_Alias
	//	*Event_Group
	Event isEvent_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

Combined event message with type discriminator

func (*Event) Descriptor deprecated

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAlias

func (x *Event) GetAlias() *AliasEvent

func (*Event) GetEvent

func (x *Event) GetEvent() isEvent_Event

func (*Event) GetGroup

func (x *Event) GetGroup() *GroupEvent

func (*Event) GetIdentify

func (x *Event) GetIdentify() *IdentifyEvent

func (*Event) GetTrack

func (x *Event) GetTrack() *TrackEvent

func (*Event) GetType

func (x *Event) GetType() Event_Type

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventResponse

type EventResponse struct {
	MessageId       string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	ServerTimestamp int64  `protobuf:"varint,2,opt,name=server_timestamp,json=serverTimestamp,proto3" json:"server_timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*EventResponse) Descriptor deprecated

func (*EventResponse) Descriptor() ([]byte, []int)

Deprecated: Use EventResponse.ProtoReflect.Descriptor instead.

func (*EventResponse) GetMessageId

func (x *EventResponse) GetMessageId() string

func (*EventResponse) GetServerTimestamp

func (x *EventResponse) GetServerTimestamp() int64

func (*EventResponse) ProtoMessage

func (*EventResponse) ProtoMessage()

func (*EventResponse) ProtoReflect

func (x *EventResponse) ProtoReflect() protoreflect.Message

func (*EventResponse) Reset

func (x *EventResponse) Reset()

func (*EventResponse) String

func (x *EventResponse) String() string

type EventServiceClient

type EventServiceClient interface {
	SendMessage(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventResponse, error)
	SendBatch(ctx context.Context, in *BatchRequest, opts ...grpc.CallOption) (*BatchResponse, error)
}

EventServiceClient is the client API for EventService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type EventServiceServer

type EventServiceServer interface {
	SendMessage(context.Context, *Event) (*EventResponse, error)
	SendBatch(context.Context, *BatchRequest) (*BatchResponse, error)
	// contains filtered or unexported methods
}

EventServiceServer is the server API for EventService service. All implementations must embed UnimplementedEventServiceServer for forward compatibility.

type Event_Alias

type Event_Alias struct {
	Alias *AliasEvent `protobuf:"bytes,4,opt,name=alias,proto3,oneof"`
}

type Event_Group

type Event_Group struct {
	Group *GroupEvent `protobuf:"bytes,5,opt,name=group,proto3,oneof"`
}

type Event_Identify

type Event_Identify struct {
	Identify *IdentifyEvent `protobuf:"bytes,3,opt,name=identify,proto3,oneof"`
}

type Event_Track

type Event_Track struct {
	Track *TrackEvent `protobuf:"bytes,2,opt,name=track,proto3,oneof"`
}

type Event_Type

type Event_Type int32
const (
	Event_UNKNOWN  Event_Type = 0
	Event_TRACK    Event_Type = 1
	Event_IDENTIFY Event_Type = 2
	Event_ALIAS    Event_Type = 3
	Event_GROUP    Event_Type = 4
)

func (Event_Type) Descriptor

func (Event_Type) Descriptor() protoreflect.EnumDescriptor

func (Event_Type) Enum

func (x Event_Type) Enum() *Event_Type

func (Event_Type) EnumDescriptor deprecated

func (Event_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Event_Type.Descriptor instead.

func (Event_Type) Number

func (x Event_Type) Number() protoreflect.EnumNumber

func (Event_Type) String

func (x Event_Type) String() string

func (Event_Type) Type

type GroupEvent

type GroupEvent struct {
	Base      *MessageBase      `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	GroupId   string            `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`       // Group/Organization ID
	GroupType string            `protobuf:"bytes,3,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"` // e.g., "organization", "team", "account"
	Traits    map[string]*Value ``                                                                                         // Group properties/traits
	/* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

Group event for managing group memberships and properties

func (*GroupEvent) Descriptor deprecated

func (*GroupEvent) Descriptor() ([]byte, []int)

Deprecated: Use GroupEvent.ProtoReflect.Descriptor instead.

func (*GroupEvent) GetBase

func (x *GroupEvent) GetBase() *MessageBase

func (*GroupEvent) GetGroupId

func (x *GroupEvent) GetGroupId() string

func (*GroupEvent) GetGroupType

func (x *GroupEvent) GetGroupType() string

func (*GroupEvent) GetTraits

func (x *GroupEvent) GetTraits() map[string]*Value

func (*GroupEvent) ProtoMessage

func (*GroupEvent) ProtoMessage()

func (*GroupEvent) ProtoReflect

func (x *GroupEvent) ProtoReflect() protoreflect.Message

func (*GroupEvent) Reset

func (x *GroupEvent) Reset()

func (*GroupEvent) String

func (x *GroupEvent) String() string

type IdentifyEvent

type IdentifyEvent struct {
	Base   *MessageBase      `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	Traits map[string]*Value `` // User-level traits
	/* 139-byte string literal not displayed */
	Context map[string]*Value `` // Session/device context
	/* 141-byte string literal not displayed */
	IsContextUpdate bool `protobuf:"varint,4,opt,name=is_context_update,json=isContextUpdate,proto3" json:"is_context_update,omitempty"` // Indicates this identify updates context
	// contains filtered or unexported fields
}

Identify event for updating user traits and/or context

func (*IdentifyEvent) Descriptor deprecated

func (*IdentifyEvent) Descriptor() ([]byte, []int)

Deprecated: Use IdentifyEvent.ProtoReflect.Descriptor instead.

func (*IdentifyEvent) GetBase

func (x *IdentifyEvent) GetBase() *MessageBase

func (*IdentifyEvent) GetContext

func (x *IdentifyEvent) GetContext() map[string]*Value

func (*IdentifyEvent) GetIsContextUpdate

func (x *IdentifyEvent) GetIsContextUpdate() bool

func (*IdentifyEvent) GetTraits

func (x *IdentifyEvent) GetTraits() map[string]*Value

func (*IdentifyEvent) ProtoMessage

func (*IdentifyEvent) ProtoMessage()

func (*IdentifyEvent) ProtoReflect

func (x *IdentifyEvent) ProtoReflect() protoreflect.Message

func (*IdentifyEvent) Reset

func (x *IdentifyEvent) Reset()

func (*IdentifyEvent) String

func (x *IdentifyEvent) String() string

type MessageBase

type MessageBase struct {
	DistinctId string                 `protobuf:"bytes,1,opt,name=distinct_id,json=distinctId,proto3" json:"distinct_id,omitempty"` // Required - consistent client/session identifier
	UserId     string                 `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`             // Optional - set when user is identified
	ContextId  string                 `protobuf:"bytes,3,opt,name=context_id,json=contextId,proto3" json:"context_id,omitempty"`    // Links to current session context
	Timestamp  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	MessageId  string                 `protobuf:"bytes,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // Unique per-event message identifier
	// contains filtered or unexported fields
}

Common fields that all events share

func (*MessageBase) Descriptor deprecated

func (*MessageBase) Descriptor() ([]byte, []int)

Deprecated: Use MessageBase.ProtoReflect.Descriptor instead.

func (*MessageBase) GetContextId

func (x *MessageBase) GetContextId() string

func (*MessageBase) GetDistinctId

func (x *MessageBase) GetDistinctId() string

func (*MessageBase) GetMessageId

func (x *MessageBase) GetMessageId() string

func (*MessageBase) GetTimestamp

func (x *MessageBase) GetTimestamp() *timestamppb.Timestamp

func (*MessageBase) GetUserId

func (x *MessageBase) GetUserId() string

func (*MessageBase) ProtoMessage

func (*MessageBase) ProtoMessage()

func (*MessageBase) ProtoReflect

func (x *MessageBase) ProtoReflect() protoreflect.Message

func (*MessageBase) Reset

func (x *MessageBase) Reset()

func (*MessageBase) String

func (x *MessageBase) String() string

type Object

type Object struct {
	Fields map[string]*Value `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

Object type for handling nested structures

func (*Object) Descriptor deprecated

func (*Object) Descriptor() ([]byte, []int)

Deprecated: Use Object.ProtoReflect.Descriptor instead.

func (*Object) GetFields

func (x *Object) GetFields() map[string]*Value

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) ProtoReflect

func (x *Object) ProtoReflect() protoreflect.Message

func (*Object) Reset

func (x *Object) Reset()

func (*Object) String

func (x *Object) String() string

type TrackEvent

type TrackEvent struct {
	Base       *MessageBase      `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	EventName  string            `protobuf:"bytes,2,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"`
	Properties map[string]*Value `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

Track event for capturing user actions

func (*TrackEvent) Descriptor deprecated

func (*TrackEvent) Descriptor() ([]byte, []int)

Deprecated: Use TrackEvent.ProtoReflect.Descriptor instead.

func (*TrackEvent) GetBase

func (x *TrackEvent) GetBase() *MessageBase

func (*TrackEvent) GetEventName

func (x *TrackEvent) GetEventName() string

func (*TrackEvent) GetProperties

func (x *TrackEvent) GetProperties() map[string]*Value

func (*TrackEvent) ProtoMessage

func (*TrackEvent) ProtoMessage()

func (*TrackEvent) ProtoReflect

func (x *TrackEvent) ProtoReflect() protoreflect.Message

func (*TrackEvent) Reset

func (x *TrackEvent) Reset()

func (*TrackEvent) String

func (x *TrackEvent) String() string

type UnimplementedEventServiceServer

type UnimplementedEventServiceServer struct{}

UnimplementedEventServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedEventServiceServer) SendBatch

func (UnimplementedEventServiceServer) SendMessage

type UnsafeEventServiceServer

type UnsafeEventServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventServiceServer will result in compilation errors.

type Value

type Value struct {

	// Types that are valid to be assigned to Value:
	//
	//	*Value_StringValue
	//	*Value_IntValue
	//	*Value_DoubleValue
	//	*Value_BoolValue
	//	*Value_ArrayValue
	//	*Value_ObjectValue
	//	*Value_BytesValue
	Value isValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

Value represents different types that can be stored in properties/traits

func (*Value) Descriptor deprecated

func (*Value) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetArrayValue

func (x *Value) GetArrayValue() *Array

func (*Value) GetBoolValue

func (x *Value) GetBoolValue() bool

func (*Value) GetBytesValue

func (x *Value) GetBytesValue() []byte

func (*Value) GetDoubleValue

func (x *Value) GetDoubleValue() float64

func (*Value) GetIntValue

func (x *Value) GetIntValue() int64

func (*Value) GetObjectValue

func (x *Value) GetObjectValue() *Object

func (*Value) GetStringValue

func (x *Value) GetStringValue() string

func (*Value) GetValue

func (x *Value) GetValue() isValue_Value

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

type Value_ArrayValue

type Value_ArrayValue struct {
	ArrayValue *Array `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof"`
}

type Value_BoolValue

type Value_BoolValue struct {
	BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type Value_BytesValue

type Value_BytesValue struct {
	BytesValue []byte `protobuf:"bytes,7,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}

type Value_DoubleValue

type Value_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type Value_IntValue

type Value_IntValue struct {
	IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"`
}

type Value_ObjectValue

type Value_ObjectValue struct {
	ObjectValue *Object `protobuf:"bytes,6,opt,name=object_value,json=objectValue,proto3,oneof"`
}

type Value_StringValue

type Value_StringValue struct {
	StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL