Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProductNameBlank = errors.New("Name can't be blank")
ErrProductNameBlank validation error.
Functions ¶
This section is empty.
Types ¶
type Product ¶
type Product struct { ID string `json:"id"` Name string `json:"name"` Store string `json:"store"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Product respresent a record stored in products table.
type Service ¶
type Service interface { Search(ctx context.Context, products *[]Product, filter Filter) error Create(ctx context.Context, product *Product) error Update(ctx context.Context, product *Product, changes rel.Changeset) error Delete(ctx context.Context, product *Product) }
Service instance for product's domain. Any operation done to any of object within this domain should use this service.
Click to show internal directories.
Click to hide internal directories.