query

package
v0.0.0-...-0c44e78 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 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 CheckItem

type CheckItem struct {
	ProductID uint64
	Quantity  uint64
}

type CheckProducts

type CheckProducts struct {
	Items *[]CheckItem
}

type CheckProductsHandler

type CheckProductsHandler QueryHandler[CheckProducts, *[]valueobject.ProductStatus]

func NewCheckProductsHandler

func NewCheckProductsHandler(logger logger.Logger, productRepo domain.ProductRepository) CheckProductsHandler

type GetProducts

type GetProducts struct {
	ProductIDs *[]uint64
}

type GetProductsHandler

type GetProductsHandler QueryHandler[GetProducts, *[]entity.Product]

func NewGetProductsHandler

func NewGetProductsHandler(logger logger.Logger, productRepo domain.ProductRepository) GetProductsHandler

type ListProducts

type ListProducts struct {
	Limit  uint64
	Offset uint64
}

type ListProductsHandler

type ListProductsHandler QueryHandler[ListProducts, *[]valueobject.ProductCatalog]

func NewListProductsHandler

func NewListProductsHandler(logger logger.Logger, productRepo domain.ProductRepository) ListProductsHandler

type QueryHandler

type QueryHandler[Q any, R any] interface {
	Handle(ctx context.Context, query Q) (R, error)
}

Jump to

Keyboard shortcuts

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