Documentation
¶
Index ¶
- func PKCS5Padding(ciphertext []byte, blockSize int, after int) []byte
- type Alarm
- type Camera
- func (c Camera) CreateOrUpdateCamera(configurationID string, camera *model.Camera)
- func (c Camera) DeleteCamera(cameraID string) error
- func (c Camera) GetCamera(cameraID string) (*model.Camera, error)
- func (c Camera) GetCameras(configurationID string) []model.Camera
- func (c Camera) Init()
- func (c Camera) ToggleCameraAlarm(cameraID uint, status int) error
- type Configuration
- func (c *Configuration) CreateOrUpdateConfiguration(configuration *model.Configuration)
- func (c *Configuration) DeleteConfiguration(configurationID string) error
- func (c *Configuration) GetConfiguration(configurationID string) (*model.Configuration, error)
- func (c *Configuration) GetConfigurations() []model.Configuration
- func (c *Configuration) GetCurrent() model.Configuration
- func (c *Configuration) Init()
- type Gate
- type Heater
- type Humidity
- type Inverter
- func (i *Inverter) CreateOrUpdateInverter(configurationID string, Inverter *model.Inverter)
- func (i *Inverter) DeleteInverter(InverterID string) error
- func (i *Inverter) GetDefaultInverter() (*model.Inverter, error)
- func (i *Inverter) GetInverter(InverterID string) (*model.Inverter, error)
- func (i *Inverter) GetInverters(configurationID string) []model.Inverter
- func (i *Inverter) GetMetrics(Inverter *model.Inverter) (*InverterMetrics, error)
- func (i *Inverter) Init()
- func (i *Inverter) ScheduledMeasurement()
- type InverterMetrics
- type LocationStatus
- type Notification
- type PowerMeter
- type PowerMeterMetrics
- type Profile
- func (p Profile) Authenticate(username string, password string) bool
- func (p Profile) CreateProfile(profile *model.Profile) error
- func (p Profile) GetProfile(profileID string) (*model.Profile, error)
- func (p Profile) GetProfileByUsername(username string) (*model.Profile, error)
- func (p Profile) GetProfiles() ([]model.Profile, error)
- func (p Profile) Init()
- type RainGauge
- type Raspsonar
- func (r *Raspsonar) GetLast(configuration model.Configuration) (time.Time, float64, error)
- func (r *Raspsonar) GetScheduledMeasurements() *map[time.Time]float64
- func (r *Raspsonar) Init()
- func (r *Raspsonar) ScheduledMeasurement()
- func (r *Raspsonar) ToggleRelay(configuration model.Configuration, status bool) error
- type Relay
- func (r *Relay) CreateOrUpdateRelay(configurationID string, Relay *model.Relay)
- func (r *Relay) DeleteRelay(RelayID string) error
- func (r *Relay) GetRelay(RelayID string) (*model.Relay, error)
- func (r *Relay) GetRelayStatus(Relay *model.Relay) (map[int]bool, error)
- func (r *Relay) GetRelays(configurationID string) []model.Relay
- func (r *Relay) Init()
- func (r *Relay) ScheduledActivation()
- func (r *Relay) ToggleAllPinsRelay(Relay *model.Relay, status bool) error
- func (r *Relay) ToggleRelay(Relay *model.Relay, status map[int]bool, manuallyActivated bool) error
- type Rental
- type Service
- type Temperature
- type WellPump
- func (w *WellPump) CreateOrUpdateWellPump(configurationID string, wellPump *model.WellPump)
- func (w *WellPump) DeleteWellPump(wellPumpID string) error
- func (w *WellPump) GetRelay(wellPump *model.WellPump) (int, error)
- func (w *WellPump) GetWellPump(wellPumpID string) (*model.WellPump, error)
- func (w *WellPump) GetWellPumps(configurationID string) []model.WellPump
- func (w *WellPump) Init()
- func (w *WellPump) ScheduledActivation()
- func (w *WellPump) ToggleRelay(wellPump *model.WellPump, status int, manuallyActivated bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alarm ¶
type Alarm struct { SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` NotificationService *Notification `inject:""` CameraService *Camera `inject:""` SlackClient slack.Client AlarmStatus bool Cameras []string LocationStatus map[string]LocationStatus }
func (*Alarm) ToggleAlarm ¶
type Configuration ¶
func (*Configuration) CreateOrUpdateConfiguration ¶
func (c *Configuration) CreateOrUpdateConfiguration(configuration *model.Configuration)
func (*Configuration) DeleteConfiguration ¶
func (c *Configuration) DeleteConfiguration(configurationID string) error
func (*Configuration) GetConfiguration ¶
func (c *Configuration) GetConfiguration(configurationID string) (*model.Configuration, error)
func (*Configuration) GetConfigurations ¶
func (c *Configuration) GetConfigurations() []model.Configuration
func (*Configuration) GetCurrent ¶
func (c *Configuration) GetCurrent() model.Configuration
func (*Configuration) Init ¶
func (c *Configuration) Init()
type Gate ¶
type Gate struct {
ConfigurationService *Configuration `inject:""`
}
type Heater ¶
type Heater struct { ScheduledMeasurements map[time.Time]float64 SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` MaxMeasurements int InfluxdbClient *influxdb.Client `inject:""` }
func (*Heater) GetScheduledMeasurements ¶
func (*Heater) ScheduledMeasurement ¶
func (h *Heater) ScheduledMeasurement()
type Humidity ¶
type Humidity struct { ScheduledMeasurements map[time.Time]float64 SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` MaxMeasurements int InfluxdbClient *influxdb.Client `inject:""` // contains filtered or unexported fields }
func (*Humidity) GetScheduledMeasurements ¶
func (*Humidity) ScheduledMeasurement ¶
func (h *Humidity) ScheduledMeasurement()
type Inverter ¶
type Inverter struct { Db *gorm.DB `inject:""` SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` NotificationService *Notification `inject:""` InfluxdbClient *influxdb.Client `inject:""` Lock sync.Mutex }
func (*Inverter) CreateOrUpdateInverter ¶
func (*Inverter) DeleteInverter ¶
func (*Inverter) GetDefaultInverter ¶
func (*Inverter) GetInverter ¶
func (*Inverter) GetInverters ¶
func (*Inverter) GetMetrics ¶
func (i *Inverter) GetMetrics(Inverter *model.Inverter) (*InverterMetrics, error)
func (*Inverter) ScheduledMeasurement ¶
func (i *Inverter) ScheduledMeasurement()
type InverterMetrics ¶
type InverterMetrics struct { PowerPin1 float32 `json:"power_pin_1"` PowerPin2 float32 `json:"power_pin_2"` GridPowerReading float32 `json:"grid_power_reading"` Riso float32 `json:"riso"` InverterTemperature float32 `json:"inverter_temperature"` BoosterTemperature float32 `json:"booster_temperature"` DcAcConversionEfficiency float32 `json:"dc_ac_conversion_efficiency"` DailyEnergy float32 `json:"daily_energy"` WeeklyEnergy float32 `json:"weekly_energy"` MontlyEnergy float32 `json:"monthly_energy"` YearlyEnergy float32 `json:"yearly_energy"` PowerPeak float32 `json:"power_peak"` PowerPeakToday float32 `json:"power_peak_today"` }
type LocationStatus ¶
type LocationStatus string
const ( Entered LocationStatus = "entered" Exited LocationStatus = "exited" )
type Notification ¶
type Notification struct { ConfigurationService *Configuration `inject:""` SlackClient slack.Client }
func (*Notification) Init ¶
func (n *Notification) Init()
func (*Notification) SendSlackMessage ¶
func (n *Notification) SendSlackMessage(channel string, message string) error
type PowerMeter ¶
type PowerMeter struct { ScheduledMeasurements map[time.Time]float64 SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` InverterService *Inverter `inject:""` MaxMeasurements int InfluxdbClient *influxdb.Client `inject:""` DefaultInverter *model.Inverter }
func (*PowerMeter) GetLast ¶
func (p *PowerMeter) GetLast(configuration model.Configuration) (time.Time, float64, error)
func (*PowerMeter) GetScheduledMeasurements ¶
func (p *PowerMeter) GetScheduledMeasurements() *map[time.Time]float64
func (*PowerMeter) Init ¶
func (p *PowerMeter) Init()
func (*PowerMeter) ScheduledMeasurement ¶
func (p *PowerMeter) ScheduledMeasurement()
type PowerMeterMetrics ¶
type Profile ¶
func (Profile) GetProfileByUsername ¶
type RainGauge ¶
type RainGauge struct { ScheduledMeasurements map[time.Time]float64 SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` MaxMeasurements int InfluxdbClient *influxdb.Client `inject:""` }
func (*RainGauge) GetScheduledMeasurements ¶
func (*RainGauge) ScheduledMeasurement ¶
func (r *RainGauge) ScheduledMeasurement()
type Raspsonar ¶
type Raspsonar struct { ScheduledMeasurements map[time.Time]float64 SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` NotificationService *Notification `inject:""` MaxMeasurements int RelayStatus bool RelayActivationTimestamp time.Time // contains filtered or unexported fields }
func (*Raspsonar) GetScheduledMeasurements ¶
func (*Raspsonar) ScheduledMeasurement ¶
func (r *Raspsonar) ScheduledMeasurement()
func (*Raspsonar) ToggleRelay ¶
func (r *Raspsonar) ToggleRelay(configuration model.Configuration, status bool) error
type Relay ¶
type Relay struct { Db *gorm.DB `inject:""` SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` NotificationService *Notification `inject:""` }
func (*Relay) CreateOrUpdateRelay ¶
func (*Relay) DeleteRelay ¶
func (*Relay) GetRelayStatus ¶
func (*Relay) ScheduledActivation ¶
func (r *Relay) ScheduledActivation()
func (*Relay) ToggleAllPinsRelay ¶
type Rental ¶
type Rental struct {
ConfigurationService *Configuration `inject:""`
}
func (*Rental) GenerateAccessLink ¶
type Temperature ¶
type Temperature struct { ScheduledMeasurements map[time.Time]float64 SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` MaxMeasurements int InfluxdbClient *influxdb.Client `inject:""` }
func (*Temperature) GetLast ¶
func (t *Temperature) GetLast(configuration model.Configuration) (time.Time, float64, error)
func (*Temperature) GetScheduledMeasurements ¶
func (t *Temperature) GetScheduledMeasurements() *map[time.Time]float64
func (*Temperature) Init ¶
func (t *Temperature) Init()
func (*Temperature) ScheduledMeasurement ¶
func (t *Temperature) ScheduledMeasurement()
type WellPump ¶
type WellPump struct { Db *gorm.DB `inject:""` SchedulerManager *scheduler.SchedulerManager `inject:""` ConfigurationService *Configuration `inject:""` NotificationService *Notification `inject:""` RainGauge *RainGauge `inject:""` }
func (*WellPump) CreateOrUpdateWellPump ¶
func (*WellPump) DeleteWellPump ¶
func (*WellPump) GetWellPump ¶
func (*WellPump) GetWellPumps ¶
func (*WellPump) ScheduledActivation ¶
func (w *WellPump) ScheduledActivation()
Click to show internal directories.
Click to hide internal directories.