Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultDeleteEvent(ctx context.Context, in *Event, db *gorm.DB) error
- func DefaultDeleteEventSet(ctx context.Context, in []*Event, db *gorm.DB) error
- func RegisterEventerServer(s grpc.ServiceRegistrar, srv EventerServer)
- type EmitRequest
- func (*EmitRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EmitRequest) GetEvent() *pb.CloudEvent
- func (*EmitRequest) ProtoMessage()
- func (x *EmitRequest) ProtoReflect() protoreflect.Message
- func (x *EmitRequest) Reset()
- func (x *EmitRequest) String() string
- func (m *EmitRequest) Validate() error
- func (m *EmitRequest) ValidateAll() error
- type EmitRequestMultiError
- type EmitRequestValidationError
- func (e EmitRequestValidationError) Cause() error
- func (e EmitRequestValidationError) Error() string
- func (e EmitRequestValidationError) ErrorName() string
- func (e EmitRequestValidationError) Field() string
- func (e EmitRequestValidationError) Key() bool
- func (e EmitRequestValidationError) Reason() string
- type EmitResponse
- func (*EmitResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EmitResponse) GetId() string
- func (*EmitResponse) ProtoMessage()
- func (x *EmitResponse) ProtoReflect() protoreflect.Message
- func (x *EmitResponse) Reset()
- func (x *EmitResponse) String() string
- func (m *EmitResponse) Validate() error
- func (m *EmitResponse) ValidateAll() error
- type EmitResponseMultiError
- type EmitResponseValidationError
- func (e EmitResponseValidationError) Cause() error
- func (e EmitResponseValidationError) Error() string
- func (e EmitResponseValidationError) ErrorName() string
- func (e EmitResponseValidationError) Field() string
- func (e EmitResponseValidationError) Key() bool
- func (e EmitResponseValidationError) Reason() string
- type Event
- func DefaultApplyFieldMaskEvent(ctx context.Context, patchee *Event, patcher *Event, ...) (*Event, error)
- func DefaultCreateEvent(ctx context.Context, in *Event, db *gorm.DB) (*Event, error)
- func DefaultListEvent(ctx context.Context, db *gorm.DB) ([]*Event, error)
- func DefaultPatchEvent(ctx context.Context, in *Event, updateMask *field_mask.FieldMask, db *gorm.DB) (*Event, error)
- func DefaultPatchSetEvent(ctx context.Context, objects []*Event, updateMasks []*field_mask.FieldMask, ...) ([]*Event, error)
- func DefaultReadEvent(ctx context.Context, in *Event, db *gorm.DB) (*Event, error)
- func DefaultStrictUpdateEvent(ctx context.Context, in *Event, db *gorm.DB) (*Event, error)
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetEventData() string
- func (x *Event) GetEventSource() string
- func (x *Event) GetEventType() string
- func (x *Event) GetId() string
- func (x *Event) GetPublishedTime() *timestamppb.Timestamp
- func (x *Event) GetReceivedTime() *timestamppb.Timestamp
- func (x *Event) GetTransactionId() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- func (m *Event) ToORM(ctx context.Context) (EventORM, error)
- func (m *Event) Validate() error
- func (m *Event) ValidateAll() error
- type EventMultiError
- type EventORM
- type EventORMWithAfterCreate_
- type EventORMWithAfterDeleteSet
- type EventORMWithAfterDelete_
- type EventORMWithAfterListFind
- type EventORMWithAfterReadFind
- type EventORMWithAfterStrictUpdateSave
- type EventORMWithBeforeCreate_
- type EventORMWithBeforeDeleteSet
- type EventORMWithBeforeDelete_
- type EventORMWithBeforeListApplyQuery
- type EventORMWithBeforeListFind
- type EventORMWithBeforeReadApplyQuery
- type EventORMWithBeforeReadFind
- type EventORMWithBeforeStrictUpdateCleanup
- type EventORMWithBeforeStrictUpdateSave
- type EventValidationError
- type EventWithAfterPatchSave
- type EventWithAfterToORM
- type EventWithAfterToPB
- type EventWithBeforePatchApplyFieldMask
- type EventWithBeforePatchRead
- type EventWithBeforePatchSave
- type EventWithBeforeToORM
- type EventWithBeforeToPB
- type EventerClient
- type EventerServer
- type SaveFailed
- func (*SaveFailed) Descriptor() ([]byte, []int)deprecated
- func (x *SaveFailed) GetError() string
- func (x *SaveFailed) GetEvent() *pb.CloudEvent
- func (x *SaveFailed) GetPublishedTime() *timestamppb.Timestamp
- func (x *SaveFailed) GetReceivedTime() *timestamppb.Timestamp
- func (*SaveFailed) ProtoMessage()
- func (x *SaveFailed) ProtoReflect() protoreflect.Message
- func (x *SaveFailed) Reset()
- func (x *SaveFailed) String() string
- func (m *SaveFailed) Validate() error
- func (m *SaveFailed) ValidateAll() error
- type SaveFailedMultiError
- type SaveFailedValidationError
- type UnimplementedEventerServer
- type UnsafeEventerServer
Constants ¶
const (
Eventer_Emit_FullMethodName = "/core.eventer.v1.Eventer/Emit"
)
Variables ¶
var Eventer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "core.eventer.v1.Eventer", HandlerType: (*EventerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Emit", Handler: _Eventer_Emit_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "core/eventer/v1/services.proto", }
Eventer_ServiceDesc is the grpc.ServiceDesc for Eventer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_core_eventer_v1_events_proto protoreflect.FileDescriptor
var File_core_eventer_v1_models_proto protoreflect.FileDescriptor
var File_core_eventer_v1_services_proto protoreflect.FileDescriptor
Functions ¶
func DefaultDeleteEvent ¶
func DefaultDeleteEventSet ¶
func RegisterEventerServer ¶
func RegisterEventerServer(s grpc.ServiceRegistrar, srv EventerServer)
Types ¶
type EmitRequest ¶
type EmitRequest struct { Event *pb.CloudEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // contains filtered or unexported fields }
func (*EmitRequest) Descriptor
deprecated
func (*EmitRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmitRequest.ProtoReflect.Descriptor instead.
func (*EmitRequest) GetEvent ¶
func (x *EmitRequest) GetEvent() *pb.CloudEvent
func (*EmitRequest) ProtoMessage ¶
func (*EmitRequest) ProtoMessage()
func (*EmitRequest) ProtoReflect ¶
func (x *EmitRequest) ProtoReflect() protoreflect.Message
func (*EmitRequest) Reset ¶
func (x *EmitRequest) Reset()
func (*EmitRequest) String ¶
func (x *EmitRequest) String() string
func (*EmitRequest) Validate ¶
func (m *EmitRequest) Validate() error
Validate checks the field values on EmitRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*EmitRequest) ValidateAll ¶
func (m *EmitRequest) ValidateAll() error
ValidateAll checks the field values on EmitRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EmitRequestMultiError, or nil if none found.
type EmitRequestMultiError ¶
type EmitRequestMultiError []error
EmitRequestMultiError is an error wrapping multiple validation errors returned by EmitRequest.ValidateAll() if the designated constraints aren't met.
func (EmitRequestMultiError) AllErrors ¶
func (m EmitRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EmitRequestMultiError) Error ¶
func (m EmitRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EmitRequestValidationError ¶
type EmitRequestValidationError struct {
// contains filtered or unexported fields
}
EmitRequestValidationError is the validation error returned by EmitRequest.Validate if the designated constraints aren't met.
func (EmitRequestValidationError) Cause ¶
func (e EmitRequestValidationError) Cause() error
Cause function returns cause value.
func (EmitRequestValidationError) Error ¶
func (e EmitRequestValidationError) Error() string
Error satisfies the builtin error interface
func (EmitRequestValidationError) ErrorName ¶
func (e EmitRequestValidationError) ErrorName() string
ErrorName returns error name.
func (EmitRequestValidationError) Field ¶
func (e EmitRequestValidationError) Field() string
Field function returns field value.
func (EmitRequestValidationError) Key ¶
func (e EmitRequestValidationError) Key() bool
Key function returns key value.
func (EmitRequestValidationError) Reason ¶
func (e EmitRequestValidationError) Reason() string
Reason function returns reason value.
type EmitResponse ¶
type EmitResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*EmitResponse) Descriptor
deprecated
func (*EmitResponse) Descriptor() ([]byte, []int)
Deprecated: Use EmitResponse.ProtoReflect.Descriptor instead.
func (*EmitResponse) GetId ¶
func (x *EmitResponse) GetId() string
func (*EmitResponse) ProtoMessage ¶
func (*EmitResponse) ProtoMessage()
func (*EmitResponse) ProtoReflect ¶
func (x *EmitResponse) ProtoReflect() protoreflect.Message
func (*EmitResponse) Reset ¶
func (x *EmitResponse) Reset()
func (*EmitResponse) String ¶
func (x *EmitResponse) String() string
func (*EmitResponse) Validate ¶
func (m *EmitResponse) Validate() error
Validate checks the field values on EmitResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*EmitResponse) ValidateAll ¶
func (m *EmitResponse) ValidateAll() error
ValidateAll checks the field values on EmitResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EmitResponseMultiError, or nil if none found.
type EmitResponseMultiError ¶
type EmitResponseMultiError []error
EmitResponseMultiError is an error wrapping multiple validation errors returned by EmitResponse.ValidateAll() if the designated constraints aren't met.
func (EmitResponseMultiError) AllErrors ¶
func (m EmitResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EmitResponseMultiError) Error ¶
func (m EmitResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EmitResponseValidationError ¶
type EmitResponseValidationError struct {
// contains filtered or unexported fields
}
EmitResponseValidationError is the validation error returned by EmitResponse.Validate if the designated constraints aren't met.
func (EmitResponseValidationError) Cause ¶
func (e EmitResponseValidationError) Cause() error
Cause function returns cause value.
func (EmitResponseValidationError) Error ¶
func (e EmitResponseValidationError) Error() string
Error satisfies the builtin error interface
func (EmitResponseValidationError) ErrorName ¶
func (e EmitResponseValidationError) ErrorName() string
ErrorName returns error name.
func (EmitResponseValidationError) Field ¶
func (e EmitResponseValidationError) Field() string
Field function returns field value.
func (EmitResponseValidationError) Key ¶
func (e EmitResponseValidationError) Key() bool
Key function returns key value.
func (EmitResponseValidationError) Reason ¶
func (e EmitResponseValidationError) Reason() string
Reason function returns reason value.
type Event ¶
type Event struct { // id is the table primary key Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // received_time is the time the event emit request was received ReceivedTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=received_time,json=receivedTime,proto3" json:"received_time,omitempty"` // published_time the time the event was been published the messagebus PublishedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=published_time,json=publishedTime,proto3" json:"published_time,omitempty"` // transaction_id is a uuid that tracks all events that are part of the same transaction TransactionId string `protobuf:"bytes,4,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // event_source is cloudevent source EventSource string `protobuf:"bytes,11,opt,name=event_source,json=eventSource,proto3" json:"event_source,omitempty"` // event_type is cloudevent type EventType string `protobuf:"bytes,12,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` // event_data of the cloudevent type // it is saved as a json string for querying and interoperability EventData string `protobuf:"bytes,21,opt,name=event_data,json=eventData,proto3" json:"event_data,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskEvent ¶
func DefaultApplyFieldMaskEvent(ctx context.Context, patchee *Event, patcher *Event, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Event, error)
DefaultApplyFieldMaskEvent patches an pbObject with patcher according to a field mask.
func DefaultCreateEvent ¶
DefaultCreateEvent executes a basic gorm create call
func DefaultListEvent ¶
DefaultListEvent executes a gorm list call
func DefaultPatchEvent ¶
func DefaultPatchEvent(ctx context.Context, in *Event, updateMask *field_mask.FieldMask, db *gorm.DB) (*Event, error)
DefaultPatchEvent executes a basic gorm update call with patch behavior
func DefaultPatchSetEvent ¶
func DefaultPatchSetEvent(ctx context.Context, objects []*Event, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Event, error)
DefaultPatchSetEvent executes a bulk gorm update call with patch behavior
func DefaultReadEvent ¶
func DefaultStrictUpdateEvent ¶
DefaultStrictUpdateEvent clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Event) Descriptor
deprecated
func (*Event) GetEventData ¶
func (*Event) GetEventSource ¶
func (*Event) GetEventType ¶
func (*Event) GetPublishedTime ¶
func (x *Event) GetPublishedTime() *timestamppb.Timestamp
func (*Event) GetReceivedTime ¶
func (x *Event) GetReceivedTime() *timestamppb.Timestamp
func (*Event) GetTransactionId ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
func (*Event) ToORM ¶
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (*Event) Validate ¶
Validate checks the field values on Event with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Event) ValidateAll ¶
ValidateAll checks the field values on Event with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EventMultiError, or nil if none found.
type EventMultiError ¶
type EventMultiError []error
EventMultiError is an error wrapping multiple validation errors returned by Event.ValidateAll() if the designated constraints aren't met.
func (EventMultiError) AllErrors ¶
func (m EventMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EventMultiError) Error ¶
func (m EventMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EventORM ¶
type EventORM struct { EventData string `gorm:"type:json"` EventSource string `gorm:"type:varchar(255)"` EventType string `gorm:"type:varchar(255)"` Id string `gorm:"type:uuid;primary_key"` PublishedTime *time.Time `gorm:"type:timestamp"` ReceivedTime *time.Time `gorm:"type:timestamp"` TransactionId string `gorm:"type:uuid"` }
type EventValidationError ¶
type EventValidationError struct {
// contains filtered or unexported fields
}
EventValidationError is the validation error returned by Event.Validate if the designated constraints aren't met.
func (EventValidationError) Cause ¶
func (e EventValidationError) Cause() error
Cause function returns cause value.
func (EventValidationError) Error ¶
func (e EventValidationError) Error() string
Error satisfies the builtin error interface
func (EventValidationError) ErrorName ¶
func (e EventValidationError) ErrorName() string
ErrorName returns error name.
func (EventValidationError) Field ¶
func (e EventValidationError) Field() string
Field function returns field value.
func (EventValidationError) Key ¶
func (e EventValidationError) Key() bool
Key function returns key value.
func (EventValidationError) Reason ¶
func (e EventValidationError) Reason() string
Reason function returns reason value.
type EventWithAfterPatchSave ¶
type EventWithAfterToORM ¶
EventAfterToORM called after default ToORM code
type EventWithAfterToPB ¶
EventAfterToPB called after default ToPB code
type EventWithBeforeToORM ¶
EventBeforeToORM called before default ToORM code
type EventWithBeforeToPB ¶
EventBeforeToPB called before default ToPB code
type EventerClient ¶
type EventerClient interface {
Emit(ctx context.Context, in *EmitRequest, opts ...grpc.CallOption) (*EmitResponse, error)
}
EventerClient is the client API for Eventer 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.
func NewEventerClient ¶
func NewEventerClient(cc grpc.ClientConnInterface) EventerClient
type EventerServer ¶
type EventerServer interface {
Emit(context.Context, *EmitRequest) (*EmitResponse, error)
}
EventerServer is the server API for Eventer service. All implementations should embed UnimplementedEventerServer for forward compatibility
type SaveFailed ¶
type SaveFailed struct { // event is the event that failed to save Event *pb.CloudEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // error is the error that occurred while trying to save the event Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // received_time is the time the original event was received by the eventer service ReceivedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=received_time,json=receivedTime,proto3" json:"received_time,omitempty"` // published_time is the time the original event was published by the eventer service PublishedTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=published_time,json=publishedTime,proto3" json:"published_time,omitempty"` // contains filtered or unexported fields }
func (*SaveFailed) Descriptor
deprecated
func (*SaveFailed) Descriptor() ([]byte, []int)
Deprecated: Use SaveFailed.ProtoReflect.Descriptor instead.
func (*SaveFailed) GetError ¶
func (x *SaveFailed) GetError() string
func (*SaveFailed) GetEvent ¶
func (x *SaveFailed) GetEvent() *pb.CloudEvent
func (*SaveFailed) GetPublishedTime ¶
func (x *SaveFailed) GetPublishedTime() *timestamppb.Timestamp
func (*SaveFailed) GetReceivedTime ¶
func (x *SaveFailed) GetReceivedTime() *timestamppb.Timestamp
func (*SaveFailed) ProtoMessage ¶
func (*SaveFailed) ProtoMessage()
func (*SaveFailed) ProtoReflect ¶
func (x *SaveFailed) ProtoReflect() protoreflect.Message
func (*SaveFailed) Reset ¶
func (x *SaveFailed) Reset()
func (*SaveFailed) String ¶
func (x *SaveFailed) String() string
func (*SaveFailed) Validate ¶
func (m *SaveFailed) Validate() error
Validate checks the field values on SaveFailed with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SaveFailed) ValidateAll ¶
func (m *SaveFailed) ValidateAll() error
ValidateAll checks the field values on SaveFailed with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SaveFailedMultiError, or nil if none found.
type SaveFailedMultiError ¶
type SaveFailedMultiError []error
SaveFailedMultiError is an error wrapping multiple validation errors returned by SaveFailed.ValidateAll() if the designated constraints aren't met.
func (SaveFailedMultiError) AllErrors ¶
func (m SaveFailedMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SaveFailedMultiError) Error ¶
func (m SaveFailedMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SaveFailedValidationError ¶
type SaveFailedValidationError struct {
// contains filtered or unexported fields
}
SaveFailedValidationError is the validation error returned by SaveFailed.Validate if the designated constraints aren't met.
func (SaveFailedValidationError) Cause ¶
func (e SaveFailedValidationError) Cause() error
Cause function returns cause value.
func (SaveFailedValidationError) Error ¶
func (e SaveFailedValidationError) Error() string
Error satisfies the builtin error interface
func (SaveFailedValidationError) ErrorName ¶
func (e SaveFailedValidationError) ErrorName() string
ErrorName returns error name.
func (SaveFailedValidationError) Field ¶
func (e SaveFailedValidationError) Field() string
Field function returns field value.
func (SaveFailedValidationError) Key ¶
func (e SaveFailedValidationError) Key() bool
Key function returns key value.
func (SaveFailedValidationError) Reason ¶
func (e SaveFailedValidationError) Reason() string
Reason function returns reason value.
type UnimplementedEventerServer ¶
type UnimplementedEventerServer struct { }
UnimplementedEventerServer should be embedded to have forward compatible implementations.
func (UnimplementedEventerServer) Emit ¶
func (UnimplementedEventerServer) Emit(context.Context, *EmitRequest) (*EmitResponse, error)
type UnsafeEventerServer ¶
type UnsafeEventerServer interface {
// contains filtered or unexported methods
}
UnsafeEventerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventerServer will result in compilation errors.