Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductDto ¶
type ProductDto struct { ID string `json:"id"` Name string `json:"name"` Price float32 `json:"price"` Description string `json:"description"` Branch string `json:"branch"` Stars int32 `json:"stars"` ProductCode string `json:"productCode"` ImageUrl string `json:"imageUrl"` }
func (*ProductDto) Validate ¶
func (p *ProductDto) Validate() []val.ValidationError
type ProductService ¶
type ProductService interface { CreateProduct(ProductDto) (p.Product, error) GetProduct(string) (p.Product, error) GetByProductCode(string) (p.Product, error) ListProducts() ([]p.Product, error) DeleteProduct(string) (int64, error) }
func NewProductService ¶
func NewProductService() ProductService
Click to show internal directories.
Click to hide internal directories.