Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepositoryCreate ¶
func NewServiceCreate ¶
func NewServiceCreate(repository Repository) *service
Types ¶
type CreateProductError ¶
type CreateProductError struct {
// contains filtered or unexported fields
}
func (*CreateProductError) Error ¶
func (e *CreateProductError) Error() string
type InputCreateProduct ¶
type InputCreateProduct struct { UserID string `json:"user_id" validate:"required"` ParentID string `json:"parent_id" validate:""` ProductImages string `json:"productImages" validate:""` Categories string `json:"categories" validate:""` Sku string `json:"sku" validate:"required"` Name string `json:"name" validate:"required"` Slug string `json:"slug" validate:"required"` Price decimal.Decimal `json:"price" validate:"required"` Stock int `json:"stock" validate:""` Weight decimal.Decimal `json:"weight" validate:""` ShortDescription string `json:"shortDescription" validate:""` Description string `json:"description" validate:""` Status int `json:"status"` }
type ProductCategoryCreationError ¶
type ProductCategoryCreationError struct {
// contains filtered or unexported fields
}
func (*ProductCategoryCreationError) Error ¶
func (e *ProductCategoryCreationError) Error() string
type Repository ¶
type Service ¶
type Service interface {
CreateProductService(input *InputCreateProduct) (*model.Product, error)
}
type UserNotFoundError ¶
type UserNotFoundError struct {
// contains filtered or unexported fields
}
Define custom error types
func (*UserNotFoundError) Error ¶
func (e *UserNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.