application

package
v0.0.0-...-76fafce Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 6 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, publisher ddd.EventPublisher[ddd.Event]) *Application

type Commands

type Commands interface {
	CreateOrder(ctx context.Context, cmd commands.CreateOrder) error
	RejectOrder(ctx context.Context, cmd commands.RejectOrder) error
	ApproveOrder(ctx context.Context, cmd commands.ApproveOrder) 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 MockApp

type MockApp struct {
	mock.Mock
}

MockApp is an autogenerated mock type for the App type

func NewMockApp

func NewMockApp(t mockConstructorTestingTNewMockApp) *MockApp

NewMockApp creates a new instance of MockApp. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockApp) ApproveOrder

func (_m *MockApp) ApproveOrder(ctx context.Context, cmd commands.ApproveOrder) error

ApproveOrder provides a mock function with given fields: ctx, cmd

func (*MockApp) CancelOrder

func (_m *MockApp) CancelOrder(ctx context.Context, cmd commands.CancelOrder) error

CancelOrder provides a mock function with given fields: ctx, cmd

func (*MockApp) CompleteOrder

func (_m *MockApp) CompleteOrder(ctx context.Context, cmd commands.CompleteOrder) error

CompleteOrder provides a mock function with given fields: ctx, cmd

func (*MockApp) CreateOrder

func (_m *MockApp) CreateOrder(ctx context.Context, cmd commands.CreateOrder) error

CreateOrder provides a mock function with given fields: ctx, cmd

func (*MockApp) GetOrder

func (_m *MockApp) GetOrder(ctx context.Context, query queries.GetOrder) (*domain.Order, error)

GetOrder provides a mock function with given fields: ctx, query

func (*MockApp) ReadyOrder

func (_m *MockApp) ReadyOrder(ctx context.Context, cmd commands.ReadyOrder) error

ReadyOrder provides a mock function with given fields: ctx, cmd

func (*MockApp) RejectOrder

func (_m *MockApp) RejectOrder(ctx context.Context, cmd commands.RejectOrder) error

RejectOrder provides a mock function with given fields: ctx, cmd

type MockCommands

type MockCommands struct {
	mock.Mock
}

MockCommands is an autogenerated mock type for the Commands type

func NewMockCommands

func NewMockCommands(t mockConstructorTestingTNewMockCommands) *MockCommands

NewMockCommands creates a new instance of MockCommands. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockCommands) ApproveOrder

func (_m *MockCommands) ApproveOrder(ctx context.Context, cmd commands.ApproveOrder) error

ApproveOrder provides a mock function with given fields: ctx, cmd

func (*MockCommands) CancelOrder

func (_m *MockCommands) CancelOrder(ctx context.Context, cmd commands.CancelOrder) error

CancelOrder provides a mock function with given fields: ctx, cmd

func (*MockCommands) CompleteOrder

func (_m *MockCommands) CompleteOrder(ctx context.Context, cmd commands.CompleteOrder) error

CompleteOrder provides a mock function with given fields: ctx, cmd

func (*MockCommands) CreateOrder

func (_m *MockCommands) CreateOrder(ctx context.Context, cmd commands.CreateOrder) error

CreateOrder provides a mock function with given fields: ctx, cmd

func (*MockCommands) ReadyOrder

func (_m *MockCommands) ReadyOrder(ctx context.Context, cmd commands.ReadyOrder) error

ReadyOrder provides a mock function with given fields: ctx, cmd

func (*MockCommands) RejectOrder

func (_m *MockCommands) RejectOrder(ctx context.Context, cmd commands.RejectOrder) error

RejectOrder provides a mock function with given fields: ctx, cmd

type MockQueries

type MockQueries struct {
	mock.Mock
}

MockQueries is an autogenerated mock type for the Queries type

func NewMockQueries

func NewMockQueries(t mockConstructorTestingTNewMockQueries) *MockQueries

NewMockQueries creates a new instance of MockQueries. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockQueries) GetOrder

func (_m *MockQueries) GetOrder(ctx context.Context, query queries.GetOrder) (*domain.Order, error)

GetOrder provides a mock function with given fields: ctx, query

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