domain

package
v0.0.0-...-ffaedda Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCantStock = errors.New(`cant stock order`)

Functions

This section is empty.

Types

type ActiveStock

type ActiveStock struct {
	ID      uuid.UUID
	OrderID uuid.UUID
	Items   []string
}

func (ActiveStock) GetOrderID

func (s ActiveStock) GetOrderID() uuid.UUID

type CancelStock

type CancelStock struct {
	OrderID uuid.UUID
}

type CanceledStock

type CanceledStock struct {
	OrderID uuid.UUID
}

func (CanceledStock) GetOrderID

func (s CanceledStock) GetOrderID() uuid.UUID

type Event

type Event any

type RejectedStock

type RejectedStock struct {
	OrderID uuid.UUID
}

func (RejectedStock) GetOrderID

func (s RejectedStock) GetOrderID() uuid.UUID

type Stock

type Stock interface {
	GetOrderID() uuid.UUID
}

func Apply

func Apply(event Event) (Stock, error)

func CreateStock

func CreateStock(orderID uuid.UUID, items []string) Stock

type StockOrder

type StockOrder struct {
	OrderID uuid.UUID
	Items   []string
}

Jump to

Keyboard shortcuts

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