v1

package
v0.0.0-...-ea17f1c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandHandler_Apply_FullMethodName = "/core.command.v1.CommandHandler/Apply"
)

Variables

View Source
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)

View Source
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

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

Cause function returns cause value.

func (ApplyCommandRequestValidationError) Error

Error satisfies the builtin error interface

func (ApplyCommandRequestValidationError) ErrorName

ErrorName returns error name.

func (ApplyCommandRequestValidationError) Field

Field function returns field value.

func (ApplyCommandRequestValidationError) Key

Key function returns key value.

func (ApplyCommandRequestValidationError) Reason

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

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

Cause function returns cause value.

func (ApplyCommandResponseValidationError) Error

Error satisfies the builtin error interface

func (ApplyCommandResponseValidationError) ErrorName

ErrorName returns error name.

func (ApplyCommandResponseValidationError) Field

Field function returns field value.

func (ApplyCommandResponseValidationError) Key

Key function returns key value.

func (ApplyCommandResponseValidationError) Reason

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.

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

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.

Jump to

Keyboard shortcuts

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