insulin

package
v1.20.1-dexcom-api-val... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2017 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnitsUnits = "units"

	TotalMinimum = 0
	TotalMaximum = 100
)

Variables

This section is empty.

Functions

func NewDatum

func NewDatum() data.Datum

func Type

func Type() string

Types

type Dose

type Dose struct {
	Total *float64 `json:"total,omitempty" bson:"total,omitempty"`
	Units *string  `json:"units,omitempty" bson:"units,omitempty"`
}

func NewDose

func NewDose() *Dose

func ParseDose

func ParseDose(parser data.ObjectParser) *Dose

func (*Dose) Normalize

func (d *Dose) Normalize(normalizer data.Normalizer)

func (*Dose) Parse

func (d *Dose) Parse(parser data.ObjectParser)

func (*Dose) Validate

func (d *Dose) Validate(validator data.Validator)

type Insulin

type Insulin struct {
	types.Base `bson:",inline"`

	Dose *Dose `json:"dose,omitempty" bson:"dose,omitempty"`
}

func Init

func Init() *Insulin

func New

func New() *Insulin

func (*Insulin) Init

func (i *Insulin) Init()

func (*Insulin) Normalize

func (i *Insulin) Normalize(normalizer data.Normalizer) error

func (*Insulin) Parse

func (i *Insulin) Parse(parser data.ObjectParser) error

func (*Insulin) Validate

func (i *Insulin) Validate(validator data.Validator) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL