Documentation ¶
Index ¶
- Variables
- func DefaultIDGenerator(cmd *RegisterUser) string
- type Aggregate
- type BaseAggregate
- func (b *BaseAggregate) AggregateID() string
- func (b *BaseAggregate) CurrentSequence() int64
- func (b *BaseAggregate) IncrementSequence()
- func (b *BaseAggregate) Initialize(snapshot *Snapshot)
- func (b *BaseAggregate) Raise(eventData EventData)
- func (b *BaseAggregate) Snapshot() *Snapshot
- func (b *BaseAggregate) UncommittedEvents() []*Event
- type Codec
- type Command
- type CommandData
- type CommandDispatcher
- type CommandHandler
- func (c *CommandHandler) Handle(ctx context.Context, cmd *Command) error
- func (c *CommandHandler) ListTopicSubscriptions(ctx context.Context, _ *emptypb.Empty) (*v1.ListTopicSubscriptionsResponse, error)
- func (c *CommandHandler) OnTopicEvent(ctx context.Context, request *v1.TopicEventRequest) (*v1.TopicEventResponse, error)
- func (c *CommandHandler) Rehydrate(aggregate UserAggregate, events []*Event)
- type Command_Data
- func (*Command_Data) Descriptor() ([]byte, []int)deprecated
- func (m *Command_Data) GetData() isCommand_Data_Data
- func (x *Command_Data) GetDeactivate() *DeactivateUser
- func (x *Command_Data) GetRegister() *RegisterUser
- func (*Command_Data) ProtoMessage()
- func (x *Command_Data) ProtoReflect() protoreflect.Message
- func (x *Command_Data) Reset()
- func (x *Command_Data) String() string
- type Command_Data_Deactivate
- type Command_Data_Register
- type DeactivateUser
- func (d *DeactivateUser) CommandType() string
- func (*DeactivateUser) Descriptor() ([]byte, []int)deprecated
- func (x *DeactivateUser) GetReason() string
- func (*DeactivateUser) ProtoMessage()
- func (x *DeactivateUser) ProtoReflect() protoreflect.Message
- func (x *DeactivateUser) Reset()
- func (x *DeactivateUser) String() string
- type DynamoEventstore
- type DynamoUserRepository
- func (d *DynamoUserRepository) GetUser(ctx context.Context, id string, age int64) (*User, error)
- func (d *DynamoUserRepository) ListScoresByCountry(ctx context.Context, country _type.CountryCode, score float64) ([]*User, error)
- func (d *DynamoUserRepository) ListUsers(ctx context.Context) ([]*User, error)
- func (d *DynamoUserRepository) ListUsersByCountry(ctx context.Context, country _type.CountryCode) ([]*User, error)
- func (d *DynamoUserRepository) PutUser(ctx context.Context, user *User) error
- type Error
- type ErrorData
- type Error_Data
- func (*Error_Data) Descriptor() ([]byte, []int)deprecated
- func (x *Error_Data) GetAlreadyRegistered() *UserAlreadyRegistered
- func (m *Error_Data) GetData() isError_Data_Data
- func (x *Error_Data) GetUnregistered() *UserUnregistered
- func (*Error_Data) ProtoMessage()
- func (x *Error_Data) ProtoReflect() protoreflect.Message
- func (x *Error_Data) Reset()
- func (x *Error_Data) String() string
- type Error_Data_AlreadyRegistered
- type Error_Data_Unregistered
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetData() *Event_Data
- func (x *Event) GetId() string
- func (x *Event) GetSequence() int64
- func (x *Event) GetTimestamp() int64
- func (x *Event) GetType() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventData
- type EventHandler
- type EventListener
- func (e *EventListener) Handle(ctx context.Context, event *Event) error
- func (e *EventListener) ListTopicSubscriptions(ctx context.Context, _ *emptypb.Empty) (*v1.ListTopicSubscriptionsResponse, error)
- func (e *EventListener) OnTopicEvent(ctx context.Context, request *v1.TopicEventRequest) (*v1.TopicEventResponse, error)
- type EventStore
- type Event_Data
- func (*Event_Data) Descriptor() ([]byte, []int)deprecated
- func (m *Event_Data) GetData() isEvent_Data_Data
- func (x *Event_Data) GetDeactivated() *UserDeactivated
- func (x *Event_Data) GetRegistered() *UserRegistered
- func (*Event_Data) ProtoMessage()
- func (x *Event_Data) ProtoReflect() protoreflect.Message
- func (x *Event_Data) Reset()
- func (x *Event_Data) String() string
- type Event_Data_Deactivated
- type Event_Data_Registered
- type IDGeneratorFunc
- type RegisterUser
- func (r *RegisterUser) CommandType() string
- func (*RegisterUser) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterUser) GetAge() int64
- func (x *RegisterUser) GetEmail() string
- func (x *RegisterUser) GetName() string
- func (*RegisterUser) ProtoMessage()
- func (x *RegisterUser) ProtoReflect() protoreflect.Message
- func (x *RegisterUser) Reset()
- func (x *RegisterUser) String() string
- type Snapshot
- type SnapshotRepo
- type State
- func (*State) Descriptor() ([]byte, []int)deprecated
- func (x *State) GetEmail() string
- func (x *State) GetId() string
- func (x *State) GetIsActive() bool
- func (x *State) GetName() string
- func (*State) ProtoMessage()
- func (x *State) ProtoReflect() protoreflect.Message
- func (x *State) Reset()
- func (x *State) String() string
- type UnimplementedEventHandler
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (u *User) GSI1SK() types.AttributeValue
- func (u *User) GSI2SK() types.AttributeValue
- func (u *User) GSI3PK() types.AttributeValue
- func (u *User) GSI3SK() types.AttributeValue
- func (x *User) GetAge() int64
- func (x *User) GetCity() string
- func (x *User) GetCountry() _type.CountryCode
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetScore() float64
- func (u *User) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (u *User) PK() types.AttributeValue
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (u *User) SK() types.AttributeValue
- func (x *User) String() string
- type UserAggregate
- type UserAlreadyRegistered
- func (*UserAlreadyRegistered) Descriptor() ([]byte, []int)deprecated
- func (u *UserAlreadyRegistered) Error() string
- func (u *UserAlreadyRegistered) ErrorType() string
- func (x *UserAlreadyRegistered) GetId() string
- func (x *UserAlreadyRegistered) GetRegistrationTime() int64
- func (*UserAlreadyRegistered) ProtoMessage()
- func (x *UserAlreadyRegistered) ProtoReflect() protoreflect.Message
- func (x *UserAlreadyRegistered) Reset()
- func (x *UserAlreadyRegistered) String() string
- type UserDeactivated
- type UserRegistered
- func (*UserRegistered) Descriptor() ([]byte, []int)deprecated
- func (u *UserRegistered) EventType() string
- func (x *UserRegistered) GetEmail() string
- func (x *UserRegistered) GetName() string
- func (*UserRegistered) ProtoMessage()
- func (x *UserRegistered) ProtoReflect() protoreflect.Message
- func (x *UserRegistered) Reset()
- func (x *UserRegistered) String() string
- type UserRepository
- type UserUnregistered
- func (*UserUnregistered) Descriptor() ([]byte, []int)deprecated
- func (u *UserUnregistered) Error() string
- func (u *UserUnregistered) ErrorType() string
- func (x *UserUnregistered) GetId() string
- func (*UserUnregistered) ProtoMessage()
- func (x *UserUnregistered) ProtoReflect() protoreflect.Message
- func (x *UserUnregistered) Reset()
- func (x *UserUnregistered) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_user_v1_command_proto protoreflect.FileDescriptor
View Source
var File_user_v1_domain_proto protoreflect.FileDescriptor
View Source
var File_user_v1_error_proto protoreflect.FileDescriptor
View Source
var File_user_v1_event_proto protoreflect.FileDescriptor
View Source
var File_user_v1_view_proto protoreflect.FileDescriptor
Functions ¶
func DefaultIDGenerator ¶
func DefaultIDGenerator(cmd *RegisterUser) string
Types ¶
type BaseAggregate ¶
type BaseAggregate struct { ID string Sequence int64 State *State // contains filtered or unexported fields }
func (*BaseAggregate) AggregateID ¶
func (b *BaseAggregate) AggregateID() string
func (*BaseAggregate) CurrentSequence ¶
func (b *BaseAggregate) CurrentSequence() int64
func (*BaseAggregate) IncrementSequence ¶
func (b *BaseAggregate) IncrementSequence()
func (*BaseAggregate) Initialize ¶
func (b *BaseAggregate) Initialize(snapshot *Snapshot)
func (*BaseAggregate) Raise ¶
func (b *BaseAggregate) Raise(eventData EventData)
func (*BaseAggregate) Snapshot ¶
func (b *BaseAggregate) Snapshot() *Snapshot
func (*BaseAggregate) UncommittedEvents ¶
func (b *BaseAggregate) UncommittedEvents() []*Event
type Command ¶
type Command struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data *Command_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Command) Descriptor
deprecated
func (*Command) GetData ¶
func (x *Command) GetData() *Command_Data
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type CommandData ¶
type CommandData interface { CommandType() string // contains filtered or unexported methods }
type CommandDispatcher ¶
type CommandDispatcher struct { Client client.Client GenerateID IDGeneratorFunc }
func (*CommandDispatcher) Dispatch ¶
func (c *CommandDispatcher) Dispatch(ctx context.Context, aggregateID string, commands ...CommandData) error
func (*CommandDispatcher) DispatchInitialCommand ¶
func (c *CommandDispatcher) DispatchInitialCommand(ctx context.Context, cmd *RegisterUser) error
type CommandHandler ¶
type CommandHandler struct { AggregateFactory func() UserAggregate EventStore EventStore SnapshotRepo SnapshotRepo SnapshotTrigger func(*Snapshot) bool v1.UnimplementedAppCallbackServer }
func (*CommandHandler) Handle ¶
func (c *CommandHandler) Handle(ctx context.Context, cmd *Command) error
func (*CommandHandler) ListTopicSubscriptions ¶
func (c *CommandHandler) ListTopicSubscriptions(ctx context.Context, _ *emptypb.Empty) (*v1.ListTopicSubscriptionsResponse, error)
func (*CommandHandler) OnTopicEvent ¶
func (c *CommandHandler) OnTopicEvent(ctx context.Context, request *v1.TopicEventRequest) (*v1.TopicEventResponse, error)
func (*CommandHandler) Rehydrate ¶
func (c *CommandHandler) Rehydrate(aggregate UserAggregate, events []*Event)
type Command_Data ¶
type Command_Data struct { // Types that are assignable to Data: // *Command_Data_Register // *Command_Data_Deactivate Data isCommand_Data_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*Command_Data) Descriptor
deprecated
func (*Command_Data) Descriptor() ([]byte, []int)
Deprecated: Use Command_Data.ProtoReflect.Descriptor instead.
func (*Command_Data) GetData ¶
func (m *Command_Data) GetData() isCommand_Data_Data
func (*Command_Data) GetDeactivate ¶
func (x *Command_Data) GetDeactivate() *DeactivateUser
func (*Command_Data) GetRegister ¶
func (x *Command_Data) GetRegister() *RegisterUser
func (*Command_Data) ProtoMessage ¶
func (*Command_Data) ProtoMessage()
func (*Command_Data) ProtoReflect ¶
func (x *Command_Data) ProtoReflect() protoreflect.Message
func (*Command_Data) Reset ¶
func (x *Command_Data) Reset()
func (*Command_Data) String ¶
func (x *Command_Data) String() string
type Command_Data_Deactivate ¶
type Command_Data_Deactivate struct {
Deactivate *DeactivateUser `protobuf:"bytes,2,opt,name=deactivate,proto3,oneof"`
}
type Command_Data_Register ¶
type Command_Data_Register struct {
Register *RegisterUser `protobuf:"bytes,1,opt,name=register,proto3,oneof"`
}
type DeactivateUser ¶
type DeactivateUser struct { Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*DeactivateUser) CommandType ¶
func (d *DeactivateUser) CommandType() string
func (*DeactivateUser) Descriptor
deprecated
func (*DeactivateUser) Descriptor() ([]byte, []int)
Deprecated: Use DeactivateUser.ProtoReflect.Descriptor instead.
func (*DeactivateUser) GetReason ¶
func (x *DeactivateUser) GetReason() string
func (*DeactivateUser) ProtoMessage ¶
func (*DeactivateUser) ProtoMessage()
func (*DeactivateUser) ProtoReflect ¶
func (x *DeactivateUser) ProtoReflect() protoreflect.Message
func (*DeactivateUser) Reset ¶
func (x *DeactivateUser) Reset()
func (*DeactivateUser) String ¶
func (x *DeactivateUser) String() string
type DynamoEventstore ¶
type DynamoUserRepository ¶
func (*DynamoUserRepository) ListScoresByCountry ¶
func (d *DynamoUserRepository) ListScoresByCountry(ctx context.Context, country _type.CountryCode, score float64) ([]*User, error)
func (*DynamoUserRepository) ListUsers ¶
func (d *DynamoUserRepository) ListUsers(ctx context.Context) ([]*User, error)
func (*DynamoUserRepository) ListUsersByCountry ¶
func (d *DynamoUserRepository) ListUsersByCountry(ctx context.Context, country _type.CountryCode) ([]*User, error)
type Error ¶
type Error struct { Command *Command `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` Data *Error_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetCommand ¶
func (*Error) GetData ¶
func (x *Error) GetData() *Error_Data
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Error_Data ¶
type Error_Data struct { // Types that are assignable to Data: // *Error_Data_AlreadyRegistered // *Error_Data_Unregistered Data isError_Data_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*Error_Data) Descriptor
deprecated
func (*Error_Data) Descriptor() ([]byte, []int)
Deprecated: Use Error_Data.ProtoReflect.Descriptor instead.
func (*Error_Data) GetAlreadyRegistered ¶
func (x *Error_Data) GetAlreadyRegistered() *UserAlreadyRegistered
func (*Error_Data) GetData ¶
func (m *Error_Data) GetData() isError_Data_Data
func (*Error_Data) GetUnregistered ¶
func (x *Error_Data) GetUnregistered() *UserUnregistered
func (*Error_Data) ProtoMessage ¶
func (*Error_Data) ProtoMessage()
func (*Error_Data) ProtoReflect ¶
func (x *Error_Data) ProtoReflect() protoreflect.Message
func (*Error_Data) Reset ¶
func (x *Error_Data) Reset()
func (*Error_Data) String ¶
func (x *Error_Data) String() string
type Error_Data_AlreadyRegistered ¶
type Error_Data_AlreadyRegistered struct {
AlreadyRegistered *UserAlreadyRegistered `protobuf:"bytes,1,opt,name=already_registered,json=alreadyRegistered,proto3,oneof"`
}
type Error_Data_Unregistered ¶
type Error_Data_Unregistered struct {
Unregistered *UserUnregistered `protobuf:"bytes,2,opt,name=unregistered,proto3,oneof"`
}
type Event ¶
type Event struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Sequence int64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` Data *Event_Data `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetData ¶
func (x *Event) GetData() *Event_Data
func (*Event) GetSequence ¶
func (*Event) GetTimestamp ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventData ¶
type EventData interface { EventType() string // contains filtered or unexported methods }
type EventHandler ¶
type EventHandler interface { OnUserRegistered(ctx context.Context, aggregateID string, event *UserRegistered) error OnUserDeactivated(ctx context.Context, aggregateID string, event *UserDeactivated) error }
type EventListener ¶
type EventListener struct { Handler EventHandler v1.UnimplementedAppCallbackServer }
func (*EventListener) Handle ¶
func (e *EventListener) Handle(ctx context.Context, event *Event) error
func (*EventListener) ListTopicSubscriptions ¶
func (e *EventListener) ListTopicSubscriptions(ctx context.Context, _ *emptypb.Empty) (*v1.ListTopicSubscriptionsResponse, error)
func (*EventListener) OnTopicEvent ¶
func (e *EventListener) OnTopicEvent(ctx context.Context, request *v1.TopicEventRequest) (*v1.TopicEventResponse, error)
type EventStore ¶
type Event_Data ¶
type Event_Data struct { // Types that are assignable to Data: // *Event_Data_Registered // *Event_Data_Deactivated Data isEvent_Data_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*Event_Data) Descriptor
deprecated
func (*Event_Data) Descriptor() ([]byte, []int)
Deprecated: Use Event_Data.ProtoReflect.Descriptor instead.
func (*Event_Data) GetData ¶
func (m *Event_Data) GetData() isEvent_Data_Data
func (*Event_Data) GetDeactivated ¶
func (x *Event_Data) GetDeactivated() *UserDeactivated
func (*Event_Data) GetRegistered ¶
func (x *Event_Data) GetRegistered() *UserRegistered
func (*Event_Data) ProtoMessage ¶
func (*Event_Data) ProtoMessage()
func (*Event_Data) ProtoReflect ¶
func (x *Event_Data) ProtoReflect() protoreflect.Message
func (*Event_Data) Reset ¶
func (x *Event_Data) Reset()
func (*Event_Data) String ¶
func (x *Event_Data) String() string
type Event_Data_Deactivated ¶
type Event_Data_Deactivated struct {
Deactivated *UserDeactivated `protobuf:"bytes,2,opt,name=deactivated,proto3,oneof"`
}
type Event_Data_Registered ¶
type Event_Data_Registered struct {
Registered *UserRegistered `protobuf:"bytes,1,opt,name=registered,proto3,oneof"`
}
type IDGeneratorFunc ¶
type IDGeneratorFunc func(*RegisterUser) string
type RegisterUser ¶
type RegisterUser struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Age int64 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*RegisterUser) CommandType ¶
func (r *RegisterUser) CommandType() string
func (*RegisterUser) Descriptor
deprecated
func (*RegisterUser) Descriptor() ([]byte, []int)
Deprecated: Use RegisterUser.ProtoReflect.Descriptor instead.
func (*RegisterUser) GetAge ¶
func (x *RegisterUser) GetAge() int64
func (*RegisterUser) GetEmail ¶
func (x *RegisterUser) GetEmail() string
func (*RegisterUser) GetName ¶
func (x *RegisterUser) GetName() string
func (*RegisterUser) ProtoMessage ¶
func (*RegisterUser) ProtoMessage()
func (*RegisterUser) ProtoReflect ¶
func (x *RegisterUser) ProtoReflect() protoreflect.Message
func (*RegisterUser) Reset ¶
func (x *RegisterUser) Reset()
func (*RegisterUser) String ¶
func (x *RegisterUser) String() string
type SnapshotRepo ¶
type SnapshotRepo interface { Persist(ctx context.Context, snapshot *Snapshot) error Retrieve(ctx context.Context, aggregateID string) (*Snapshot, error) }
func NewInMemorySnapshotRepo ¶
func NewInMemorySnapshotRepo() SnapshotRepo
type State ¶
type State struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` IsActive bool `protobuf:"varint,4,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // contains filtered or unexported fields }
func (*State) Descriptor
deprecated
func (*State) GetIsActive ¶
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) ProtoReflect ¶
func (x *State) ProtoReflect() protoreflect.Message
type UnimplementedEventHandler ¶
type UnimplementedEventHandler struct{}
func (UnimplementedEventHandler) OnUserDeactivated ¶
func (UnimplementedEventHandler) OnUserDeactivated(ctx context.Context, aggregateID string, event *UserDeactivated) error
func (UnimplementedEventHandler) OnUserRegistered ¶
func (UnimplementedEventHandler) OnUserRegistered(ctx context.Context, aggregateID string, event *UserRegistered) error
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Age int64 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Country _type.CountryCode `protobuf:"varint,4,opt,name=country,proto3,enum=type.CountryCode" json:"country,omitempty"` City string `protobuf:"bytes,5,opt,name=city,proto3" json:"city,omitempty"` Score float64 `protobuf:"fixed64,6,opt,name=score,proto3" json:"score,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GSI1SK ¶
func (u *User) GSI1SK() types.AttributeValue
func (*User) GSI2SK ¶
func (u *User) GSI2SK() types.AttributeValue
func (*User) GSI3PK ¶
func (u *User) GSI3PK() types.AttributeValue
func (*User) GSI3SK ¶
func (u *User) GSI3SK() types.AttributeValue
func (*User) GetCountry ¶
func (x *User) GetCountry() _type.CountryCode
func (*User) MarshalDynamoDBAttributeValue ¶
func (u *User) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
func (*User) PK ¶
func (u *User) PK() types.AttributeValue
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) SK ¶
func (u *User) SK() types.AttributeValue
type UserAggregate ¶
type UserAggregate interface { Aggregate HandleRegisterUser(cmd *RegisterUser) ErrorData HandleDeactivateUser(cmd *DeactivateUser) ErrorData OnUserRegistered(event *UserRegistered) OnUserDeactivated(event *UserDeactivated) }
type UserAlreadyRegistered ¶
type UserAlreadyRegistered struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` RegistrationTime int64 `protobuf:"varint,2,opt,name=registration_time,json=registrationTime,proto3" json:"registration_time,omitempty"` // contains filtered or unexported fields }
func (*UserAlreadyRegistered) Descriptor
deprecated
func (*UserAlreadyRegistered) Descriptor() ([]byte, []int)
Deprecated: Use UserAlreadyRegistered.ProtoReflect.Descriptor instead.
func (*UserAlreadyRegistered) Error ¶
func (u *UserAlreadyRegistered) Error() string
func (*UserAlreadyRegistered) ErrorType ¶
func (u *UserAlreadyRegistered) ErrorType() string
func (*UserAlreadyRegistered) GetId ¶
func (x *UserAlreadyRegistered) GetId() string
func (*UserAlreadyRegistered) GetRegistrationTime ¶
func (x *UserAlreadyRegistered) GetRegistrationTime() int64
func (*UserAlreadyRegistered) ProtoMessage ¶
func (*UserAlreadyRegistered) ProtoMessage()
func (*UserAlreadyRegistered) ProtoReflect ¶
func (x *UserAlreadyRegistered) ProtoReflect() protoreflect.Message
func (*UserAlreadyRegistered) Reset ¶
func (x *UserAlreadyRegistered) Reset()
func (*UserAlreadyRegistered) String ¶
func (x *UserAlreadyRegistered) String() string
type UserDeactivated ¶
type UserDeactivated struct {
// contains filtered or unexported fields
}
func (*UserDeactivated) Descriptor
deprecated
func (*UserDeactivated) Descriptor() ([]byte, []int)
Deprecated: Use UserDeactivated.ProtoReflect.Descriptor instead.
func (*UserDeactivated) EventType ¶
func (u *UserDeactivated) EventType() string
func (*UserDeactivated) ProtoMessage ¶
func (*UserDeactivated) ProtoMessage()
func (*UserDeactivated) ProtoReflect ¶
func (x *UserDeactivated) ProtoReflect() protoreflect.Message
func (*UserDeactivated) Reset ¶
func (x *UserDeactivated) Reset()
func (*UserDeactivated) String ¶
func (x *UserDeactivated) String() string
type UserRegistered ¶
type UserRegistered struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*UserRegistered) Descriptor
deprecated
func (*UserRegistered) Descriptor() ([]byte, []int)
Deprecated: Use UserRegistered.ProtoReflect.Descriptor instead.
func (*UserRegistered) EventType ¶
func (u *UserRegistered) EventType() string
func (*UserRegistered) GetEmail ¶
func (x *UserRegistered) GetEmail() string
func (*UserRegistered) GetName ¶
func (x *UserRegistered) GetName() string
func (*UserRegistered) ProtoMessage ¶
func (*UserRegistered) ProtoMessage()
func (*UserRegistered) ProtoReflect ¶
func (x *UserRegistered) ProtoReflect() protoreflect.Message
func (*UserRegistered) Reset ¶
func (x *UserRegistered) Reset()
func (*UserRegistered) String ¶
func (x *UserRegistered) String() string
type UserRepository ¶
type UserRepository interface { PutUser(ctx context.Context, user *User) error GetUser(ctx context.Context, id string, age int64) (*User, error) ListUsers(ctx context.Context) ([]*User, error) ListUsersByCountry(ctx context.Context, country _type.CountryCode) ([]*User, error) ListScoresByCountry(ctx context.Context, country _type.CountryCode, score float64) ([]*User, error) }
type UserUnregistered ¶
type UserUnregistered struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserUnregistered) Descriptor
deprecated
func (*UserUnregistered) Descriptor() ([]byte, []int)
Deprecated: Use UserUnregistered.ProtoReflect.Descriptor instead.
func (*UserUnregistered) Error ¶
func (u *UserUnregistered) Error() string
func (*UserUnregistered) ErrorType ¶
func (u *UserUnregistered) ErrorType() string
func (*UserUnregistered) GetId ¶
func (x *UserUnregistered) GetId() string
func (*UserUnregistered) ProtoMessage ¶
func (*UserUnregistered) ProtoMessage()
func (*UserUnregistered) ProtoReflect ¶
func (x *UserUnregistered) ProtoReflect() protoreflect.Message
func (*UserUnregistered) Reset ¶
func (x *UserUnregistered) Reset()
func (*UserUnregistered) String ¶
func (x *UserUnregistered) String() string
Click to show internal directories.
Click to hide internal directories.