Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProduct ¶
func CreateProduct(w http.ResponseWriter, req *http.Request)
func GetProduct ¶
func GetProduct(w http.ResponseWriter, req *http.Request)
func GetProducts ¶
func GetProducts(w http.ResponseWriter, req *http.Request)
func RegisterHandlers ¶
func RegisterHandlers()
Types ¶
type BookDTO ¶
type ProductDTO ¶
type ProductDTO struct { ProductId string `` /* 132-byte string literal not displayed */ Book BookDTO `json:"book" validate:"nonzero"` Price uint64 `json:"price" validate:"min=0"` PublisherContractId string `` /* 142-byte string literal not displayed */ }
func NewProductDTO ¶
func NewProductDTO(product domain.Product) ProductDTO
func (*ProductDTO) ToDomain ¶
func (dto *ProductDTO) ToDomain() domain.Product
Click to show internal directories.
Click to hide internal directories.