Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnitsGrams = "grams" ValueGramsMinimum = 0 ValueGramsMaximum = 1000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Carbohydrates ¶
type Carbohydrates struct { Net *int `json:"net,omitempty" bson:"net,omitempty"` Units *string `json:"units,omitempty" bson:"units,omitempty"` }
func NewCarbohydrates ¶
func NewCarbohydrates() *Carbohydrates
func ParseCarbohydrates ¶
func ParseCarbohydrates(parser data.ObjectParser) *Carbohydrates
func (*Carbohydrates) Normalize ¶
func (c *Carbohydrates) Normalize(normalizer data.Normalizer)
func (*Carbohydrates) Parse ¶
func (c *Carbohydrates) Parse(parser data.ObjectParser)
func (*Carbohydrates) Validate ¶
func (c *Carbohydrates) Validate(validator data.Validator)
type Food ¶
type Nutrition ¶
type Nutrition struct {
Carbohydrates *Carbohydrates `json:"carbohydrates,omitempty" bson:"carbohydrates,omitempty"`
}
func NewNutrition ¶
func NewNutrition() *Nutrition
func ParseNutrition ¶
func ParseNutrition(parser data.ObjectParser) *Nutrition
func (*Nutrition) Normalize ¶
func (n *Nutrition) Normalize(normalizer data.Normalizer)
func (*Nutrition) Parse ¶
func (n *Nutrition) Parse(parser data.ObjectParser)
Click to show internal directories.
Click to hide internal directories.