Documentation
¶
Overview ¶
Package dish provides services and types for Dish-related data.
Package dish provides services and types for Dish-related data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCharacteristicsNotFound = errors.New("the characteristics for the dish could not be found") ErrVariantsNotFound = errors.New("the variants for the characteristics could not be found") )
Functions ¶
This section is empty.
Types ¶
type Characteristic ¶
type Characteristic struct { ID uint64 `json:"id"` Name string `json:"name"` Multiple bool `json:"multiple"` Variants []Variant `json:"variants"` }
Characteristic is the API output for model.Characteristic.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service executes dish-related business logic and use cases. It is also responsible for accessing the model storage under consideration of all business rules.
func NewService ¶
NewService creates a new Service instance utilizing the given storage objects. The storage objects need to be ready to use for the service.
func (*Service) GetCharacteristics ¶
func (s *Service) GetCharacteristics(dishID uint64) ([]Characteristic, error)
GetCharacteristics returns all characteristics of a given dish.
Click to show internal directories.
Click to hide internal directories.