application

package
v0.0.0-...-3a9fddd Latest Latest
Warning

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

Go to latest
Published: Nov 1, 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 App

type App interface {
	Commands
	Queries
}

type Application

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

func New

func New(shoppingLists domain.ShoppingListRepository, stores domain.StoreRepository, products domain.ProductRepository,
	domainPublisher ddd.EventPublisher,
) *Application

type Commands

type Commands interface {
	CreateShoppingList(ctx context.Context, cmd commands.CreateShoppingList) error
	CancelShoppingList(ctx context.Context, cmd commands.CancelShoppingList) error
	AssignShoppingList(ctx context.Context, cmd commands.AssignShoppingList) error
	CompleteShoppingList(ctx context.Context, cmd commands.CompleteShoppingList) error
}

type DomainEventHandlers

type DomainEventHandlers interface {
	OnShoppingListCreated(ctx context.Context, event ddd.Event) error
	OnShoppingListCanceled(ctx context.Context, event ddd.Event) error
	OnShoppingListAssigned(ctx context.Context, event ddd.Event) error
	OnShoppingListCompleted(ctx context.Context, event ddd.Event) error
}

type OrderHandlers

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

func NewOrderHandlers

func NewOrderHandlers(orders domain.OrderRepository) OrderHandlers

func (OrderHandlers) OnShoppingListAssigned

func (OrderHandlers) OnShoppingListAssigned(ctx context.Context, event ddd.Event) error

func (OrderHandlers) OnShoppingListCanceled

func (OrderHandlers) OnShoppingListCanceled(ctx context.Context, event ddd.Event) error

func (OrderHandlers) OnShoppingListCompleted

func (h OrderHandlers) OnShoppingListCompleted(ctx context.Context, event ddd.Event) error

func (OrderHandlers) OnShoppingListCreated

func (OrderHandlers) OnShoppingListCreated(ctx context.Context, event ddd.Event) error

type Queries

type Queries interface {
	GetShoppingList(ctx context.Context, query queries.GetShoppingList) (*domain.ShoppingList, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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