nightscout

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LowReading  = 39
	HighReading = 401
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Delta

type Delta struct {
	Absolute     json.Number `json:"absolute"`
	DisplayVal   string      `json:"display"`
	ElapsedMins  json.Number `json:"elapsedMins"`
	Interpolated bool        `json:"interpolated"`
	Mean5MinsAgo json.Number `json:"mean5MinsAgo"`
	Mgdl         Mgdl        `json:"mgdl"`
	Previous     Reading     `json:"previous"`
	Scaled       json.Number `json:"scaled"`
	Times        Times       `json:"times"`
}

func (Delta) Display

func (d Delta) Display(units config.Unit) string

type Direction

type Direction struct {
	Entity string `json:"entity"`
	Label  string `json:"label"`
	Value  string `json:"value"`
}

type Mgdl

type Mgdl int

func (Mgdl) Mgdl

func (m Mgdl) Mgdl() int

func (Mgdl) Mmol

func (m Mgdl) Mmol() float64

type Mills

type Mills struct {
	time.Time
}

func (*Mills) MarshalJSON

func (m *Mills) MarshalJSON() ([]byte, error)

func (*Mills) Relative

func (m *Mills) Relative(round bool) string

func (*Mills) UnmarshalJSON

func (m *Mills) UnmarshalJSON(bytes []byte) error

type Properties

type Properties struct {
	Bgnow     Reading   `json:"bgnow"`
	Buckets   []Reading `json:"buckets"`
	Delta     Delta     `json:"delta"`
	Direction Direction `json:"direction"`
}

func (Properties) String

func (p Properties) String(data config.Data) string

type Reading

type Reading struct {
	Mean      json.Number `json:"mean"`
	Last      Mgdl        `json:"last"`
	Mills     Mills       `json:"mills"`
	Index     json.Number `json:"index,omitempty"`
	FromMills Mills       `json:"fromMills,omitempty"`
	ToMills   Mills       `json:"toMills,omitempty"`
	Sgvs      []SGV       `json:"sgvs"`
}

func (*Reading) Arrow

func (r *Reading) Arrow(conf config.Arrows) string

func (*Reading) DisplayBg

func (r *Reading) DisplayBg(units config.Unit) string

func (*Reading) String

func (r *Reading) String(data config.Data) string

func (*Reading) UnmarshalJSON

func (r *Reading) UnmarshalJSON(bytes []byte) error

type SGV

type SGV struct {
	ID         string      `json:"_id"`
	Device     string      `json:"device"`
	Direction  string      `json:"direction"`
	Filtered   json.Number `json:"filtered"`
	Mgdl       Mgdl        `json:"mgdl"`
	Mills      Mills       `json:"mills"`
	Noise      json.Number `json:"noise"`
	Rssi       json.Number `json:"rssi"`
	Scaled     json.Number `json:"scaled"`
	Type       string      `json:"type"`
	Unfiltered json.Number `json:"unfiltered"`
}

type Times

type Times struct {
	Previous Mills `json:"previous"`
	Recent   Mills `json:"recent"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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