basal

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: 4

Documentation

Index

Constants

View Source
const Name = "basal"

Variables

This section is empty.

Functions

func Build

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

func DeliveryTypeValidator

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

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 PercentValidator

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

func RateValidator

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

func TempDurationValidator

func TempDurationValidator(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 {
	DeliveryType *string `json:"deliveryType" bson:"deliveryType" valid:"basaldeliverytype"`
	types.Base   `bson:",inline"`
}

type Scheduled

type Scheduled struct {
	ScheduleName *string  `json:"scheduleName,omitempty" bson:"scheduleName,omitempty"`
	Duration     *int     `json:"duration" bson:"duration" valid:"basalduration"`
	Rate         *float64 `json:"rate" bson:"rate" valid:"basalrate"`

	Base `bson:",inline"`
}

type Suppressed

type Suppressed struct {
	DeliveryType *string  `json:"deliveryType" bson:"deliveryType" valid:"basaldeliverytype"`
	ScheduleName *string  `json:"scheduleName" bson:"scheduleName" valid:"omitempty,required"`
	Rate         *float64 `json:"rate" bson:"rate" valid:"basalrate"`
}

type Suspend

type Suspend struct {
	Suppressed *Suppressed `json:"suppressed,omitempty" bson:"suppressed,omitempty" valid:"-"`
	Base       `bson:",inline"`
}

type Temporary

type Temporary struct {
	Rate         *float64    `json:"rate" bson:"rate" valid:"basalrate"`
	TempDuration *int        `json:"duration" bson:"duration" valid:"basaltempduration"`
	Percent      *float64    `json:"percent,omitempty" bson:"percent,omitempty" valid:"omitempty,basalpercent"`
	Suppressed   *Suppressed `json:"suppressed,omitempty" bson:"suppressed,omitempty" valid:"omitempty,required"`
	Base         `bson:",inline"`
}

Jump to

Keyboard shortcuts

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