Documentation ¶
Index ¶
Constants ¶
View Source
const ( AmountLitersPerGallon = 3.7854118 AmountOuncesPerGallon = 128.0 AmountUnitsGallons = "gallons" AmountUnitsLiters = "liters" AmountUnitsMilliliters = "milliliters" AmountUnitsOunces = "ounces" AmountValueGallonsMaximum = 10.0 AmountValueGallonsMinimum = 0.0 AmountValueLitersMaximum = AmountValueGallonsMaximum * AmountLitersPerGallon AmountValueLitersMinimum = AmountValueGallonsMinimum * AmountLitersPerGallon AmountValueMillilitersMaximum = AmountValueLitersMaximum * 1000.0 AmountValueMillilitersMinimum = AmountValueLitersMinimum * 1000.0 AmountValueOuncesMaximum = AmountValueGallonsMaximum * AmountOuncesPerGallon AmountValueOuncesMinimum = AmountValueGallonsMinimum * AmountOuncesPerGallon )
View Source
const (
Type = "water"
)
Variables ¶
This section is empty.
Functions ¶
func AmountUnits ¶
func AmountUnits() []string
Types ¶
type Amount ¶
type Amount struct { Units *string `json:"units,omitempty" bson:"units,omitempty"` Value *float64 `json:"value,omitempty" bson:"value,omitempty"` }
func ParseAmount ¶
func ParseAmount(parser data.ObjectParser) *Amount
func (*Amount) Normalize ¶
func (a *Amount) Normalize(normalizer data.Normalizer)
func (*Amount) Parse ¶
func (a *Amount) Parse(parser data.ObjectParser)
Click to show internal directories.
Click to hide internal directories.