Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrItemNotFound is the error returned when the specified item cannot be found. ErrItemNotFound = errors.New("item not found") )
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { ID string Name string Description string Price float64 // contains filtered or unexported fields }
Item defines the domain model of an Item. This is the struct that will be used for all business logic. The struct has no annotations because the way the model is rendered to some medium such as an HTTP response, database, queue, etc. should be completely independent of the actual struct used by the business logic functions. The way the item is rendered should be left up to the package performing the rendering.
Click to show internal directories.
Click to hide internal directories.