insulin

package
v1.24.0-basal-automated.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TotalMaximum = 100.0
	TotalMinimum = 0.0
	UnitsUnits   = "units"
)

Variables

This section is empty.

Functions

func NewDatum

func NewDatum() data.Datum

func Type

func Type() string

func Units added in v1.24.0

func Units() []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 structure.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)

func (*Insulin) Parse

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

func (*Insulin) Validate

func (i *Insulin) Validate(validator structure.Validator)

Jump to

Keyboard shortcuts

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