device

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 = "deviceEvent"

Variables

This section is empty.

Functions

func AlarmTypeValidator

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

func Build

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

func CannulaVolumeValidator

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

func PrimeTargetValidator

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

func StatusDurationValidator

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

func StatusReasonValidator

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

func StatusValidator

func StatusValidator(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

func TimeChangeAgentValidator

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

func TimeChangeReasonsValidator

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

func TubingVolumeValidator

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

Types

type Alarm

type Alarm struct {
	AlarmType *string `json:"alarmType" bson:"alarmType" valid:"devicealarmtype"`
	Status    *string `json:"status,omitempty" bson:"status,omitempty" valid:"-"`
	Base      `bson:",inline"`
}

type Base

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

type Calibration

type Calibration struct {
	Value *float64 `json:"value" bson:"value" valid:"-"`
	Units *string  `json:"units" bson:"units" valid:"-"`
	Base  `bson:",inline"`
}

type Change

type Change struct {
	From     *string  `json:"from" bson:"from" valid:"nonZuluTimeString"`
	To       *string  `json:"to" bson:"to" valid:"nonZuluTimeString"`
	Agent    *string  `json:"agent" bson:"agent" valid:"timechangeagent"`
	Timezone *string  `json:"timezone,omitempty" bson:"timezone,omitempty" valid:"-"`
	Reasons  []string `json:"reasons,omitempty" bson:"reasons,omitempty" valid:"timechangereasons"`
}

type Prime

type Prime struct {
	PrimeTarget *string  `json:"primeTarget" bson:"primeTarget" valid:"deviceprimetarget"`
	Volume      *float64 `json:"volume,omitempty" bson:"volume,omitempty" valid:"omitempty,devicevolume"`
	Base        `bson:",inline"`
}

type ReservoirChange

type ReservoirChange struct {
	Status *string `json:"status" bson:"status" valid:"omitempty,devicestatus"`
	Base   `bson:",inline"`
}

type Status

type Status struct {
	Status *string                `json:"status" bson:"status" valid:"devicestatus"`
	Reason map[string]interface{} `json:"reason" bson:"reason" valid:"devicereason"`
	//TODO: this should become required for the platform but is currently optional
	Duration *int `json:"duration,omitempty" bson:"duration,omitempty" valid:"omitempty,devicestatusduration"`
	Base     `bson:",inline"`
}

type TimeChange

type TimeChange struct {
	Change `json:"change" bson:"change"`
	Base   `bson:",inline"`
}

Jump to

Keyboard shortcuts

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