db

package
v0.0.0-...-0268a42 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_DB          = "gousvide.db"
	TEMP_HIST_BUCKET    = "TempHist"
	RECIPE_BUCKET       = "Recipes"
	PROGRAM_HIST_BUCKET = "Programs"
	HEATER_HIST_BUCKET  = "HeaterHist"
)

Variables

This section is empty.

Functions

func Close

func Close() error

Closes the datasource encapsulated by this package, returning an error if the database cannot be opened

func GetTempHist

func GetTempHist(scale m.TemperatureScale) m.TemperatureSummary

Gets all historical temperatures in units per the provided scale

func GetTempHistForDateRange

func GetTempHistForDateRange(scale m.TemperatureScale, earliest time.Time, latest time.Time) m.TemperatureSummary

Gets historical temperatures within the defined date range in units per the provided scale

func Open

func Open() error

Opens the datasource encapsulated by this package, returning an error if the database cannot be opened

func SaveTemperature

func SaveTemperature(temperature float64, scale m.TemperatureScale) error

Saves a temperature record to the database, returning an error if the value was unable to be saved. All temperatures are saved in celcius, and can be converted when retrieved if necessary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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