reported

package
v1.30.0-dexcom-api-v2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: BSD-2-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	StateSeverityMaximum            = 10
	StateSeverityMinimum            = 0
	StateStateAlcohol               = "alcohol"
	StateStateCycle                 = "cycle"
	StateStateHyperglycemiaSymptoms = "hyperglycemiaSymptoms"
	StateStateHypoglycemiaSymptoms  = "hypoglycemiaSymptoms"
	StateStateIllness               = "illness"
	StateStateOther                 = "other"
	StateStateOtherLengthMaximum    = 100
	StateStateStress                = "stress"
)
View Source
const (
	Type = "reportedState" // TODO: Change to "state/reported"
)

Variables

This section is empty.

Functions

func StateStates added in v1.26.0

func StateStates() []string

Types

type Reported

type Reported struct {
	types.Base `bson:",inline"`

	States *StateArray `json:"states,omitempty" bson:"states,omitempty"`
}

func New

func New() *Reported

func (*Reported) Normalize

func (r *Reported) Normalize(normalizer data.Normalizer)

func (*Reported) Parse

func (r *Reported) Parse(parser data.ObjectParser) error

func (*Reported) Validate

func (r *Reported) Validate(validator structure.Validator)

type State

type State struct {
	Severity   *int    `json:"severity,omitempty" bson:"severity,omitempty"`
	State      *string `json:"state,omitempty" bson:"state,omitempty"`
	StateOther *string `json:"stateOther,omitempty" bson:"stateOther,omitempty"`
}

func NewState

func NewState() *State

func ParseState

func ParseState(parser data.ObjectParser) *State

func (*State) Normalize

func (s *State) Normalize(normalizer data.Normalizer)

func (*State) Parse

func (s *State) Parse(parser data.ObjectParser)

func (*State) Validate

func (s *State) Validate(validator structure.Validator)

type StateArray added in v1.24.0

type StateArray []*State

func NewStateArray added in v1.24.0

func NewStateArray() *StateArray

func ParseStateArray added in v1.24.0

func ParseStateArray(parser data.ArrayParser) *StateArray

func (*StateArray) Normalize added in v1.24.0

func (s *StateArray) Normalize(normalizer data.Normalizer)

func (*StateArray) Parse added in v1.24.0

func (s *StateArray) Parse(parser data.ArrayParser)

func (*StateArray) Validate added in v1.24.0

func (s *StateArray) Validate(validator structure.Validator)

Jump to

Keyboard shortcuts

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