Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Good ¶
type Good struct { Name string `json:"name"` Manufactured time.Time `json:"manufactured"` ExpDate time.Time `jsnon:"expdate"` ExpOpen int `json:"expopen"` }
Good struct holds the data of an item type: ID -- autogenarated Name -- Goods name Manufactured -- Goods manufactured date ExpDate -- Goods validity ExpOpen -- Goods validity if it is opened
type Item ¶
type Item struct { ID int `json:"id"` Created time.Time Good IsOpen bool `json:"isopen"` Opened time.Time `json:"opened,omitempty"` IsValid bool `json:"isvalid"` }
Item struct holds the data of the instance of the goods: ID -- autogenerated Type -- the type of product IsOpen -- True if the product is opened Opened -- The date when it was opeened IsValid -- Is the item still in validity or has expired
type Repository ¶
Repository provides access to the items storage.
type Service ¶
Service provides beer and review listing operations.
func NewService ¶
func NewService(r Repository) Service
NewService creates a listing service with the necessary dependencies
Click to show internal directories.
Click to hide internal directories.