Documentation ¶
Index ¶
- Constants
- func GetUserObjectID(aggregateID string, tenant string) string
- type UserAggregate
- func (a *UserAggregate) HandleCommand(ctx context.Context, cmd eventstore.Command) error
- func (a *UserAggregate) HandleGRPCRequest(ctx context.Context, request any, params map[string]any) (any, error)
- func (a *UserAggregate) HandleRequest(ctx context.Context, request any, params map[string]any) (any, error)
- func (a *UserAggregate) LinkJobRole(ctx context.Context, tenant, jobRoleId, loggedInUserId string) error
- func (a *UserAggregate) SetPhoneNumberNonPrimary(ctx context.Context, tenant, phoneNumberId, loggedInUserId string) error
- func (a *UserAggregate) When(event eventstore.Event) error
Constants ¶
View Source
const (
UserAggregateType eventstore.AggregateType = "user"
)
Variables ¶
This section is empty.
Functions ¶
func GetUserObjectID ¶
Types ¶
type UserAggregate ¶
type UserAggregate struct { *eventstore.CommonTenantIdAggregate User *models.User EventHashes map[string]map[string]string }
func LoadUserAggregate ¶
func LoadUserAggregate(ctx context.Context, eventStore eventstore.AggregateStore, tenant, objectID string) (*UserAggregate, error)
func NewUserAggregateWithTenantAndID ¶
func NewUserAggregateWithTenantAndID(tenant, id string) *UserAggregate
func (*UserAggregate) HandleCommand ¶
func (a *UserAggregate) HandleCommand(ctx context.Context, cmd eventstore.Command) error
func (*UserAggregate) HandleGRPCRequest ¶
func (*UserAggregate) HandleRequest ¶
func (*UserAggregate) LinkJobRole ¶
func (a *UserAggregate) LinkJobRole(ctx context.Context, tenant, jobRoleId, loggedInUserId string) error
func (*UserAggregate) SetPhoneNumberNonPrimary ¶
func (a *UserAggregate) SetPhoneNumberNonPrimary(ctx context.Context, tenant, phoneNumberId, loggedInUserId string) error
func (*UserAggregate) When ¶
func (a *UserAggregate) When(event eventstore.Event) error
Click to show internal directories.
Click to hide internal directories.