bolus

package
v0.0.1-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Name = "bolus"

Variables

View Source
var (
	BolusSubTypeField = types.DatumFieldInformation{
		DatumField: &types.DatumField{Name: "subType"},
		Tag:        "bolussubtype",
		Message:    "Must be one of normal, square, dual/square",
		Allowed:    types.Allowed{"normal": true, "square": true, "dual/square": true},
	}

	SubTypeField = types.DatumFieldInformation{
		DatumField: &types.DatumField{Name: "subType"},
		Tag:        "bolussubtype",
		Message:    "Must be one of normal, square, dual/square",
		Allowed:    types.Allowed{"normal": true, "square": true, "dual/square": true},
	}
)

Functions

func Build

func Build(datum types.Datum, errs validate.ErrorProcessing) interface{}

func DurationValidator

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

func ExtendedValidator

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

func NormalValidator

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

func SubTypeValidator

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

Types

type Base

type Base struct {
	SubType    *string `json:"subType" bson:"subType" valid:"bolussubtype"`
	types.Base `bson:",inline"`
}

type Combo

type Combo struct {
	Normal   *float64 `json:"normal" bson:"normal" valid:"bolusnormal"`
	Extended *float64 `json:"extended" bson:"extended" valid:"bolusextended"`
	Duration *int     `json:"duration" bson:"duration" valid:"bolusduration"`
	Base     `bson:",inline"`
}

type Extended

type Extended struct {
	Extended *float64 `json:"extended" bson:"extended" valid:"bolusextended"`
	Duration *int     `json:"duration" bson:"duration" valid:"bolusduration"`
	Base     `bson:",inline"`
}

type Normal

type Normal struct {
	Normal *float64 `json:"normal" bson:"normal" valid:"bolusnormal"`
	Base   `bson:",inline"`
}

Jump to

Keyboard shortcuts

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