offering

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

Documentation

Index

Constants

View Source
const (
	FieldMaskContent = "content"
)
View Source
const OfferingAggregateType = "offering"
View Source
const (
	OfferingCreateV1 = "V1_OFFERING_CREATE"
)

Variables

This section is empty.

Functions

func GetOfferingObjectID

func GetOfferingObjectID(aggregateID string, tenant string) string

Types

type Offering

type Offering struct {
}

type OfferingAggregate

type OfferingAggregate struct {
	*aggregate.CommonTenantIdAggregate
	Offering *Offering
}

func LoadOfferingAggregate

func LoadOfferingAggregate(ctx context.Context, eventStore eventstore.AggregateStore, tenant, objectID string, opts eventstore.LoadAggregateOptions) (*OfferingAggregate, error)

func NewOfferingAggregateWithTenantAndID

func NewOfferingAggregateWithTenantAndID(tenant, id string) *OfferingAggregate

func (*OfferingAggregate) CreateOffering

func (*OfferingAggregate) HandleRequest

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

func (*OfferingAggregate) When

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

type OfferingCreateEvent

type OfferingCreateEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type OfferingRequestHandler

type OfferingRequestHandler interface {
	Handle(ctx context.Context, tenant, objectId string, request any, params ...map[string]any) (any, error)
	HandleWithRetry(ctx context.Context, tenant, objectId string, aggregateRequired bool, request any, params ...map[string]any) (any, error)
}

Jump to

Keyboard shortcuts

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