aggregate

package
v0.0.0-...-82c07be Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContactAggregateType eventstore.AggregateType = "contact"
)

Variables

This section is empty.

Functions

func GetContactObjectID

func GetContactObjectID(aggregateID, tenant string) string

Types

type ContactAggregate

type ContactAggregate struct {
	*aggregate.CommonTenantIdAggregate
	Contact *models.Contact
}

func LoadContactAggregate

func LoadContactAggregate(ctx context.Context, eventStore eventstore.AggregateStore, tenant, objectID string, options eventstore.LoadAggregateOptions) (*ContactAggregate, error)

func NewContactAggregateWithTenantAndID

func NewContactAggregateWithTenantAndID(tenant, id string) *ContactAggregate

func (*ContactAggregate) HandleCommand

func (a *ContactAggregate) HandleCommand(ctx context.Context, cmd eventstore.Command) error

func (*ContactAggregate) HandleRequest

func (a *ContactAggregate) HandleRequest(ctx context.Context, request any) (any, error)

func (*ContactAggregate) SetEmailNonPrimary

func (a *ContactAggregate) SetEmailNonPrimary(ctx context.Context, emailId, loggedInUserId, appSource string) error

func (*ContactAggregate) SetPhoneNumberNonPrimary

func (a *ContactAggregate) SetPhoneNumberNonPrimary(ctx context.Context, phoneNumberId, loggedInUserId, appSource string) error

func (*ContactAggregate) When

func (a *ContactAggregate) When(evt eventstore.Event) error

Jump to

Keyboard shortcuts

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