Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnitsMgdl = "mg/dL" UnitsMmol = "mmol/L" )
View Source
const LocalFileFormatCsv = "csv"
Variables ¶
View Source
var Default = NewDefault()
Functions ¶
func AddReloader ¶
func AddReloader(fn func())
Types ¶
type Arrows ¶
type Arrows struct { DoubleUp string `toml:"double-up"` SingleUp string `toml:"single-up"` FortyFiveUp string `toml:"forty-five-up"` Flat string `toml:"flat"` FortyFiveDown string `toml:"forty-five-down"` SingleDown string `toml:"single-down"` DoubleDown string `toml:"double-down"` Unknown string `toml:"unknown"` }
type Config ¶
type Config struct { Title string `toml:"title" comment:"Tray title."` URL string `toml:"url" comment:"Nightscout URL. (required)"` Token string `toml:"token" comment:"Nightscout token. Using an access token is recommended instead of the API secret."` Units string `toml:"units" comment:"Blood sugar unit. (one of: mg/dL, mmol/L)"` Interval Duration `toml:"interval" comment:"Update interval."` Arrows Arrows `toml:"arrows" comment:"Customize the arrows."` LocalFile LocalFile `toml:"local-file" comment:"Enables writing the latest blood sugar to a local temporary file."` }
func NewDefault ¶
func NewDefault() Config
type LocalFile ¶
type LocalFile struct { Enabled bool `toml:"enabled"` Format string `toml:"format" comment:"Local file format. (one of: csv)"` Path string `toml:"path" comment:"Local file path. $TMPDIR will be replaced with the current temp directory."` Cleanup bool `toml:"cleanup" comment:"If enabled, the local file will be cleaned up when Nightscout Menu Bar is closed."` }
type TOMLParser ¶
type TOMLParser struct{}
Click to show internal directories.
Click to hide internal directories.