query

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProductResourceNotFound = errors.NewResourceNotFoundError("err.product.queryById.notFound", "resource not found")
)

Functions

This section is empty.

Types

type GetProductByIDHandler

type GetProductByIDHandler interface {
	Handle(ctx context.Context, id string) (Product, error)
}

type GetProductByIDHandlerImpl

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

func NewGetProductByIDHandlerImpl

func NewGetProductByIDHandlerImpl(projector ProductReadModelProjector) *GetProductByIDHandlerImpl

func (GetProductByIDHandlerImpl) Handle

type Product

type Product struct {
	ID       string
	Name     string
	Category string
	Variants []Variant
}

type ProductReadModelProjector

type ProductReadModelProjector interface {
	LoadById(ctx context.Context, id string) (Product, error)
}

type Variant

type Variant struct {
	ID    string
	Code  string
	Name  string
	Price float64
}

Jump to

Keyboard shortcuts

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