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 (*Reported) Normalize ¶
func (r *Reported) Normalize(normalizer data.Normalizer)
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 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)
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)
Click to show internal directories.
Click to hide internal directories.