application

package
v0.0.0-...-75020d2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddItem

type AddItem struct {
	ID        string
	ProductID string
	Quantity  int
}

type App

type App interface {
	StartBasket(ctx context.Context, start StartBasket) error
	CancelBasket(ctx context.Context, cancel CancelBasket) error
	CheckoutBasket(ctx context.Context, checkout CheckoutBasket) error
	AddItem(ctx context.Context, add AddItem) error
	RemoveItem(ctx context.Context, remove RemoveItem) error
	GetBasket(ctx context.Context, get GetBasket) (*domain.Basket, error)
}

type Application

type Application struct {
	// contains filtered or unexported fields
}

func (Application) AddItem

func (a Application) AddItem(ctx context.Context, add AddItem) error

func (Application) CancelBasket

func (a Application) CancelBasket(ctx context.Context, cancel CancelBasket) error

func (Application) CheckoutBasket

func (a Application) CheckoutBasket(ctx context.Context, checkout CheckoutBasket) error

func (Application) GetBasket

func (a Application) GetBasket(ctx context.Context, get GetBasket) (*domain.Basket, error)

func (Application) RemoveItem

func (a Application) RemoveItem(ctx context.Context, remove RemoveItem) error

func (Application) StartBasket

func (a Application) StartBasket(ctx context.Context, start StartBasket) error

type CancelBasket

type CancelBasket struct {
	ID string
}

type CheckoutBasket

type CheckoutBasket struct {
	ID        string
	PaymentID string
}

type GetBasket

type GetBasket struct {
	ID string
}

type OrderHandlers

type OrderHandlers[T ddd.AggregateEvent] struct {
	// contains filtered or unexported fields
}

func (OrderHandlers[T]) HandleEvent

func (h OrderHandlers[T]) HandleEvent(ctx context.Context, event T) error

type ProductHandlers

type ProductHandlers[T ddd.Event] struct {
	// contains filtered or unexported fields
}

func (ProductHandlers[T]) HandleEvent

func (h ProductHandlers[T]) HandleEvent(ctx context.Context, event T) error

type RemoveItem

type RemoveItem struct {
	ID        string
	ProductID string
	Quantity  int
}

type StartBasket

type StartBasket struct {
	ID         string
	CustomerID string
}

type StoreHandlers

type StoreHandlers[T ddd.Event] struct {
	// contains filtered or unexported fields
}

func (StoreHandlers[T]) HandleEvent

func (h StoreHandlers[T]) HandleEvent(ctx context.Context, event T) error

Jump to

Keyboard shortcuts

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