commands

package
v0.5.0-dev29 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_eventsourcing_commands_command_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Command

type Command struct {

	// Unique identifier of the aggregate the command applies to (UUID 128-bit
	// number)
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Type of the command
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Command type specific data
	Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Command is a command to be executed by the CommandHandler

func (*Command) Descriptor deprecated

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

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetData

func (x *Command) GetData() *anypb.Any

func (*Command) GetId

func (x *Command) GetId() string

func (*Command) GetType

func (x *Command) GetType() string

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

func (*Command) Validate added in v0.3.0

func (m *Command) Validate() error

Validate checks the field values on Command 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 (*Command) ValidateAll added in v0.3.0

func (m *Command) ValidateAll() error

ValidateAll checks the field values on Command 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 CommandMultiError, or nil if none found.

type CommandMultiError added in v0.3.0

type CommandMultiError []error

CommandMultiError is an error wrapping multiple validation errors returned by Command.ValidateAll() if the designated constraints aren't met.

func (CommandMultiError) AllErrors added in v0.3.0

func (m CommandMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CommandMultiError) Error added in v0.3.0

func (m CommandMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CommandValidationError added in v0.3.0

type CommandValidationError struct {
	// contains filtered or unexported fields
}

CommandValidationError is the validation error returned by Command.Validate if the designated constraints aren't met.

func (CommandValidationError) Cause added in v0.3.0

func (e CommandValidationError) Cause() error

Cause function returns cause value.

func (CommandValidationError) Error added in v0.3.0

func (e CommandValidationError) Error() string

Error satisfies the builtin error interface

func (CommandValidationError) ErrorName added in v0.3.0

func (e CommandValidationError) ErrorName() string

ErrorName returns error name.

func (CommandValidationError) Field added in v0.3.0

func (e CommandValidationError) Field() string

Field function returns field value.

func (CommandValidationError) Key added in v0.3.0

func (e CommandValidationError) Key() bool

Key function returns key value.

func (CommandValidationError) Reason added in v0.3.0

func (e CommandValidationError) Reason() string

Reason function returns reason value.

type TestCommandData

type TestCommandData struct {
	Test      string `protobuf:"bytes,1,opt,name=test,proto3" json:"test,omitempty"`
	TestCount int32  `protobuf:"varint,2,opt,name=test_count,json=testCount,proto3" json:"test_count,omitempty"`
	// contains filtered or unexported fields
}

func (*TestCommandData) Descriptor deprecated

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

Deprecated: Use TestCommandData.ProtoReflect.Descriptor instead.

func (*TestCommandData) GetTest

func (x *TestCommandData) GetTest() string

func (*TestCommandData) GetTestCount

func (x *TestCommandData) GetTestCount() int32

func (*TestCommandData) ProtoMessage

func (*TestCommandData) ProtoMessage()

func (*TestCommandData) ProtoReflect

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

func (*TestCommandData) Reset

func (x *TestCommandData) Reset()

func (*TestCommandData) String

func (x *TestCommandData) String() string

func (*TestCommandData) Validate added in v0.3.0

func (m *TestCommandData) Validate() error

Validate checks the field values on TestCommandData 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 (*TestCommandData) ValidateAll added in v0.3.0

func (m *TestCommandData) ValidateAll() error

ValidateAll checks the field values on TestCommandData 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 TestCommandDataMultiError, or nil if none found.

type TestCommandDataMultiError added in v0.3.0

type TestCommandDataMultiError []error

TestCommandDataMultiError is an error wrapping multiple validation errors returned by TestCommandData.ValidateAll() if the designated constraints aren't met.

func (TestCommandDataMultiError) AllErrors added in v0.3.0

func (m TestCommandDataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TestCommandDataMultiError) Error added in v0.3.0

Error returns a concatenation of all the error messages it wraps.

type TestCommandDataValidationError added in v0.3.0

type TestCommandDataValidationError struct {
	// contains filtered or unexported fields
}

TestCommandDataValidationError is the validation error returned by TestCommandData.Validate if the designated constraints aren't met.

func (TestCommandDataValidationError) Cause added in v0.3.0

Cause function returns cause value.

func (TestCommandDataValidationError) Error added in v0.3.0

Error satisfies the builtin error interface

func (TestCommandDataValidationError) ErrorName added in v0.3.0

func (e TestCommandDataValidationError) ErrorName() string

ErrorName returns error name.

func (TestCommandDataValidationError) Field added in v0.3.0

Field function returns field value.

func (TestCommandDataValidationError) Key added in v0.3.0

Key function returns key value.

func (TestCommandDataValidationError) Reason added in v0.3.0

Reason function returns reason value.

Jump to

Keyboard shortcuts

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