Documentation ¶
Index ¶
- type Entities
- type InfluxDBClient
- func (c *InfluxDBClient) Close()
- func (c *InfluxDBClient) FetchZoneTemp(zoneID int, ctx context.Context) (float64, error)
- func (c *InfluxDBClient) WriteTarget(zoneID int, target float64)
- func (c *InfluxDBClient) WriteTemperature(zoneID int, thermostatID string, temp float64)
- func (c *InfluxDBClient) WriteTemperatureData(zoneID int, target, error, output float64)
- func (c *InfluxDBClient) WriteValveState(zoneID int, valveID int, state int)
- type TimeSeriesDataStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entities ¶
type Entities struct { Zones []models.Zone Valves []models.Valve Thermostats []models.Thermostat ZoneToThermostat map[int][]*models.Thermostat ZoneToValve map[int][]*models.Valve IDToZone map[int]*models.ZoneModel }
LoadConfig loads the configuration from the database This would usually be just the connection in this file but to keep things simple for now I do not want business logic in here permanently
func LoadEntities ¶
type InfluxDBClient ¶
type InfluxDBClient struct { WriteAPI influxAPI.WriteAPI QueryAPI influxAPI.QueryAPI // contains filtered or unexported fields }
func CreateInfluxClient ¶
func CreateInfluxClient(url, port, token, org, bucket string) *InfluxDBClient
func (*InfluxDBClient) Close ¶
func (c *InfluxDBClient) Close()
func (*InfluxDBClient) FetchZoneTemp ¶
func (*InfluxDBClient) WriteTarget ¶
func (c *InfluxDBClient) WriteTarget(zoneID int, target float64)
func (*InfluxDBClient) WriteTemperature ¶
func (c *InfluxDBClient) WriteTemperature(zoneID int, thermostatID string, temp float64)
func (*InfluxDBClient) WriteTemperatureData ¶
func (c *InfluxDBClient) WriteTemperatureData(zoneID int, target, error, output float64)
func (*InfluxDBClient) WriteValveState ¶
func (c *InfluxDBClient) WriteValveState(zoneID int, valveID int, state int)
type TimeSeriesDataStore ¶
type TimeSeriesDataStore interface { Close() WriteTemperature(zoneID int, thermostatID string, temp float64) WriteTemperatureData(zoneID int, target, error, output float64) WriteTarget(zoneID int, target float64) WriteValveState(zoneID int, valveID int, state int) FetchZoneTemp(zoneID int, ctx context.Context) (float64, error) }
Click to show internal directories.
Click to hide internal directories.