Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCommandHandlerServer(s grpc.ServiceRegistrar, srv CommandHandlerServer)
- type ApplyCommandRequest
- func (*ApplyCommandRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyCommandRequest) GetAggregateId() string
- func (x *ApplyCommandRequest) GetAggregateType() string
- func (x *ApplyCommandRequest) GetCommandData() string
- func (x *ApplyCommandRequest) GetEventCode() string
- func (x *ApplyCommandRequest) GetEventType() string
- func (*ApplyCommandRequest) ProtoMessage()
- func (x *ApplyCommandRequest) ProtoReflect() protoreflect.Message
- func (x *ApplyCommandRequest) Reset()
- func (x *ApplyCommandRequest) String() string
- func (m *ApplyCommandRequest) Validate() error
- func (m *ApplyCommandRequest) ValidateAll() error
- type ApplyCommandRequestMultiError
- type ApplyCommandRequestValidationError
- func (e ApplyCommandRequestValidationError) Cause() error
- func (e ApplyCommandRequestValidationError) Error() string
- func (e ApplyCommandRequestValidationError) ErrorName() string
- func (e ApplyCommandRequestValidationError) Field() string
- func (e ApplyCommandRequestValidationError) Key() bool
- func (e ApplyCommandRequestValidationError) Reason() string
- type ApplyCommandResponse
- func (*ApplyCommandResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyCommandResponse) GetId() string
- func (x *ApplyCommandResponse) GetTransactionId() string
- func (*ApplyCommandResponse) ProtoMessage()
- func (x *ApplyCommandResponse) ProtoReflect() protoreflect.Message
- func (x *ApplyCommandResponse) Reset()
- func (x *ApplyCommandResponse) String() string
- func (m *ApplyCommandResponse) Validate() error
- func (m *ApplyCommandResponse) ValidateAll() error
- type ApplyCommandResponseMultiError
- type ApplyCommandResponseValidationError
- func (e ApplyCommandResponseValidationError) Cause() error
- func (e ApplyCommandResponseValidationError) Error() string
- func (e ApplyCommandResponseValidationError) ErrorName() string
- func (e ApplyCommandResponseValidationError) Field() string
- func (e ApplyCommandResponseValidationError) Key() bool
- func (e ApplyCommandResponseValidationError) Reason() string
- type CommandHandlerClient
- type CommandHandlerServer
- type UnimplementedCommandHandlerServer
- type UnsafeCommandHandlerServer
Constants ¶
const (
CommandHandler_Apply_FullMethodName = "/core.command.v1.CommandHandler/Apply"
)
Variables ¶
var CommandHandler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "core.command.v1.CommandHandler", HandlerType: (*CommandHandlerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Apply", Handler: _CommandHandler_Apply_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "core/commander/v1/services.proto", }
CommandHandler_ServiceDesc is the grpc.ServiceDesc for CommandHandler 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_commander_v1_services_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommandHandlerServer ¶
func RegisterCommandHandlerServer(s grpc.ServiceRegistrar, srv CommandHandlerServer)
Types ¶
type ApplyCommandRequest ¶
type ApplyCommandRequest struct { // the string identifier (enum value) of the aggregate type this event belongs to // NOTE: this is simply a string to keep the eventer from depending on changing types AggregateType string `protobuf:"bytes,1,opt,name=aggregate_type,json=aggregateType,proto3" json:"aggregate_type,omitempty"` // map of all event types // NOTE: this is simply a string to keep the eventer from depending on changing types EventType string `protobuf:"bytes,2,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` // TODO: is this the way we want to route things? EventCode string `protobuf:"bytes,3,opt,name=event_code,json=eventCode,proto3" json:"event_code,omitempty"` // the id of the aggregate that this command belongs to AggregateId string `protobuf:"bytes,4,opt,name=aggregate_id,json=aggregateId,proto3" json:"aggregate_id,omitempty"` // data representing the change to the state of the system that this command encapsulates // it is saved as a json string so that the core services can be completey agnostic to the // the data structure of the system (and thus be static services) // this data MUST be able to be unmarshalled into a Proto message type CommandData string `protobuf:"bytes,5,opt,name=command_data,json=commandData,proto3" json:"command_data,omitempty"` // contains filtered or unexported fields }
func (*ApplyCommandRequest) Descriptor
deprecated
func (*ApplyCommandRequest) Descriptor() ([]byte, []int)
Deprecated: Use ApplyCommandRequest.ProtoReflect.Descriptor instead.
func (*ApplyCommandRequest) GetAggregateId ¶
func (x *ApplyCommandRequest) GetAggregateId() string
func (*ApplyCommandRequest) GetAggregateType ¶
func (x *ApplyCommandRequest) GetAggregateType() string
func (*ApplyCommandRequest) GetCommandData ¶
func (x *ApplyCommandRequest) GetCommandData() string
func (*ApplyCommandRequest) GetEventCode ¶
func (x *ApplyCommandRequest) GetEventCode() string
func (*ApplyCommandRequest) GetEventType ¶
func (x *ApplyCommandRequest) GetEventType() string
func (*ApplyCommandRequest) ProtoMessage ¶
func (*ApplyCommandRequest) ProtoMessage()
func (*ApplyCommandRequest) ProtoReflect ¶
func (x *ApplyCommandRequest) ProtoReflect() protoreflect.Message
func (*ApplyCommandRequest) Reset ¶
func (x *ApplyCommandRequest) Reset()
func (*ApplyCommandRequest) String ¶
func (x *ApplyCommandRequest) String() string
func (*ApplyCommandRequest) Validate ¶
func (m *ApplyCommandRequest) Validate() error
Validate checks the field values on ApplyCommandRequest 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 (*ApplyCommandRequest) ValidateAll ¶
func (m *ApplyCommandRequest) ValidateAll() error
ValidateAll checks the field values on ApplyCommandRequest 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 ApplyCommandRequestMultiError, or nil if none found.
type ApplyCommandRequestMultiError ¶
type ApplyCommandRequestMultiError []error
ApplyCommandRequestMultiError is an error wrapping multiple validation errors returned by ApplyCommandRequest.ValidateAll() if the designated constraints aren't met.
func (ApplyCommandRequestMultiError) AllErrors ¶
func (m ApplyCommandRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ApplyCommandRequestMultiError) Error ¶
func (m ApplyCommandRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ApplyCommandRequestValidationError ¶
type ApplyCommandRequestValidationError struct {
// contains filtered or unexported fields
}
ApplyCommandRequestValidationError is the validation error returned by ApplyCommandRequest.Validate if the designated constraints aren't met.
func (ApplyCommandRequestValidationError) Cause ¶
func (e ApplyCommandRequestValidationError) Cause() error
Cause function returns cause value.
func (ApplyCommandRequestValidationError) Error ¶
func (e ApplyCommandRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ApplyCommandRequestValidationError) ErrorName ¶
func (e ApplyCommandRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ApplyCommandRequestValidationError) Field ¶
func (e ApplyCommandRequestValidationError) Field() string
Field function returns field value.
func (ApplyCommandRequestValidationError) Key ¶
func (e ApplyCommandRequestValidationError) Key() bool
Key function returns key value.
func (ApplyCommandRequestValidationError) Reason ¶
func (e ApplyCommandRequestValidationError) Reason() string
Reason function returns reason value.
type ApplyCommandResponse ¶
type ApplyCommandResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // contains filtered or unexported fields }
func (*ApplyCommandResponse) Descriptor
deprecated
func (*ApplyCommandResponse) Descriptor() ([]byte, []int)
Deprecated: Use ApplyCommandResponse.ProtoReflect.Descriptor instead.
func (*ApplyCommandResponse) GetId ¶
func (x *ApplyCommandResponse) GetId() string
func (*ApplyCommandResponse) GetTransactionId ¶
func (x *ApplyCommandResponse) GetTransactionId() string
func (*ApplyCommandResponse) ProtoMessage ¶
func (*ApplyCommandResponse) ProtoMessage()
func (*ApplyCommandResponse) ProtoReflect ¶
func (x *ApplyCommandResponse) ProtoReflect() protoreflect.Message
func (*ApplyCommandResponse) Reset ¶
func (x *ApplyCommandResponse) Reset()
func (*ApplyCommandResponse) String ¶
func (x *ApplyCommandResponse) String() string
func (*ApplyCommandResponse) Validate ¶
func (m *ApplyCommandResponse) Validate() error
Validate checks the field values on ApplyCommandResponse 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 (*ApplyCommandResponse) ValidateAll ¶
func (m *ApplyCommandResponse) ValidateAll() error
ValidateAll checks the field values on ApplyCommandResponse 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 ApplyCommandResponseMultiError, or nil if none found.
type ApplyCommandResponseMultiError ¶
type ApplyCommandResponseMultiError []error
ApplyCommandResponseMultiError is an error wrapping multiple validation errors returned by ApplyCommandResponse.ValidateAll() if the designated constraints aren't met.
func (ApplyCommandResponseMultiError) AllErrors ¶
func (m ApplyCommandResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ApplyCommandResponseMultiError) Error ¶
func (m ApplyCommandResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ApplyCommandResponseValidationError ¶
type ApplyCommandResponseValidationError struct {
// contains filtered or unexported fields
}
ApplyCommandResponseValidationError is the validation error returned by ApplyCommandResponse.Validate if the designated constraints aren't met.
func (ApplyCommandResponseValidationError) Cause ¶
func (e ApplyCommandResponseValidationError) Cause() error
Cause function returns cause value.
func (ApplyCommandResponseValidationError) Error ¶
func (e ApplyCommandResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ApplyCommandResponseValidationError) ErrorName ¶
func (e ApplyCommandResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ApplyCommandResponseValidationError) Field ¶
func (e ApplyCommandResponseValidationError) Field() string
Field function returns field value.
func (ApplyCommandResponseValidationError) Key ¶
func (e ApplyCommandResponseValidationError) Key() bool
Key function returns key value.
func (ApplyCommandResponseValidationError) Reason ¶
func (e ApplyCommandResponseValidationError) Reason() string
Reason function returns reason value.
type CommandHandlerClient ¶
type CommandHandlerClient interface { // this is ASYNCHRONOUS and will only return a transaction ID. the client should listen for // a completed event on the notifier service Apply(ctx context.Context, in *ApplyCommandRequest, opts ...grpc.CallOption) (*ApplyCommandResponse, error) }
CommandHandlerClient is the client API for CommandHandler 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 NewCommandHandlerClient ¶
func NewCommandHandlerClient(cc grpc.ClientConnInterface) CommandHandlerClient
type CommandHandlerServer ¶
type CommandHandlerServer interface { // this is ASYNCHRONOUS and will only return a transaction ID. the client should listen for // a completed event on the notifier service Apply(context.Context, *ApplyCommandRequest) (*ApplyCommandResponse, error) }
CommandHandlerServer is the server API for CommandHandler service. All implementations should embed UnimplementedCommandHandlerServer for forward compatibility
type UnimplementedCommandHandlerServer ¶
type UnimplementedCommandHandlerServer struct { }
UnimplementedCommandHandlerServer should be embedded to have forward compatible implementations.
func (UnimplementedCommandHandlerServer) Apply ¶
func (UnimplementedCommandHandlerServer) Apply(context.Context, *ApplyCommandRequest) (*ApplyCommandResponse, error)
type UnsafeCommandHandlerServer ¶
type UnsafeCommandHandlerServer interface {
// contains filtered or unexported methods
}
UnsafeCommandHandlerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommandHandlerServer will result in compilation errors.