Documentation ¶
Index ¶
- type ConfigServiceMock
- type ConfigurationMock
- func (m *ConfigurationMock) GetBool(key config.ConfigKey, defaultValue bool) bool
- func (m *ConfigurationMock) GetInt(key config.ConfigKey, defaultValue int) int
- func (m *ConfigurationMock) GetList(key config.ConfigKey) []interface{}
- func (m *ConfigurationMock) GetMap(key config.ConfigKey) map[interface{}]interface{}
- func (m *ConfigurationMock) GetStr(key config.ConfigKey, defaultValue string) string
- func (m *ConfigurationMock) ReadConfiguration(configFile string)
- type ConfigurationRepoMock
- func (m *ConfigurationRepoMock) GetBool(key config.ConfigKey, defaultValue bool) bool
- func (m *ConfigurationRepoMock) GetInt(key config.ConfigKey, defaultValue int) int
- func (m *ConfigurationRepoMock) GetList(key config.ConfigKey) []interface{}
- func (m *ConfigurationRepoMock) GetMap(key config.ConfigKey) map[interface{}]interface{}
- func (m *ConfigurationRepoMock) GetStr(key config.ConfigKey, defaultValue string) string
- func (m *ConfigurationRepoMock) ReadConfiguration(configFile string)
- type DeviceRepoMock
- type DeviceServiceMock
- func (m *DeviceServiceMock) DeviceCommand(deviceKey string, params model.Dictionary) bool
- func (m *DeviceServiceMock) DeviceState(deviceKey string) interface{}
- func (m *DeviceServiceMock) DeviceStates() model.Dictionary
- func (m *DeviceServiceMock) DeviceUpdate(dev *model.Device, oldState string)
- func (m *DeviceServiceMock) GetDevice(deviceKey string) (*model.Device, error)
- func (m *DeviceServiceMock) GetDevices() (*model.Devices, error)
- func (m *DeviceServiceMock) GetDevicesDto(filter model.DeviceFilter) (*model.DevicesDto, error)
- func (m *DeviceServiceMock) ReloadDevices() error
- type MqttClientMock
- func (m *MqttClientMock) AddRoute(topic string, callback mqtt.MessageHandler)
- func (m *MqttClientMock) Connect() mqtt.Token
- func (m *MqttClientMock) Disconnect(quiesce uint)
- func (m *MqttClientMock) IsConnected() bool
- func (m *MqttClientMock) IsConnectionOpen() bool
- func (m *MqttClientMock) OptionsReader() mqtt.ClientOptionsReader
- func (m *MqttClientMock) Publish(topic string, qos byte, retained bool, payload interface{}) mqtt.Token
- func (m *MqttClientMock) Subscribe(topic string, qos byte, callback mqtt.MessageHandler) mqtt.Token
- func (m *MqttClientMock) SubscribeMultiple(filters map[string]byte, callback mqtt.MessageHandler) mqtt.Token
- func (m *MqttClientMock) Unsubscribe(topics ...string) mqtt.Token
- type MqttServiceMock
- func (m *MqttServiceMock) HandleMessage(topic string, payload []byte)
- func (m *MqttServiceMock) Publish(topic string, payload interface{}) bool
- func (m *MqttServiceMock) SetClient(client mqtt.Client)
- func (m *MqttServiceMock) SetMessageHandler(handler model.MqttMessageHandler)
- func (m *MqttServiceMock) Subscribe(topic string) bool
- type MqttTokenMock
- type NotificationRepoMock
- type NotificationServiceMock
- type RestServiceMock
- type ServiceFactoryMock
- func (m *ServiceFactoryMock) Finalize()
- func (m *ServiceFactoryMock) GetConfigService() model.IConfigService
- func (m *ServiceFactoryMock) GetDeviceService() model.IDeviceService
- func (m *ServiceFactoryMock) GetMqttService() model.IMqttService
- func (m *ServiceFactoryMock) GetNotificationService() model.INotificationService
- func (m *ServiceFactoryMock) GetRestService() model.IRestService
- func (m *ServiceFactoryMock) GetSharedMemory() model.ISharedMemory
- func (m *ServiceFactoryMock) GetTelegramService() model.ITelegramService
- func (m *ServiceFactoryMock) GetUserService() model.IUserService
- type SharedMemoryMock
- func (m *SharedMemoryMock) FinalizeSharedMem()
- func (m *SharedMemoryMock) GetDeviceMem(deviceKey string) interface{}
- func (m *SharedMemoryMock) GetLastUpdated(deviceKey string) int64
- func (m *SharedMemoryMock) GetMem(deviceKey string, key string) interface{}
- func (m *SharedMemoryMock) GetMemory() model.Dictionary
- func (m *SharedMemoryMock) LoadSharedMem()
- func (m *SharedMemoryMock) MarkAsUpdated(deviceKey string)
- func (m *SharedMemoryMock) SetMem(deviceKey string, key string, value interface{})
- func (m *SharedMemoryMock) SetNotifyCallback(notifyFunc model.NotifyFunc)
- type TelegramBotApiMock
- type TelegramServiceMock
- type UserRepoMock
- type UserServiceMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigServiceMock ¶
func (*ConfigServiceMock) GetRoomsConfig ¶
func (m *ConfigServiceMock) GetRoomsConfig() (model.Dictionary, error)
func (*ConfigServiceMock) GetServerStatus ¶
func (m *ConfigServiceMock) GetServerStatus() (*model.ServerStatus, error)
func (*ConfigServiceMock) SetMqttStatus ¶
func (m *ConfigServiceMock) SetMqttStatus(connectionStatus int)
func (*ConfigServiceMock) SetWebsocketStatus ¶
func (m *ConfigServiceMock) SetWebsocketStatus(connected bool)
type ConfigurationMock ¶
func (*ConfigurationMock) GetBool ¶
func (m *ConfigurationMock) GetBool(key config.ConfigKey, defaultValue bool) bool
func (*ConfigurationMock) GetInt ¶
func (m *ConfigurationMock) GetInt(key config.ConfigKey, defaultValue int) int
func (*ConfigurationMock) GetList ¶
func (m *ConfigurationMock) GetList(key config.ConfigKey) []interface{}
func (*ConfigurationMock) GetMap ¶
func (m *ConfigurationMock) GetMap(key config.ConfigKey) map[interface{}]interface{}
func (*ConfigurationMock) GetStr ¶
func (m *ConfigurationMock) GetStr(key config.ConfigKey, defaultValue string) string
func (*ConfigurationMock) ReadConfiguration ¶
func (m *ConfigurationMock) ReadConfiguration(configFile string)
type ConfigurationRepoMock ¶
func (*ConfigurationRepoMock) GetBool ¶
func (m *ConfigurationRepoMock) GetBool(key config.ConfigKey, defaultValue bool) bool
func (*ConfigurationRepoMock) GetInt ¶
func (m *ConfigurationRepoMock) GetInt(key config.ConfigKey, defaultValue int) int
func (*ConfigurationRepoMock) GetList ¶
func (m *ConfigurationRepoMock) GetList(key config.ConfigKey) []interface{}
func (*ConfigurationRepoMock) GetMap ¶
func (m *ConfigurationRepoMock) GetMap(key config.ConfigKey) map[interface{}]interface{}
func (*ConfigurationRepoMock) GetStr ¶
func (m *ConfigurationRepoMock) GetStr(key config.ConfigKey, defaultValue string) string
func (*ConfigurationRepoMock) ReadConfiguration ¶
func (m *ConfigurationRepoMock) ReadConfiguration(configFile string)
type DeviceRepoMock ¶
func (*DeviceRepoMock) GetDevice ¶
func (m *DeviceRepoMock) GetDevice(deviceKey string) (*model.Device, error)
func (*DeviceRepoMock) GetDevices ¶
func (m *DeviceRepoMock) GetDevices() (*model.Devices, error)
func (*DeviceRepoMock) ReloadDevices ¶
func (m *DeviceRepoMock) ReloadDevices() error
type DeviceServiceMock ¶
func (*DeviceServiceMock) DeviceCommand ¶
func (m *DeviceServiceMock) DeviceCommand(deviceKey string, params model.Dictionary) bool
func (*DeviceServiceMock) DeviceState ¶
func (m *DeviceServiceMock) DeviceState(deviceKey string) interface{}
func (*DeviceServiceMock) DeviceStates ¶
func (m *DeviceServiceMock) DeviceStates() model.Dictionary
func (*DeviceServiceMock) DeviceUpdate ¶
func (m *DeviceServiceMock) DeviceUpdate(dev *model.Device, oldState string)
func (*DeviceServiceMock) GetDevice ¶
func (m *DeviceServiceMock) GetDevice(deviceKey string) (*model.Device, error)
func (*DeviceServiceMock) GetDevices ¶
func (m *DeviceServiceMock) GetDevices() (*model.Devices, error)
func (*DeviceServiceMock) GetDevicesDto ¶
func (m *DeviceServiceMock) GetDevicesDto(filter model.DeviceFilter) (*model.DevicesDto, error)
func (*DeviceServiceMock) ReloadDevices ¶
func (m *DeviceServiceMock) ReloadDevices() error
type MqttClientMock ¶
func (*MqttClientMock) AddRoute ¶
func (m *MqttClientMock) AddRoute(topic string, callback mqtt.MessageHandler)
func (*MqttClientMock) Connect ¶
func (m *MqttClientMock) Connect() mqtt.Token
func (*MqttClientMock) Disconnect ¶
func (m *MqttClientMock) Disconnect(quiesce uint)
func (*MqttClientMock) IsConnected ¶
func (m *MqttClientMock) IsConnected() bool
func (*MqttClientMock) IsConnectionOpen ¶
func (m *MqttClientMock) IsConnectionOpen() bool
func (*MqttClientMock) OptionsReader ¶
func (m *MqttClientMock) OptionsReader() mqtt.ClientOptionsReader
func (*MqttClientMock) Subscribe ¶
func (m *MqttClientMock) Subscribe(topic string, qos byte, callback mqtt.MessageHandler) mqtt.Token
func (*MqttClientMock) SubscribeMultiple ¶
func (m *MqttClientMock) SubscribeMultiple(filters map[string]byte, callback mqtt.MessageHandler) mqtt.Token
func (*MqttClientMock) Unsubscribe ¶
func (m *MqttClientMock) Unsubscribe(topics ...string) mqtt.Token
type MqttServiceMock ¶
func (*MqttServiceMock) HandleMessage ¶
func (m *MqttServiceMock) HandleMessage(topic string, payload []byte)
func (*MqttServiceMock) Publish ¶
func (m *MqttServiceMock) Publish(topic string, payload interface{}) bool
func (*MqttServiceMock) SetClient ¶
func (m *MqttServiceMock) SetClient(client mqtt.Client)
func (*MqttServiceMock) SetMessageHandler ¶
func (m *MqttServiceMock) SetMessageHandler(handler model.MqttMessageHandler)
func (*MqttServiceMock) Subscribe ¶
func (m *MqttServiceMock) Subscribe(topic string) bool
type MqttTokenMock ¶
func (*MqttTokenMock) Done ¶
func (m *MqttTokenMock) Done() <-chan struct{}
func (*MqttTokenMock) Error ¶
func (m *MqttTokenMock) Error() error
func (*MqttTokenMock) Wait ¶
func (m *MqttTokenMock) Wait() bool
func (*MqttTokenMock) WaitTimeout ¶
func (m *MqttTokenMock) WaitTimeout(duration time.Duration) bool
type NotificationRepoMock ¶
func (*NotificationRepoMock) GetAllNotifications ¶
func (m *NotificationRepoMock) GetAllNotifications() (*model.Notifications, error)
func (*NotificationRepoMock) GetNotifications ¶
func (m *NotificationRepoMock) GetNotifications(deviceKey string, key string) ([]*model.Notification, error)
func (*NotificationRepoMock) ReloadNotifications ¶
func (m *NotificationRepoMock) ReloadNotifications() error
type NotificationServiceMock ¶
func (*NotificationServiceMock) GetNotifications ¶
func (m *NotificationServiceMock) GetNotifications(deviceKey string, key string) ([]*model.Notification, error)
func (*NotificationServiceMock) ReloadNotifications ¶
func (m *NotificationServiceMock) ReloadNotifications() error
type RestServiceMock ¶
func (*RestServiceMock) GetRequest ¶
func (m *RestServiceMock) GetRequest(url string, device *model.Device) bool
func (*RestServiceMock) HandleMessage ¶
func (m *RestServiceMock) HandleMessage(device *model.Device, payload string)
func (*RestServiceMock) SetMessageHandler ¶
func (m *RestServiceMock) SetMessageHandler(handler model.RestMessageHandler)
type ServiceFactoryMock ¶
func (*ServiceFactoryMock) Finalize ¶
func (m *ServiceFactoryMock) Finalize()
func (*ServiceFactoryMock) GetConfigService ¶
func (m *ServiceFactoryMock) GetConfigService() model.IConfigService
func (*ServiceFactoryMock) GetDeviceService ¶
func (m *ServiceFactoryMock) GetDeviceService() model.IDeviceService
func (*ServiceFactoryMock) GetMqttService ¶
func (m *ServiceFactoryMock) GetMqttService() model.IMqttService
func (*ServiceFactoryMock) GetNotificationService ¶
func (m *ServiceFactoryMock) GetNotificationService() model.INotificationService
func (*ServiceFactoryMock) GetRestService ¶
func (m *ServiceFactoryMock) GetRestService() model.IRestService
func (*ServiceFactoryMock) GetSharedMemory ¶
func (m *ServiceFactoryMock) GetSharedMemory() model.ISharedMemory
func (*ServiceFactoryMock) GetTelegramService ¶
func (m *ServiceFactoryMock) GetTelegramService() model.ITelegramService
func (*ServiceFactoryMock) GetUserService ¶
func (m *ServiceFactoryMock) GetUserService() model.IUserService
type SharedMemoryMock ¶
type SharedMemoryMock struct {
}func (*SharedMemoryMock) FinalizeSharedMem ¶
func (m *SharedMemoryMock) FinalizeSharedMem()
func (*SharedMemoryMock) GetDeviceMem ¶
func (m *SharedMemoryMock) GetDeviceMem(deviceKey string) interface{}
func (*SharedMemoryMock) GetLastUpdated ¶
func (m *SharedMemoryMock) GetLastUpdated(deviceKey string) int64
func (*SharedMemoryMock) GetMem ¶
func (m *SharedMemoryMock) GetMem(deviceKey string, key string) interface{}
func (*SharedMemoryMock) GetMemory ¶
func (m *SharedMemoryMock) GetMemory() model.Dictionary
func (*SharedMemoryMock) LoadSharedMem ¶
func (m *SharedMemoryMock) LoadSharedMem()
func (*SharedMemoryMock) MarkAsUpdated ¶
func (m *SharedMemoryMock) MarkAsUpdated(deviceKey string)
func (*SharedMemoryMock) SetMem ¶
func (m *SharedMemoryMock) SetMem(deviceKey string, key string, value interface{})
func (*SharedMemoryMock) SetNotifyCallback ¶
func (m *SharedMemoryMock) SetNotifyCallback(notifyFunc model.NotifyFunc)
type TelegramBotApiMock ¶
type TelegramServiceMock ¶
func (*TelegramServiceMock) SendMessage ¶
func (m *TelegramServiceMock) SendMessage(message string) bool
type UserRepoMock ¶
func (*UserRepoMock) FindByUsername ¶
func (m *UserRepoMock) FindByUsername(userName string) (*model.User, error)
func (*UserRepoMock) ReloadUsers ¶
func (m *UserRepoMock) ReloadUsers() error
type UserServiceMock ¶
func (*UserServiceMock) FindByUsername ¶
func (m *UserServiceMock) FindByUsername(userName string) (*model.User, error)
func (*UserServiceMock) ReloadUsers ¶
func (m *UserServiceMock) ReloadUsers() error
Source Files ¶
- config-service-mock.go
- configuration-mock.go
- configuration-repo-mock.go
- device-repo-mock.go
- device-service-mock.go
- mqtt-client-mock.go
- mqtt-service-mock.go
- notification-repo-mock.go
- notification-service-mock.go
- rest-service-mock.go
- service-factory-mock.go
- shared-memory-mock.go
- telegram-service-mock.go
- telegrambot-api-mock.go
- user-repo-mock.go
- user-service-mock.go
Click to show internal directories.
Click to hide internal directories.