usecase

package
v0.0.0-...-33fb9c4 Latest Latest
Warning

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

Go to latest
Published: Oct 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 CreateOrderParams

type CreateOrderParams struct {
	CustomerID string
	OrderLine  []struct {
		CatalogItemID string
		Count         int
	}
}

type OrderDetails

type OrderDetails struct {
	Order      *entity.Order
	Customer   *entity.Customer
	OrderLines []*OrderLineDetails
}

type OrderLineDetails

type OrderLineDetails struct {
	Count       int
	CatalogItem *entity.CatalogItem
}

type OrderUseCase

type OrderUseCase interface {
	GetOrderCreationResources(ctx context.Context) ([]entity.Customer, []entity.CatalogItem, error)
	GetOrder(ctx context.Context, id string) (*OrderDetails, error)
	ListOrders(ctx context.Context) ([]*OrderDetails, error)
	CreateOrder(ctx context.Context, params *CreateOrderParams) error
	DeleteOrder(ctx context.Context, id string) error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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