fetch

package
v1.25.0-dexcom.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: BSD-2-Clause Imports: 27 Imported by: 2

Documentation

Index

Constants

View Source
const (
	AvailableAfterDurationMaximum = 75 * time.Minute
	AvailableAfterDurationMinimum = 45 * time.Minute
	DataSetSize                   = 2000
	TaskDurationMaximum           = 5 * time.Minute
)
View Source
const DailyDuration = 24 * time.Hour
View Source
const DailyOffsets = DailyDuration / OffsetDuration
View Source
const DatasetClientName = Type
View Source
const DatasetClientVersion = "1.0.0"
View Source
const MaximumOffsets = (14 * time.Hour) / OffsetDuration // Maximum timezone offset is +14:00
View Source
const MinimumOffsets = (-12 * time.Hour) / OffsetDuration // Minimum timezone offset is -12:00
View Source
const OffsetDuration = 30 * time.Minute // Duration between timezone offsets we scan for
View Source
const Type = "org.tidepool.oauth.dexcom.fetch"

Variables

This section is empty.

Functions

func NewTaskCreate

func NewTaskCreate(providerSessionID string, dataSourceID string) (*task.TaskCreate, error)

func TaskName

func TaskName(providerSessionID string) string

Types

type BySystemTime

type BySystemTime []data.Datum

func (BySystemTime) Len

func (b BySystemTime) Len() int

func (BySystemTime) Less

func (b BySystemTime) Less(left int, right int) bool

func (BySystemTime) Swap

func (b BySystemTime) Swap(left int, right int)

type DeviceInfo

type DeviceInfo struct {
	DeviceID           string
	DeviceModel        string
	DeviceSerialNumber string
}

func NewDeviceInfo

func NewDeviceInfo() *DeviceInfo

func NewDeviceInfoFromDataSet

func NewDeviceInfoFromDataSet(dataSet *data.DataSet) (*DeviceInfo, error)

func NewDeviceInfoFromDevice

func NewDeviceInfoFromDevice(device *dexcom.Device) (*DeviceInfo, error)

func NewDeviceInfoFromMultiple added in v1.20.2

func NewDeviceInfoFromMultiple() *DeviceInfo

func (*DeviceInfo) IsDeviceModelG5Mobile added in v1.25.0

func (d *DeviceInfo) IsDeviceModelG5Mobile() bool

func (*DeviceInfo) IsDeviceModelUnknown added in v1.25.0

func (d *DeviceInfo) IsDeviceModelUnknown() bool

func (*DeviceInfo) IsEmpty

func (d *DeviceInfo) IsEmpty() bool

func (*DeviceInfo) Merge

func (d *DeviceInfo) Merge(deviceInfo *DeviceInfo) (*DeviceInfo, error)

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(logger log.Logger, versionReporter version.Reporter, authClient auth.Client, dataClient dataClient.Client, dexcomClient dexcom.Client) (*Runner, error)

func (*Runner) AuthClient

func (r *Runner) AuthClient() auth.Client

func (*Runner) CanRunTask

func (r *Runner) CanRunTask(tsk *task.Task) bool

func (*Runner) DataClient

func (r *Runner) DataClient() dataClient.Client

func (*Runner) DexcomClient

func (r *Runner) DexcomClient() dexcom.Client

func (*Runner) Logger

func (r *Runner) Logger() log.Logger

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, tsk *task.Task)

func (*Runner) VersionReporter

func (r *Runner) VersionReporter() version.Reporter

type TaskRunner

type TaskRunner struct {
	*Runner
	// contains filtered or unexported fields
}

func NewTaskRunner

func NewTaskRunner(rnnr *Runner, tsk *task.Task) (*TaskRunner, error)

func (*TaskRunner) Run

func (t *TaskRunner) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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