pump

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "pumpSettings"

Variables

This section is empty.

Functions

func StartValidator

func StartValidator(v *validator.Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool

Types

type BasalSchedule

type BasalSchedule struct {
	Rate  *float64 `json:"rate" bson:"rate" valid:"required"`
	Start *int     `json:"start" bson:"start" valid:"startrange"`
}

type BloodGlucoseTarget

type BloodGlucoseTarget struct {
	Low   *float64 `json:"low" bson:"low" valid:"bloodglucosevalue"`
	High  *float64 `json:"high" bson:"high" valid:"bloodglucosevalue"`
	Start *int     `json:"start" bson:"start" valid:"startrange"`
}

type CarbohydrateRatio

type CarbohydrateRatio struct {
	Amount *float64 `json:"amount" bson:"amount" valid:"required"`
	Start  *int     `json:"start" bson:"start" valid:"startrange"`
}

type CarbohydrateRatios

type CarbohydrateRatios []CarbohydrateRatio

type InsulinSensitivity

type InsulinSensitivity struct {
	Amount *float64 `json:"amount" bson:"amount" valid:"required"`
	Start  *int     `json:"start" bson:"start" valid:"startrange"`
}

type Settings

type Settings struct {
	*Units               `json:"units,omitempty" bson:"units,omitempty"`
	BasalSchedules       map[string][]*BasalSchedule `json:"basalSchedules,omitempty" bson:"basalSchedules,omitempty"`
	CarbohydrateRatios   `json:"carbRatio,omitempty" bson:"carbRatio,omitempty"`
	InsulinSensitivities []*InsulinSensitivity `json:"insulinSensitivity,omitempty" bson:"insulinSensitivity,omitempty"`
	BloodGlucoseTargets  []*BloodGlucoseTarget `json:"bgTarget,omitempty" bson:"bgTarget,omitempty"`

	ActiveSchedule *string `json:"activeSchedule" bson:"activeSchedule" valid:"required"`
	types.Base     `bson:",inline"`
}

func Build

func Build(datum types.Datum, errs validate.ErrorProcessing) *Settings

type Units

type Units struct {
	Carbohydrate *string `json:"carb" bson:"carb" valid:"required"`
	BloodGlucose *string `json:"bg" bson:"bg" valid:"mmolmgunits"`
}

Jump to

Keyboard shortcuts

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