Versions in this module Expand all Collapse all v0 v0.1.0 Jan 7, 2022 Changes in this version + const KeyLastUpdated + const KeyPayload + const KeyPayloadOff + const KeyPayloadOn + const KeyPayloadToggle + const KeyPowerOff + const KeyPowerOn + const KeyPowerToggle + func NewConfigService(cfg config.IConfiguration) model.IConfigService + func NewDatabaseService(cfg config.IConfiguration) model.IDatabaseService + func NewDeviceService(cfg config.IConfiguration, restService model.IRestService, ...) model.IDeviceService + func NewMqttService() model.IMqttService + func NewNotificationService(cfg config.IConfiguration) model.INotificationService + func NewRestService() model.IRestService + func NewServiceFactory(cfg config.IConfiguration) model.IServiceFactory + func NewSharedMemory(cfg config.IConfiguration) model.ISharedMemory + func NewTelegramService(cfg config.IConfiguration) model.ITelegramService + func NewUserService(cfg config.IConfiguration, databaseService model.IDatabaseService) model.IUserService + type ConfigService struct + func (c *ConfigService) GetRoomsConfig() (model.Dictionary, error) + func (c *ConfigService) GetServerStatus() (*model.ServerStatus, error) + func (c *ConfigService) SetMqttStatus(connectionStatus int) + func (c *ConfigService) SetWebsocketStatus(connected bool) + type DatabaseService struct + func (s *DatabaseService) GetUserSettings(userName string) (*model.UserSettings, error) + func (s *DatabaseService) Persist() + func (s *DatabaseService) SaveUserSettings(userName string, settings *model.UserSettings) error + type DeviceService struct + func (d *DeviceService) DeviceCommand(deviceKey string, params model.Dictionary) bool + func (d *DeviceService) DeviceGroupCommand(groupKey string, params model.Dictionary) bool + func (d *DeviceService) DeviceState(deviceKey string) interface{} + func (d *DeviceService) DeviceStates() model.Dictionary + func (d *DeviceService) DeviceUpdate(dev *model.Device, oldState string) + func (d *DeviceService) GetDevice(deviceKey string) (*model.Device, error) + func (d *DeviceService) GetDevices() (*model.Devices, error) + func (d *DeviceService) GetDevicesDto(filter model.DeviceFilter) (*model.DevicesDto, error) + func (d *DeviceService) ReloadDevices() error + type MqttService struct + func (m *MqttService) HandleMessage(topic string, payload []byte) + func (m *MqttService) Publish(topic string, payload interface{}) bool + func (m *MqttService) SetClient(client mqtt.Client) + func (m *MqttService) SetMessageHandler(handler model.MqttMessageHandler) + func (m *MqttService) Subscribe(topic string) bool + type NotificationService struct + func (n *NotificationService) GetNotifications(deviceKey string, key string) ([]*model.Notification, error) + func (n *NotificationService) ReloadNotifications() error + type RestService struct + func (r *RestService) GetRequest(url string, device *model.Device) bool + func (r *RestService) HandleMessage(device *model.Device, payload string) + func (r *RestService) SetMessageHandler(handler model.RestMessageHandler) + type ServiceFactory struct + func (s *ServiceFactory) Finalize() + func (s *ServiceFactory) GetConfigService() model.IConfigService + func (s *ServiceFactory) GetDatabaseService() model.IDatabaseService + func (s *ServiceFactory) GetDeviceService() model.IDeviceService + func (s *ServiceFactory) GetMqttService() model.IMqttService + func (s *ServiceFactory) GetNotificationService() model.INotificationService + func (s *ServiceFactory) GetRestService() model.IRestService + func (s *ServiceFactory) GetSharedMemory() model.ISharedMemory + func (s *ServiceFactory) GetTelegramService() model.ITelegramService + func (s *ServiceFactory) GetUserService() model.IUserService + type SharedMemory struct + func (s *SharedMemory) GetDeviceMem(deviceKey string) interface{} + func (s *SharedMemory) GetLastUpdated(deviceKey string) int64 + func (s *SharedMemory) GetMem(deviceKey string, key string) interface{} + func (s *SharedMemory) GetMemory() model.Dictionary + func (s *SharedMemory) LoadSharedMem() + func (s *SharedMemory) MarkAsUpdated(deviceKey string) + func (s *SharedMemory) Persist() + func (s *SharedMemory) SetMem(deviceKey string, key string, value interface{}) + func (s *SharedMemory) SetNotifyCallback(notifyFunc model.NotifyFunc) + type TelegramService struct + func (t *TelegramService) SendMessage(message string) bool + type UserService struct + func (u *UserService) FindByUsername(userName string) (*model.User, error) + func (u *UserService) GetSettings(userName string) (*model.UserSettings, error) + func (u *UserService) ReloadUsers() error + func (u *UserService) SaveSettings(userName string, settings *model.UserSettings) error