Documentation ¶
Index ¶
- Constants
- func NewThingsControllerFunc(manager ThingsManager, model *container.ThingsContainer) *thingsController
- type ActionsController
- type AddonController
- type AddonManager
- type Connection
- type EventsController
- type GroupsController
- type JWT
- type LoginController
- type Models
- type NewThingsController
- type Router
- type RulesController
- type SettingsController
- type Storage
- type ThingsManager
- type UserController
- type Users
Constants ¶
View Source
const InstallAddonTimeOut = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
func NewThingsControllerFunc ¶
func NewThingsControllerFunc(manager ThingsManager, model *container.ThingsContainer) *thingsController
Types ¶
type ActionsController ¶
type ActionsController struct {
// contains filtered or unexported fields
}
func NewActionsController ¶
func NewActionsController(model *models.ActionsModel, thing *container.ThingsContainer, manager models.ActionsManager) *ActionsController
type AddonController ¶
type AddonController struct {
// contains filtered or unexported fields
}
func NewAddonController ¶
func NewAddonController(manager AddonManager, m *models.AddonsModel) *AddonController
type AddonManager ¶
type AddonManager interface { GetInstallAddons() any EnableAddon(addonId string) error DisableAddon(addonId string) error InstallAddonFromUrl(id, url, checksum string) error LoadAddon(id string) error UninstallAddon(id string, disabled bool) error GetAddonLicense(addonId string) (string, error) AddonEnabled(addonId string) bool UnloadAddon(addonId string) error }
type Connection ¶
type Connection struct { *websocket.Conn // contains filtered or unexported fields }
type EventsController ¶
type EventsController struct { }
func NewEventsController ¶
func NewEventsController() *EventsController
type GroupsController ¶
type GroupsController struct { }
func NewGroupsController ¶
func NewGroupsController() *GroupsController
type LoginController ¶
type LoginController struct {
// contains filtered or unexported fields
}
func NewLoginController ¶
func NewLoginController(users *models.Users, jsonwebtoken *models.Jsonwebtoken) *LoginController
type NewThingsController ¶
type NewThingsController struct {
// contains filtered or unexported fields
}
func NewNewThingsController ¶
func NewNewThingsController(manager manager, thingContainer thingContainer) *NewThingsController
type RulesController ¶
type RulesController struct {
// contains filtered or unexported fields
}
func NewRulesController ¶
func NewRulesController(db rules_engine.RuleDB, container things.Container) *RulesController
type SettingsController ¶
type SettingsController struct {
// contains filtered or unexported fields
}
func NewSettingController ¶
func NewSettingController(model *models.Settings) *SettingsController
type Storage ¶
type Storage interface { models.UsersStore things.ThingsStorage models.SettingsStore models.JsonwebtokenStore models.AddonStore rules_engine.RuleDB }
type ThingsManager ¶
type ThingsManager interface { SetPropertyValue(ctx context.Context, thingId, propertyName string, value any) (any, error) GetPropertyValue(thingId, propertyName string) (any, error) GetPropertiesValue(thingId string) (map[string]any, error) GetMapOfDevices() map[string]*devices.Device SetPIN(ctx context.Context, thingId string, pin string) (*messages.Device, error) SetCredentials(ctx context.Context, thingId, username, password string) (*messages.Device, error) }
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func NewUsersController ¶
func NewUsersController(m *models.Users, jwt JWT) *UserController
Source Files ¶
Click to show internal directories.
Click to hide internal directories.