cgmlibrelinkup

package
v0.0.0-...-8bcbc91 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthnFailed = errors.New("llu: authentication failed")
View Source
var ErrDownForMaintenance = errors.New("llu: servers down for maintenance")
View Source
var ErrNoConnections = errors.New("llu: no connections found")
View Source
var ErrUnexpectedDataFormat = errors.New("llu: unexpected data format")

Functions

This section is empty.

Types

type LLUConfig

type LLUConfig struct {
	Username string
	Password string
	Region   string
}

type LLUStore

type LLUStore struct {
	UserID string // account with view access, not always the patient

	PatientID string

	SensorID        string
	SensorSerial    string
	SensorStartTime time.Time
	// contains filtered or unexported fields
}

func New

func New(cfg *LLUConfig) *LLUStore

func (*LLUStore) ErrorIsAuthnFailed

func (s *LLUStore) ErrorIsAuthnFailed(err error) bool

func (*LLUStore) FetchRecent

func (s *LLUStore) FetchRecent(ctx context.Context, lastSeen time.Time) ([]models.Entry, error)

FetchRecent fetches entries newer than `lastSeen`, in oldest-first order LibreLinkUp typically returns 48 data points: - 47 points are smoothed 15-minute interval readings covering the last 12 hours - The 48th point is the most recent real-time reading (1-minute interval) This means we get - Initial backfill of 12 hours of data at startup - Continuous real-time updates when polling every minute

Jump to

Keyboard shortcuts

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