Documentation ¶
Index ¶
- Variables
- type Area
- type AreaUnit
- func (t AreaUnit) MarshalJSON() ([]byte, error)
- func (t AreaUnit) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (t AreaUnit) MarshalYAML() (interface{}, error)
- func (t *AreaUnit) Scan(value interface{}) error
- func (t AreaUnit) String() string
- func (t *AreaUnit) UnmarshalJSON(data []byte) error
- func (t *AreaUnit) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (t *AreaUnit) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (t AreaUnit) Value() (driver.Value, error)
- type Dimensions
- type Electrical
- type ImperialLengthUnit
- func (t ImperialLengthUnit) MarshalJSON() ([]byte, error)
- func (t ImperialLengthUnit) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (t ImperialLengthUnit) MarshalYAML() (interface{}, error)
- func (t *ImperialLengthUnit) Scan(value interface{}) error
- func (t ImperialLengthUnit) String() string
- func (t *ImperialLengthUnit) UnmarshalJSON(data []byte) error
- func (t *ImperialLengthUnit) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (t *ImperialLengthUnit) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (t ImperialLengthUnit) Value() (driver.Value, error)
- type ImperialMassUnit
- func (t ImperialMassUnit) MarshalJSON() ([]byte, error)
- func (t ImperialMassUnit) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (t ImperialMassUnit) MarshalYAML() (interface{}, error)
- func (t *ImperialMassUnit) Scan(value interface{}) error
- func (t ImperialMassUnit) String() string
- func (t *ImperialMassUnit) UnmarshalJSON(data []byte) error
- func (t *ImperialMassUnit) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (t *ImperialMassUnit) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (t ImperialMassUnit) Value() (driver.Value, error)
- type Length
- type Mass
- type MeasurementFormatType
- func (t MeasurementFormatType) MarshalJSON() ([]byte, error)
- func (t MeasurementFormatType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (t MeasurementFormatType) MarshalYAML() (interface{}, error)
- func (t *MeasurementFormatType) Scan(value interface{}) error
- func (t MeasurementFormatType) String() string
- func (t *MeasurementFormatType) UnmarshalJSON(data []byte) error
- func (t *MeasurementFormatType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (t *MeasurementFormatType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (t MeasurementFormatType) Value() (driver.Value, error)
- type MeasurementSystem
- func (t MeasurementSystem) MarshalJSON() ([]byte, error)
- func (t MeasurementSystem) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (t MeasurementSystem) MarshalYAML() (interface{}, error)
- func (t *MeasurementSystem) Scan(value interface{}) error
- func (t MeasurementSystem) String() string
- func (t *MeasurementSystem) UnmarshalJSON(data []byte) error
- func (t *MeasurementSystem) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (t *MeasurementSystem) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (t MeasurementSystem) Value() (driver.Value, error)
- type MetricUnit
- func (t MetricUnit) MarshalJSON() ([]byte, error)
- func (t MetricUnit) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (t MetricUnit) MarshalYAML() (interface{}, error)
- func (t *MetricUnit) Scan(value interface{}) error
- func (t MetricUnit) String() string
- func (t *MetricUnit) UnmarshalJSON(data []byte) error
- func (t *MetricUnit) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (t *MetricUnit) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (t MetricUnit) Value() (driver.Value, error)
- type RectangleArea
- type SquareArea
- type Weight
Constants ¶
This section is empty.
Variables ¶
View Source
var AreaUnits = areaUnits{ Err: errorer.New("invalid AreaUnit"), Invalid: AreaUnit("invalid"), SquareMile: AreaUnit("square-mile"), Acre: AreaUnit("acre"), Rood: AreaUnit("rood"), SquareYard: AreaUnit("square-yard"), SquareFoot: AreaUnit("square-foot"), SquareInch: AreaUnit("square-inch"), }
View Source
var ImperialAreas = imperialAreas{ // contains filtered or unexported fields }
View Source
var ImperialLengthUnits = imperialLengthUnits{ Err: errorer.New("invalid ImperialLengthUnit"), Invalid: ImperialLengthUnit("invalid"), Twip: ImperialLengthUnit("twip"), Thou: ImperialLengthUnit("thou"), Barleycorn: ImperialLengthUnit("barleycorn"), Inch: ImperialLengthUnit("inch"), Hand: ImperialLengthUnit("hand"), Foot: ImperialLengthUnit("foot"), Yard: ImperialLengthUnit("yard"), Chain: ImperialLengthUnit("chain"), Furlong: ImperialLengthUnit("furlong"), Mile: ImperialLengthUnit("mile"), League: ImperialLengthUnit("league"), Fathom: ImperialLengthUnit("fathom"), Cable: ImperialLengthUnit("cable"), NauticalMile: ImperialLengthUnit("nautical-mile"), Link: ImperialLengthUnit("link"), Rod: ImperialLengthUnit("rod"), }
View Source
var ImperialMassUnits = imperialMassUnits{ Err: errorer.New("invalid ImperialMassUnit"), Invalid: ImperialMassUnit("invalid"), Grain: ImperialMassUnit("grain"), PennyWeight: ImperialMassUnit("penny-weight"), Scruple: ImperialMassUnit("scruple"), Drachm: ImperialMassUnit("drachm"), Ounce: ImperialMassUnit("ounce"), OunceApothecaries: ImperialMassUnit("ounce-apothecaries"), Pound: ImperialMassUnit("pound"), Dram: ImperialMassUnit("dram"), Stone: ImperialMassUnit("stone"), Quarter: ImperialMassUnit("quarter"), Cental: ImperialMassUnit("cental"), HundredWeight: ImperialMassUnit("hundred-weight"), Ton: ImperialMassUnit("ton"), MetricTon: ImperialMassUnit("metric-ton"), Quintal: ImperialMassUnit("quintal"), Slug: ImperialMassUnit("slug"), }
View Source
var MeasurementFormatTypes = measurementFormatTypes{ Err: errorer.New("invalid MeasurementFormatType"), Invalid: MeasurementFormatType("invalid"), Full: MeasurementFormatType("full"), Abbreviation: MeasurementFormatType("abbreviation"), }
View Source
var MeasurementSystems = measurementSystems{ Err: errorer.New("invalid MeasurementSystem"), Invalid: MeasurementSystem("invalid"), Metric: MeasurementSystem("metric"), Imperial: MeasurementSystem("imperial"), Unitless: MeasurementSystem("unitless"), }
View Source
var MetricUnits = metricUnits{ Err: errorer.New("invalid MetricUnit"), Invalid: MetricUnit("invalid"), Tera: MetricUnit("tera"), Giga: MetricUnit("giga"), Mega: MetricUnit("mega"), Kilo: MetricUnit("kilo"), Hecto: MetricUnit("hecto"), Deca: MetricUnit("deca"), Unit: MetricUnit("unit"), Deci: MetricUnit("deci"), Centi: MetricUnit("centi"), Milli: MetricUnit("milli"), Micro: MetricUnit("micro"), Nano: MetricUnit("nano"), Pico: MetricUnit("pico"), }
Functions ¶
This section is empty.
Types ¶
type AreaUnit ¶ added in v1.0.31
type AreaUnit string
func (AreaUnit) MarshalJSON ¶ added in v1.0.31
func (AreaUnit) MarshalXML ¶ added in v1.0.31
func (AreaUnit) MarshalYAML ¶ added in v1.0.31
func (*AreaUnit) UnmarshalJSON ¶ added in v1.0.31
func (*AreaUnit) UnmarshalXML ¶ added in v1.0.31
func (*AreaUnit) UnmarshalYAML ¶ added in v1.0.31
type Dimensions ¶
type Electrical ¶
type ImperialLengthUnit ¶
type ImperialLengthUnit string
func (ImperialLengthUnit) MarshalJSON ¶
func (t ImperialLengthUnit) MarshalJSON() ([]byte, error)
func (ImperialLengthUnit) MarshalXML ¶ added in v1.0.31
func (t ImperialLengthUnit) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (ImperialLengthUnit) MarshalYAML ¶
func (t ImperialLengthUnit) MarshalYAML() (interface{}, error)
func (*ImperialLengthUnit) Scan ¶
func (t *ImperialLengthUnit) Scan(value interface{}) error
func (ImperialLengthUnit) String ¶
func (t ImperialLengthUnit) String() string
func (*ImperialLengthUnit) UnmarshalJSON ¶
func (t *ImperialLengthUnit) UnmarshalJSON(data []byte) error
func (*ImperialLengthUnit) UnmarshalXML ¶ added in v1.0.31
func (t *ImperialLengthUnit) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
func (*ImperialLengthUnit) UnmarshalYAML ¶
func (t *ImperialLengthUnit) UnmarshalYAML(unmarshal func(interface{}) error) error
type ImperialMassUnit ¶ added in v1.0.31
type ImperialMassUnit string
func (ImperialMassUnit) MarshalJSON ¶ added in v1.0.31
func (t ImperialMassUnit) MarshalJSON() ([]byte, error)
func (ImperialMassUnit) MarshalXML ¶ added in v1.0.31
func (t ImperialMassUnit) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (ImperialMassUnit) MarshalYAML ¶ added in v1.0.31
func (t ImperialMassUnit) MarshalYAML() (interface{}, error)
func (*ImperialMassUnit) Scan ¶ added in v1.0.31
func (t *ImperialMassUnit) Scan(value interface{}) error
func (ImperialMassUnit) String ¶ added in v1.0.31
func (t ImperialMassUnit) String() string
func (*ImperialMassUnit) UnmarshalJSON ¶ added in v1.0.31
func (t *ImperialMassUnit) UnmarshalJSON(data []byte) error
func (*ImperialMassUnit) UnmarshalXML ¶ added in v1.0.31
func (t *ImperialMassUnit) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
func (*ImperialMassUnit) UnmarshalYAML ¶ added in v1.0.31
func (t *ImperialMassUnit) UnmarshalYAML(unmarshal func(interface{}) error) error
type Length ¶
type Length struct { Number rational.Rational `json:"unit,omelempty"` System MeasurementSystem `json:"system,omitempty"` Format MeasurementFormatType `json:"format,omitempty"` }
type Mass ¶ added in v1.0.31
type Mass struct { Value rational.Rational `json:"value,omitempty"` System MeasurementSystem `json:"system,omitempty"` Unit ImperialMassUnit `json:"unit,omitempty"` Format MeasurementFormatType `json:"format,omitempty"` }
type MeasurementFormatType ¶
type MeasurementFormatType string
func (MeasurementFormatType) MarshalJSON ¶
func (t MeasurementFormatType) MarshalJSON() ([]byte, error)
func (MeasurementFormatType) MarshalXML ¶ added in v1.0.31
func (t MeasurementFormatType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (MeasurementFormatType) MarshalYAML ¶
func (t MeasurementFormatType) MarshalYAML() (interface{}, error)
func (*MeasurementFormatType) Scan ¶
func (t *MeasurementFormatType) Scan(value interface{}) error
func (MeasurementFormatType) String ¶
func (t MeasurementFormatType) String() string
func (*MeasurementFormatType) UnmarshalJSON ¶
func (t *MeasurementFormatType) UnmarshalJSON(data []byte) error
func (*MeasurementFormatType) UnmarshalXML ¶ added in v1.0.31
func (t *MeasurementFormatType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
func (*MeasurementFormatType) UnmarshalYAML ¶
func (t *MeasurementFormatType) UnmarshalYAML(unmarshal func(interface{}) error) error
type MeasurementSystem ¶
type MeasurementSystem string
func (MeasurementSystem) MarshalJSON ¶
func (t MeasurementSystem) MarshalJSON() ([]byte, error)
func (MeasurementSystem) MarshalXML ¶ added in v1.0.31
func (t MeasurementSystem) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (MeasurementSystem) MarshalYAML ¶
func (t MeasurementSystem) MarshalYAML() (interface{}, error)
func (*MeasurementSystem) Scan ¶
func (t *MeasurementSystem) Scan(value interface{}) error
func (MeasurementSystem) String ¶
func (t MeasurementSystem) String() string
func (*MeasurementSystem) UnmarshalJSON ¶
func (t *MeasurementSystem) UnmarshalJSON(data []byte) error
func (*MeasurementSystem) UnmarshalXML ¶ added in v1.0.31
func (t *MeasurementSystem) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
func (*MeasurementSystem) UnmarshalYAML ¶
func (t *MeasurementSystem) UnmarshalYAML(unmarshal func(interface{}) error) error
type MetricUnit ¶
type MetricUnit string
func (MetricUnit) MarshalJSON ¶
func (t MetricUnit) MarshalJSON() ([]byte, error)
func (MetricUnit) MarshalXML ¶ added in v1.0.31
func (t MetricUnit) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (MetricUnit) MarshalYAML ¶
func (t MetricUnit) MarshalYAML() (interface{}, error)
func (*MetricUnit) Scan ¶
func (t *MetricUnit) Scan(value interface{}) error
func (MetricUnit) String ¶
func (t MetricUnit) String() string
func (*MetricUnit) UnmarshalJSON ¶
func (t *MetricUnit) UnmarshalJSON(data []byte) error
func (*MetricUnit) UnmarshalXML ¶ added in v1.0.31
func (t *MetricUnit) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
func (*MetricUnit) UnmarshalYAML ¶
func (t *MetricUnit) UnmarshalYAML(unmarshal func(interface{}) error) error
type RectangleArea ¶ added in v1.0.31
type SquareArea ¶ added in v1.0.31
type SquareArea struct {
Side Length `json:"size,omitempty"`
}
func (SquareArea) Size ¶ added in v1.0.31
func (t SquareArea) Size()
type Weight ¶ added in v1.0.31
type Weight struct { Unit rational.Rational `json:"unit,omitempty"` System MeasurementSystem `json:"system,omitempty"` Format MeasurementFormatType `json:"format,omitempty"` }
Source Files ¶
- apothecaries-weight.go
- area-unit.enum.go
- area.go
- avoirdupois-weight.go
- capacity.go
- dimension.go
- electric.go
- electrical.go
- enums.go
- imperial-length-unit.enum.go
- imperial-length.go
- imperial-mass-unit.enum.go
- imperial-mass.go
- length.go
- light.go
- mass.go
- measurement-format-type.enum.go
- measurement-system.enum.go
- measurement-system.go
- metric-unit.enum.go
- metric-unit.go
- time.go
- troy-weight.go
- volume.go
- weight.go
Click to show internal directories.
Click to hide internal directories.