Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProductNotFound = errors.New("product not found")
Functions ¶
func NewInMemory ¶
func NewInMemory() *inMemory
func NewPostgres ¶
func NewProductBuilder ¶
func NewProductBuilder() productBuilder
Types ¶
type Product ¶
type Product struct {
// contains filtered or unexported fields
}
Product is an entity that represents a single product visable in the product catalog
func NewProduct ¶
func (Product) Description ¶
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *sql.DB) (application.BoundedContext, ProductService)
func NewProductService ¶
func NewProductService(s ProductStorage) ProductService
func (ProductService) AllProducts ¶
func (ps ProductService) AllProducts(ctx context.Context) ([]Product, error)
Click to show internal directories.
Click to hide internal directories.