aggregate

package
v0.0.0-...-ae82ce1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UserAggregateType eventstore.AggregateType = "user"
)

Variables

This section is empty.

Functions

func GetUserObjectID

func GetUserObjectID(aggregateID string, tenant string) string

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 (a *UserAggregate) HandleGRPCRequest(ctx context.Context, request any, params map[string]any) (any, error)

func (*UserAggregate) HandleRequest

func (a *UserAggregate) HandleRequest(ctx context.Context, request any, params map[string]any) (any, error)

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

Jump to

Keyboard shortcuts

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