Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChocolateStorage ¶
type ChocolateStorage struct {
// contains filtered or unexported fields
}
ChocolateStorage stores all of the tasty chocolate, needs to be injected into User and Chocolate Resource. In the real world, you would use a database for that.
func NewChocolateStorage ¶
func NewChocolateStorage() *ChocolateStorage
NewChocolateStorage initializes the storage
func (ChocolateStorage) GetAll ¶
func (s ChocolateStorage) GetAll() []model.Chocolate
GetAll of the chocolate
func (ChocolateStorage) GetOne ¶
func (s ChocolateStorage) GetOne(id string) (model.Chocolate, error)
GetOne tasty chocolate
type UserStorage ¶
type UserStorage struct {
// contains filtered or unexported fields
}
UserStorage stores all users
Click to show internal directories.
Click to hide internal directories.