usecase

package
v0.0.0-...-a7d4f01 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrderUseCase

type CreateOrderUseCase struct {
	OrderRepository entity.OrderRepositoryInterface
	OrderCreated    events.EventInterface
	EventDispatcher events.EventDispatcherInterface
}

func NewCreateOrderUseCase

func NewCreateOrderUseCase(
	OrderRepository entity.OrderRepositoryInterface,
	OrderCreated events.EventInterface,
	EventDispatcher events.EventDispatcherInterface,
) *CreateOrderUseCase

func (*CreateOrderUseCase) Execute

type ListOrdersOutputDTO

type ListOrdersOutputDTO []entity.Order

type ListOrdersUseCase

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

func NewListOrdersUseCase

func NewListOrdersUseCase(repository entity.OrderRepositoryInterface) *ListOrdersUseCase

func (*ListOrdersUseCase) Execute

func (uc *ListOrdersUseCase) Execute() (ListOrdersOutputDTO, error)

type OrderInputDTO

type OrderInputDTO struct {
	ID    string  `json:"id"`
	Price float64 `json:"price"`
	Tax   float64 `json:"tax"`
}

type OrderOutputDTO

type OrderOutputDTO struct {
	ID         string  `json:"id"`
	Price      float64 `json:"price"`
	Tax        float64 `json:"tax"`
	FinalPrice float64 `json:"final_price"`
}

Jump to

Keyboard shortcuts

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