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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailAggregateType eventstore.AggregateType = "email"
)

Variables

This section is empty.

Functions

func GetEmailObjectID

func GetEmailObjectID(aggregateID string, tenant string) string

Types

type EmailAggregate

type EmailAggregate struct {
	*aggregate.CommonTenantIdAggregate
	Email *models.Email
}

func LoadEmailAggregate

func LoadEmailAggregate(ctx context.Context, eventStore eventstore.AggregateStore, tenant, objectID string) (*EmailAggregate, error)

func NewEmailAggregateWithTenantAndID

func NewEmailAggregateWithTenantAndID(tenant, id string) *EmailAggregate

func (*EmailAggregate) HandleCommand

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

func (*EmailAggregate) OnEmailFailedValidation

func (a *EmailAggregate) OnEmailFailedValidation(event eventstore.Event) error

func (*EmailAggregate) OnEmailValidated

func (a *EmailAggregate) OnEmailValidated(event eventstore.Event) error

func (*EmailAggregate) When

func (a *EmailAggregate) When(event eventstore.Event) error

Jump to

Keyboard shortcuts

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