Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datastore ¶
type Datastore interface {
AddManualSnowdepthMeasurement(latitude, longitude, depth float64) (*models.Snowdepth, error)
AddSnowdepthMeasurement(device *string, latitude, longitude, depth float64, when string) (*models.Snowdepth, error)
GetLatestSnowdepths() ([]models.Snowdepth, error)
GetLatestSnowdepthsForDevice(device string) ([]models.Snowdepth, error)
}
Datastore is an interface that is used to inject the database into different handlers to improve testability
func GetFromContext ¶
GetFromContext extracts the database wrapper, if any, from the provided context
Click to show internal directories.
Click to hide internal directories.