dexcom

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlertFixedLow   = "fixedLow"
	AlertLow        = "low"
	AlertHigh       = "high"
	AlertRise       = "rise"
	AlertFall       = "fall"
	AlertOutOfRange = "outOfRange"

	EventCarbs    = "carbs"
	EventExercise = "exercise"
	EventHealth   = "health"
	EventInsulin  = "insulin"

	ExerciseLight  = "light"
	ExerciseMedium = "medium"
	ExerciseHeavy  = "heavy"

	HealthIllness      = "illness"
	HealthStress       = "stress"
	HealthHighSymptoms = "highSymptoms"
	HealthLowSymptoms  = "lowSymptoms"
	HealthCycle        = "cycle"
	HealthAlcohol      = "alcohol"

	ModelG5MobileApp         = "G5 Mobile App"
	ModelG5Receiver          = "G5 Receiver"
	ModelG4WithShareReceiver = "G4 with Share Receiver"
	ModelG4Receiver          = "G4 Receiver"

	StatusHigh             = "high"
	StatusLow              = "low"
	StatusOK               = "ok"
	StatusOutOfCalibration = "outOfCalibration"
	StatusSensorNoise      = "sensorNoise"

	TrendDoubleUp       = "doubleUp"
	TrendSingleUp       = "singleUp"
	TrendFortyFiveUp    = "fortyFiveUp"
	TrendFlat           = "flat"
	TrendFortyFiveDown  = "fortyFiveDown"
	TrendSingleDown     = "singleDown"
	TrendDoubleDown     = "doubleDown"
	TrendNone           = "none"
	TrendNotComputable  = "notComputable"
	TrendRateOutOfRange = "rateOutOfRange"

	UnitMinutes = "minutes"
	UnitGrams   = "grams"
	UnitUnits   = "units"

	UnitMgdL     = "mg/dL"
	UnitMmolL    = "mmol/L"
	UnitMgdLMin  = "mg/dL/min"
	UnitMmolLMin = "mmol/L/min"

	EGVValueMinMgdL = 40
	EGVValueMaxMgdL = 400

	DeviceIDMultiple           = "multiple"
	DeviceIDUnknown            = "unknown"
	DeviceModelMultiple        = "multiple"
	DeviceSerialNumberMultiple = "multiple"

	DateTimeFormat = "2006-01-02T15:04:05"
	NowThreshold   = 24 * time.Hour

	TransmitterIDExpressionString = "^[0-9A-Z]{5,6}$"
)

Variables

Functions

This section is empty.

Types

type AlertSetting

type AlertSetting struct {
	SystemTime  time.Time `json:"systemTime,omitempty"`
	DisplayTime time.Time `json:"displayTime,omitempty"`
	AlertName   string    `json:"alertName,omitempty"`
	Unit        string    `json:"unit,omitempty"`
	Value       float64   `json:"value,omitempty"`
	Delay       int       `json:"delay,omitempty"`
	Snooze      int       `json:"snooze,omitempty"`
	Enabled     bool      `json:"enabled,omitempty"`
}

func NewAlertSetting

func NewAlertSetting() *AlertSetting

func (*AlertSetting) Parse

func (a *AlertSetting) Parse(parser structure.ObjectParser)

func (*AlertSetting) Validate

func (a *AlertSetting) Validate(validator structure.Validator, existingAlertNames *[]string)

type Calibration

type Calibration struct {
	SystemTime    time.Time `json:"systemTime,omitempty"`
	DisplayTime   time.Time `json:"displayTime,omitempty"`
	Unit          string    `json:"unit,omitempty"`
	Value         float64   `json:"value,omitempty"`
	TransmitterID *string   `json:"transmitterId,omitempty"`
}

func NewCalibration

func NewCalibration() *Calibration

func (*Calibration) Parse

func (c *Calibration) Parse(parser structure.ObjectParser)

func (*Calibration) Validate

func (c *Calibration) Validate(validator structure.Validator)

type CalibrationsResponse

type CalibrationsResponse struct {
	Calibrations []*Calibration `json:"calibrations,omitempty"`
}

func NewCalibrationsResponse

func NewCalibrationsResponse() *CalibrationsResponse

func (*CalibrationsResponse) Parse

func (c *CalibrationsResponse) Parse(parser structure.ObjectParser)

func (*CalibrationsResponse) Validate

func (c *CalibrationsResponse) Validate(validator structure.Validator)

type Client

type Client interface {
	GetCalibrations(ctx context.Context, startTime time.Time, endTime time.Time, tokenSource oauth.TokenSource) (*CalibrationsResponse, error)
	GetDevices(ctx context.Context, startTime time.Time, endTime time.Time, tokenSource oauth.TokenSource) (*DevicesResponse, error)
	GetEGVs(ctx context.Context, startTime time.Time, endTime time.Time, tokenSource oauth.TokenSource) (*EGVsResponse, error)
	GetEvents(ctx context.Context, startTime time.Time, endTime time.Time, tokenSource oauth.TokenSource) (*EventsResponse, error)
}

type Device

type Device struct {
	Model             string          `json:"model,omitempty"`
	LastUploadDate    time.Time       `json:"lastUploadDate,omitempty"`
	AlertSettings     []*AlertSetting `json:"alertSettings,omitempty"`
	UDI               *string         `json:"udi,omitempty"`
	SerialNumber      *string         `json:"serialNumber,omitempty"`
	TransmitterID     *string         `json:"transmitterId,omitempty"`
	SoftwareVersion   *string         `json:"softwareVersion,omitempty"`
	SoftwareNumber    *string         `json:"softwareNumber,omitempty"`
	Language          *string         `json:"language,omitempty"`
	IsMmolDisplayMode *bool           `json:"isMmolDisplayMode,omitempty"`
	IsBlindedMode     *bool           `json:"isBlindedMode,omitempty"`
	Is24HourMode      *bool           `json:"is24HourMode,omitempty"`
	DisplayTimeOffset *int            `json:"displayTimeOffset,omitempty"`
	SystemTimeOffset  *int            `json:"systemTimeOffset,omitempty"`
}

func NewDevice

func NewDevice() *Device

func (*Device) Parse

func (d *Device) Parse(parser structure.ObjectParser)

func (*Device) Validate

func (d *Device) Validate(validator structure.Validator)

type DevicesResponse

type DevicesResponse struct {
	Devices []*Device `json:"devices,omitempty"`
}

func NewDevicesResponse

func NewDevicesResponse() *DevicesResponse

func (*DevicesResponse) Parse

func (d *DevicesResponse) Parse(parser structure.ObjectParser)

func (*DevicesResponse) Validate

func (d *DevicesResponse) Validate(validator structure.Validator)

type EGV

type EGV struct {
	SystemTime       time.Time `json:"systemTime,omitempty"`
	DisplayTime      time.Time `json:"displayTime,omitempty"`
	Unit             string    `json:"unit,omitempty"`
	Value            float64   `json:"value,omitempty"`
	Status           *string   `json:"status,omitempty"`
	Trend            *string   `json:"trend,omitempty"`
	TrendRate        *float64  `json:"trendRate,omitempty"`
	TransmitterID    *string   `json:"transmitterId,omitempty"`
	TransmitterTicks *int      `json:"transmitterTicks,omitempty"`
}

func NewEGV

func NewEGV(unit string) *EGV

func (*EGV) Parse

func (e *EGV) Parse(parser structure.ObjectParser)

func (*EGV) Validate

func (e *EGV) Validate(validator structure.Validator)

type EGVsResponse

type EGVsResponse struct {
	Unit     string `json:"unit,omitempty"`
	RateUnit string `json:"rateUnit,omitempty"`
	EGVs     []*EGV `json:"egvs,omitempty"`
}

func NewEGVsResponse

func NewEGVsResponse() *EGVsResponse

func (*EGVsResponse) Parse

func (e *EGVsResponse) Parse(parser structure.ObjectParser)

func (*EGVsResponse) Validate

func (e *EGVsResponse) Validate(validator structure.Validator)

type Event

type Event struct {
	SystemTime   time.Time `json:"systemTime,omitempty"`
	DisplayTime  time.Time `json:"displayTime,omitempty"`
	EventType    string    `json:"eventType,omitempty"`
	EventSubType *string   `json:"eventSubType,omitempty"`
	Unit         *string   `json:"unit,omitempty"`
	Value        *float64  `json:"value,omitempty"`
}

func NewEvent

func NewEvent() *Event

func (*Event) Parse

func (e *Event) Parse(parser structure.ObjectParser)

func (*Event) Validate

func (e *Event) Validate(validator structure.Validator)

type EventsResponse

type EventsResponse struct {
	Events []*Event `json:"events,omitempty"`
}

func NewEventsResponse

func NewEventsResponse() *EventsResponse

func (*EventsResponse) Parse

func (e *EventsResponse) Parse(parser structure.ObjectParser)

func (*EventsResponse) Validate

func (e *EventsResponse) Validate(validator structure.Validator)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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