Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Measurement ¶
func (Measurement) Fold ¶
func (m Measurement) Fold() Measurement
func (Measurement) LogValue ¶ added in v0.11.0
func (m Measurement) LogValue() slog.Value
type Measurements ¶
type Measurements []Measurement
func (Measurements) Fold ¶
func (ms Measurements) Fold() Measurements
type PostgresDB ¶
type PostgresDB struct { prometheus.Collector DBH *sqlx.DB // contains filtered or unexported fields }
func NewPostgresDB ¶
func (*PostgresDB) Get ¶
func (db *PostgresDB) Get(from, to time.Time) (measurements Measurements, err error)
func (*PostgresDB) GetWeather ¶
func (db *PostgresDB) GetWeather(id int) (string, error)
func (*PostgresDB) GetWeatherID ¶
func (db *PostgresDB) GetWeatherID(weather string) (int, error)
func (*PostgresDB) Store ¶
func (db *PostgresDB) Store(measurement Measurement) error
Click to show internal directories.
Click to hide internal directories.