Documentation ¶
Index ¶
Constants ¶
View Source
const ( DISABLED = "disabled" ENABLED = "enabled" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IProductPersistence ¶
type IProductPersistence interface { IProductReader IProductWriter }
type IProductReader ¶
type IProductService ¶
type IProductWriter ¶
type Product ¶
type Product struct { ID string `valid:"uuidv4"` Name string `valid:"required"` Price float64 `valid:"float,optional"` Status string `valid:"required"` }
func NewProduct ¶
func NewProduct() *Product
type ProductService ¶
type ProductService struct {
Persistence IProductPersistence
}
func NewProductService ¶
func NewProductService(persistence IProductPersistence) *ProductService
func (*ProductService) Create ¶
func (s *ProductService) Create(name string, price float64) (IProduct, error)
Click to show internal directories.
Click to hide internal directories.