aggregate

package
v0.0.0-...-9086999 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LocationAggregateType eventstore.AggregateType = "location"
)

Variables

This section is empty.

Functions

func GetLocationObjectID

func GetLocationObjectID(aggregateID string, tenant string) string

GetLocationObjectID get location id for eventstoredb

Types

type LocationAggregate

type LocationAggregate struct {
	*eventstore.CommonTenantIdAggregate
	Location *models.Location
}

func LoadLocationAggregate

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

func NewLocationAggregateWithTenantAndID

func NewLocationAggregateWithTenantAndID(tenant, id string) *LocationAggregate

func (*LocationAggregate) HandleCommand

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

func (*LocationAggregate) OnLocationFailedValidation

func (a *LocationAggregate) OnLocationFailedValidation(event eventstore.Event) error

func (*LocationAggregate) OnLocationSkippedValidation

func (a *LocationAggregate) OnLocationSkippedValidation(event eventstore.Event) error

func (*LocationAggregate) OnLocationValidated

func (a *LocationAggregate) OnLocationValidated(event eventstore.Event) error

func (*LocationAggregate) When

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

Jump to

Keyboard shortcuts

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