aggregate

package
v0.0.0-...-4518f94 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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpportunityAggregateType eventstore.AggregateType = "opportunity"
)

Variables

This section is empty.

Functions

func GetOpportunityObjectID

func GetOpportunityObjectID(aggregateID string, tenant string) string

Types

type OpportunityAggregate

type OpportunityAggregate struct {
	*aggregate.CommonTenantIdAggregate
	Opportunity *model.Opportunity
}

func LoadOpportunityAggregate

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

func NewOpportunityAggregateWithTenantAndID

func NewOpportunityAggregateWithTenantAndID(tenant, id string) *OpportunityAggregate

func (*OpportunityAggregate) HandleCommand

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

HandleCommand processes commands and applies the resulting events to the aggregate.

func (*OpportunityAggregate) HandleGRPCRequest

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

func (*OpportunityAggregate) When

Jump to

Keyboard shortcuts

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