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(orders domain.OrderRepository, customers domain.CustomerRepository, payments domain.PaymentRepository,
	shopping domain.ShoppingRepository, domainPublisher ddd.EventPublisher,
) *Application

type Commands

type Commands interface {
	CreateOrder(ctx context.Context, cmd commands.CreateOrder) error
	CancelOrder(ctx context.Context, cmd commands.CancelOrder) error
	ReadyOrder(ctx context.Context, cmd commands.ReadyOrder) error
	CompleteOrder(ctx context.Context, cmd commands.CompleteOrder) error
}

type DomainEventHandlers

type DomainEventHandlers interface {
	OnOrderCreated(ctx context.Context, event ddd.Event) error
	OnOrderReadied(ctx context.Context, event ddd.Event) error
	OnOrderCanceled(ctx context.Context, event ddd.Event) error
	OnOrderCompleted(ctx context.Context, event ddd.Event) error
}

type InvoiceHandlers

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

func NewInvoiceHandlers

func NewInvoiceHandlers(invoices domain.InvoiceRepository) *InvoiceHandlers

func (InvoiceHandlers) OnOrderCanceled

func (InvoiceHandlers) OnOrderCanceled(ctx context.Context, event ddd.Event) error

func (InvoiceHandlers) OnOrderCompleted

func (InvoiceHandlers) OnOrderCompleted(ctx context.Context, event ddd.Event) error

func (InvoiceHandlers) OnOrderCreated

func (InvoiceHandlers) OnOrderCreated(ctx context.Context, event ddd.Event) error

func (InvoiceHandlers) OnOrderReadied

func (h InvoiceHandlers) OnOrderReadied(ctx context.Context, event ddd.Event) error

type NotificationHandlers

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

func NewNotificationHandlers

func NewNotificationHandlers(notifications domain.NotificationRepository) *NotificationHandlers

func (NotificationHandlers) OnOrderCanceled

func (h NotificationHandlers) OnOrderCanceled(ctx context.Context, event ddd.Event) error

func (NotificationHandlers) OnOrderCompleted

func (NotificationHandlers) OnOrderCompleted(ctx context.Context, event ddd.Event) error

func (NotificationHandlers) OnOrderCreated

func (h NotificationHandlers) OnOrderCreated(ctx context.Context, event ddd.Event) error

func (NotificationHandlers) OnOrderReadied

func (h NotificationHandlers) OnOrderReadied(ctx context.Context, event ddd.Event) error

type Queries

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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