Documentation ¶
Index ¶
- Constants
- func UploadImage(reader *bufio.Reader, fileName string) (newFile *m.Image, err error)
- type ActionEndpoint
- func (n *ActionEndpoint) Add(ctx context.Context, action *m.Action) (result *m.Action, err error)
- func (n *ActionEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (n *ActionEndpoint) GetById(ctx context.Context, id int64) (result *m.Action, err error)
- func (n *ActionEndpoint) GetList(ctx context.Context, pagination common.PageParams, ids *[]uint64) (result []*m.Action, total int64, err error)
- func (n *ActionEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*m.Action, total int64, err error)
- func (n *ActionEndpoint) Update(ctx context.Context, params *m.Action) (action *m.Action, err error)
- type AlexaSkillEndpoint
- func (n *AlexaSkillEndpoint) Add(ctx context.Context, params *m.AlexaSkill) (result *m.AlexaSkill, err error)
- func (n *AlexaSkillEndpoint) Delete(ctx context.Context, skillId int64) (err error)
- func (n *AlexaSkillEndpoint) GetById(ctx context.Context, appId int64) (result *m.AlexaSkill, err error)
- func (n *AlexaSkillEndpoint) GetList(ctx context.Context, limit, offset int64, order, sortBy string) (result []*m.AlexaSkill, total int64, err error)
- func (n *AlexaSkillEndpoint) Update(ctx context.Context, params *m.AlexaSkill) (skill *m.AlexaSkill, err error)
- type AreaEndpoint
- func (n *AreaEndpoint) Add(ctx context.Context, params *m.Area) (result *m.Area, err error)
- func (n *AreaEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (n *AreaEndpoint) GetById(ctx context.Context, id int64) (result *m.Area, err error)
- func (n *AreaEndpoint) GetByName(ctx context.Context, name string) (result *m.Area, err error)
- func (n *AreaEndpoint) GetList(ctx context.Context, pagination common.PageParams) (result []*m.Area, total int64, err error)
- func (n *AreaEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*m.Area, total int64, err error)
- func (n *AreaEndpoint) Update(ctx context.Context, params *m.Area) (area *m.Area, err error)
- type AuthEndpoint
- func (a *AuthEndpoint) AccessList(ctx context.Context, user *models.User, ...) (accessList *access_list.AccessList, err error)
- func (a *AuthEndpoint) PasswordReset(ctx context.Context, userEmail string, token, newPassword *string) (err error)
- func (a *AuthEndpoint) SignIn(ctx context.Context, email, password string, ip string) (user *models.User, accessToken string, err error)
- func (a *AuthEndpoint) SignOut(ctx context.Context, user *models.User) (err error)
- type AutomationEndpoint
- type BackupEndpoint
- func (b *BackupEndpoint) ApplyChanges(ctx context.Context) (err error)
- func (b *BackupEndpoint) Delete(ctx context.Context, name string) (err error)
- func (b *BackupEndpoint) GetList(ctx context.Context, pagination common.PageParams) (items []*m.Backup, total int64, err error)
- func (b *BackupEndpoint) New(ctx context.Context) (err error)
- func (b *BackupEndpoint) Restore(ctx context.Context, name string) (err error)
- func (b *BackupEndpoint) RollbackChanges(ctx context.Context) (err error)
- func (b *BackupEndpoint) Upload(ctx context.Context, files map[string][]*multipart.FileHeader) (fileList []*m.Backup, errs []error, err error)
- type CommonEndpoint
- type ConditionEndpoint
- func (n *ConditionEndpoint) Add(ctx context.Context, condition *m.Condition) (result *m.Condition, err error)
- func (n *ConditionEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (n *ConditionEndpoint) GetById(ctx context.Context, id int64) (result *m.Condition, err error)
- func (n *ConditionEndpoint) GetList(ctx context.Context, pagination common.PageParams, ids *[]uint64) (result []*m.Condition, total int64, err error)
- func (n *ConditionEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*m.Condition, total int64, err error)
- func (n *ConditionEndpoint) Update(ctx context.Context, params *m.Condition) (result *m.Condition, err error)
- type DashboardCardEndpoint
- func (c *DashboardCardEndpoint) Add(ctx context.Context, card *models.DashboardCard) (result *models.DashboardCard, err error)
- func (c *DashboardCardEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (c *DashboardCardEndpoint) GetById(ctx context.Context, id int64) (card *models.DashboardCard, err error)
- func (c *DashboardCardEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*models.DashboardCard, total int64, err error)
- func (c *DashboardCardEndpoint) Import(ctx context.Context, card *models.DashboardCard) (result *models.DashboardCard, err error)
- func (i *DashboardCardEndpoint) Update(ctx context.Context, params *models.DashboardCard) (result *models.DashboardCard, err error)
- type DashboardCardItemEndpoint
- func (c *DashboardCardItemEndpoint) Add(ctx context.Context, cardItem *m.DashboardCardItem) (result *m.DashboardCardItem, err error)
- func (c *DashboardCardItemEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (c *DashboardCardItemEndpoint) GetById(ctx context.Context, id int64) (card *m.DashboardCardItem, err error)
- func (c *DashboardCardItemEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*m.DashboardCardItem, total int64, err error)
- func (c *DashboardCardItemEndpoint) Update(ctx context.Context, params *m.DashboardCardItem) (result *m.DashboardCardItem, err error)
- type DashboardEndpoint
- func (d *DashboardEndpoint) Add(ctx context.Context, board *models.Dashboard) (result *models.Dashboard, err error)
- func (d *DashboardEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (d *DashboardEndpoint) GetById(ctx context.Context, id int64) (board *models.Dashboard, err error)
- func (d *DashboardEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*models.Dashboard, total int64, err error)
- func (d *DashboardEndpoint) Import(ctx context.Context, board *models.Dashboard) (result *models.Dashboard, err error)
- func (d *DashboardEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*models.Dashboard, total int64, err error)
- func (i *DashboardEndpoint) Update(ctx context.Context, params *models.Dashboard) (result *models.Dashboard, err error)
- type DashboardTabEndpoint
- func (t *DashboardTabEndpoint) Add(ctx context.Context, tab *models.DashboardTab) (result *models.DashboardTab, err error)
- func (t *DashboardTabEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (t *DashboardTabEndpoint) GetById(ctx context.Context, id int64) (tab *models.DashboardTab, err error)
- func (t *DashboardTabEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*models.DashboardTab, total int64, err error)
- func (t *DashboardTabEndpoint) Import(ctx context.Context, tab *models.DashboardTab) (result *models.DashboardTab, err error)
- func (t *DashboardTabEndpoint) Update(ctx context.Context, params *models.DashboardTab) (result *models.DashboardTab, err error)
- type DeveloperToolsEndpoint
- func (d DeveloperToolsEndpoint) EntitySetState(ctx context.Context, entityId string, newState *string, ...) (err error)
- func (d *DeveloperToolsEndpoint) EntitySetStateName(ctx context.Context, id pkgCommon.EntityId, name string) (err error)
- func (d *DeveloperToolsEndpoint) GetEventBusState(ctx context.Context, pagination common.PageParams) (bus.Stats, int64, error)
- func (d *DeveloperToolsEndpoint) ReloadEntity(ctx context.Context, id pkgCommon.EntityId) (err error)
- func (d DeveloperToolsEndpoint) StateList(ctx context.Context) (states []m.EntityShort, total int64, err error)
- func (d *DeveloperToolsEndpoint) TaskCallAction(ctx context.Context, id int64, name string) (err error)
- func (d *DeveloperToolsEndpoint) TaskCallTrigger(ctx context.Context, id int64, name string) (err error)
- type Endpoint
- type EntityEndpoint
- func (n *EntityEndpoint) Add(ctx context.Context, entity *models.Entity) (result *models.Entity, err error)
- func (n *EntityEndpoint) Delete(ctx context.Context, id pkgCommon.EntityId) (err error)
- func (n *EntityEndpoint) Disable(ctx context.Context, id pkgCommon.EntityId) (err error)
- func (n *EntityEndpoint) Enable(ctx context.Context, id pkgCommon.EntityId) (err error)
- func (n *EntityEndpoint) GetById(ctx context.Context, id pkgCommon.EntityId) (result *models.Entity, err error)
- func (n *EntityEndpoint) Import(ctx context.Context, entity *models.Entity) (err error)
- func (n *EntityEndpoint) List(ctx context.Context, pagination common.PageParams, query, plugin *string, ...) (entities []*models.Entity, total int64, err error)
- func (n *EntityEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*models.Entity, total int64, err error)
- func (n *EntityEndpoint) Statistic(ctx context.Context) (statistic []*models.Statistic, err error)
- func (n *EntityEndpoint) Update(ctx context.Context, params *models.Entity) (result *models.Entity, err error)
- type EntityStorageEndpoint
- type ImageEndpoint
- func (i *ImageEndpoint) Add(ctx context.Context, params *m.Image) (image *m.Image, err error)
- func (i *ImageEndpoint) Delete(ctx context.Context, imageId int64) (err error)
- func (i *ImageEndpoint) GetById(ctx context.Context, imageId int64) (image *m.Image, err error)
- func (i *ImageEndpoint) GetFilterList(ctx context.Context) (filterList []*m.ImageFilterList, err error)
- func (i *ImageEndpoint) GetList(ctx context.Context, pagination common.PageParams) (items []*m.Image, total int64, err error)
- func (i *ImageEndpoint) GetListByDate(ctx context.Context, filter string) (images []*m.Image, err error)
- func (i *ImageEndpoint) Update(ctx context.Context, params *m.Image) (result *m.Image, err error)
- func (i *ImageEndpoint) Upload(ctx context.Context, files map[string][]*multipart.FileHeader) (fileList []*m.Image, errs []error)
- type InteractEndpoint
- type LogEndpoint
- func (l *LogEndpoint) Add(ctx context.Context, log *m.Log) (result *m.Log, err error)
- func (l *LogEndpoint) Delete(ctx context.Context, logId int64) (err error)
- func (l *LogEndpoint) GetById(ctx context.Context, id int64) (log *m.Log, err error)
- func (l *LogEndpoint) GetList(ctx context.Context, pagination common.PageParams, query *string, ...) (list []*m.Log, total int64, err error)
- func (l *LogEndpoint) Search(ctx context.Context, query string, limit, offset int) (list []*m.Log, total int64, err error)
- type MessageDeliveryEndpoint
- type MetricEndpoint
- type MqttEndpoint
- func (m *MqttEndpoint) CloseClient(clientId string) (err error)
- func (m *MqttEndpoint) GetClientById(ctx context.Context, clientId string) (client *admin2.ClientInfo, err error)
- func (m *MqttEndpoint) GetClientList(ctx context.Context, pagination common.PageParams) (list []*admin2.ClientInfo, total uint32, err error)
- func (m *MqttEndpoint) GetSession(clientId string) (session *admin2.SessionInfo, err error)
- func (m *MqttEndpoint) GetSessions(limit, offset uint) (list []*admin2.SessionInfo, total int, err error)
- func (m *MqttEndpoint) GetSubscriptionList(ctx context.Context, clientId *string, pagination common.PageParams) (list []*admin2.SubscriptionInfo, total int, err error)
- func (m *MqttEndpoint) Publish(topic string, qos int, payload []byte, retain bool) (err error)
- func (m *MqttEndpoint) SearchTopic(query string, limit, offset int) (result []*admin2.SubscriptionInfo, total int64, err error)
- func (m *MqttEndpoint) Subscribe(clientId, topic string, qos int) (err error)
- func (m *MqttEndpoint) Unsubscribe(clientId, topic string) (err error)
- type NotifyEndpoint
- type PluginEndpoint
- func (p *PluginEndpoint) Custom(w http.ResponseWriter, r *http.Request)
- func (p *PluginEndpoint) Disable(ctx context.Context, pluginName string) (err error)
- func (p *PluginEndpoint) Enable(ctx context.Context, pluginName string) (err error)
- func (p *PluginEndpoint) GetByName(ctx context.Context, pluginName string) (plugin *models.Plugin, err error)
- func (p *PluginEndpoint) GetList(ctx context.Context, pagination common.PageParams, enabled, triggers *bool) (plugins []*models.Plugin, total int64, err error)
- func (p *PluginEndpoint) GetOptions(ctx context.Context, pluginName string) (options models.PluginOptions, err error)
- func (p *PluginEndpoint) Readme(ctx context.Context, pluginName string, note *string, lang *string) (result []byte, err error)
- func (p *PluginEndpoint) RemovePlugin(ctx context.Context, pluginName string) (err error)
- func (p *PluginEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*models.Plugin, total int64, err error)
- func (p *PluginEndpoint) UpdateSettings(ctx context.Context, pluginName string, settings models.Attributes) (err error)
- func (p *PluginEndpoint) Upload(ctx context.Context, files map[string][]*multipart.FileHeader) (pluginList []*models.Plugin, errs []error, err error)
- type RoleEndpoint
- func (n *RoleEndpoint) Add(ctx context.Context, params *models.Role) (result *models.Role, err error)
- func (n *RoleEndpoint) Delete(ctx context.Context, name string) (err error)
- func (n *RoleEndpoint) GetAccessList(ctx context.Context, roleName string, ...) (accessList access_list.AccessList, err error)
- func (n *RoleEndpoint) GetByName(ctx context.Context, name string) (result *models.Role, err error)
- func (n *RoleEndpoint) GetList(ctx context.Context, pagination common.PageParams) (result []*models.Role, total int64, err error)
- func (n *RoleEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*models.Role, total int64, err error)
- func (n *RoleEndpoint) Update(ctx context.Context, params *models.Role) (result *models.Role, err error)
- func (n *RoleEndpoint) UpdateAccessList(ctx context.Context, roleName string, accessListDif map[string]map[string]bool) (err error)
- type ScriptEndpoint
- func (n *ScriptEndpoint) Add(ctx context.Context, params *models.Script) (script *models.Script, err error)
- func (n *ScriptEndpoint) Copy(ctx context.Context, scriptId int64) (script *models.Script, err error)
- func (n *ScriptEndpoint) DeleteScriptById(ctx context.Context, scriptId int64) (err error)
- func (n *ScriptEndpoint) Execute(ctx context.Context, scriptId int64) (result string, err error)
- func (n *ScriptEndpoint) ExecuteSource(ctx context.Context, script *models.Script) (result string, err error)
- func (n *ScriptEndpoint) GetById(ctx context.Context, scriptId int64) (result *models.Script, err error)
- func (n *ScriptEndpoint) GetList(ctx context.Context, pagination common.PageParams, query *string, ...) (result []*models.Script, total int64, err error)
- func (n *ScriptEndpoint) Search(ctx context.Context, query string, limit, offset int64) (devices []*models.Script, total int64, err error)
- func (n *ScriptEndpoint) Statistic(ctx context.Context) (statistic []*models.Statistic, err error)
- func (n *ScriptEndpoint) Update(ctx context.Context, script *models.Script) (result *models.Script, err error)
- type StreamEndpoint
- type TagEndpoint
- func (n *TagEndpoint) DeleteTagById(ctx context.Context, tagId int64) (err error)
- func (n *TagEndpoint) GetById(ctx context.Context, tagId int64) (result *m.Tag, err error)
- func (n *TagEndpoint) GetList(ctx context.Context, pagination common.PageParams, query *string, ...) (result []*m.Tag, total int64, err error)
- func (n *TagEndpoint) Search(ctx context.Context, query string, limit, offset int64) (tags []*m.Tag, total int64, err error)
- func (n *TagEndpoint) Update(ctx context.Context, tag *m.Tag) (result *m.Tag, err error)
- type TaskEndpoint
- func (n *TaskEndpoint) Add(ctx context.Context, task *models.NewTask) (result *models.Task, err error)
- func (n *TaskEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (n *TaskEndpoint) Disable(ctx context.Context, id int64) (err error)
- func (n *TaskEndpoint) Enable(ctx context.Context, id int64) (err error)
- func (n *TaskEndpoint) GetById(ctx context.Context, id int64) (task *models.Task, err error)
- func (n *TaskEndpoint) Import(ctx context.Context, task *models.Task) (result *models.Task, err error)
- func (n *TaskEndpoint) List(ctx context.Context, pagination common.PageParams) (tasks []*models.Task, total int64, err error)
- func (n *TaskEndpoint) Update(ctx context.Context, task *models.UpdateTask) (result *models.Task, err error)
- type TemplateEndpoint
- func (t *TemplateEndpoint) Delete(ctx context.Context, name string) (err error)
- func (t *TemplateEndpoint) GetByName(ctx context.Context, name string) (result *models.Template, err error)
- func (t *TemplateEndpoint) GetItemByName(ctx context.Context, name string) (result *models.Template, err error)
- func (t *TemplateEndpoint) GetItemsSortedList(ctx context.Context) (count int64, items []string, err error)
- func (t *TemplateEndpoint) GetItemsTree(ctx context.Context) (tree []*models.TemplateTree, err error)
- func (t *TemplateEndpoint) GetList(ctx context.Context) (count int64, templates []*models.Template, err error)
- func (t *TemplateEndpoint) Preview(ctx context.Context, template *models.TemplateContent) (data string, err error)
- func (t *TemplateEndpoint) Search(ctx context.Context, query string, limit, offset int) (result []*models.Template, total int64, err error)
- func (t *TemplateEndpoint) UpdateItemsTree(ctx context.Context, tree []*models.TemplateTree) (err error)
- func (t *TemplateEndpoint) UpdateOrCreate(ctx context.Context, params *models.Template) (err error)
- func (t *TemplateEndpoint) UpdateStatus(ctx context.Context, params *models.Template) (err error)
- type TriggerEndpoint
- func (n *TriggerEndpoint) Add(ctx context.Context, params *m.NewTrigger) (result *m.Trigger, err error)
- func (n *TriggerEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (n *TriggerEndpoint) Disable(ctx context.Context, id int64) (err error)
- func (n *TriggerEndpoint) Enable(ctx context.Context, id int64) (err error)
- func (n *TriggerEndpoint) GetById(ctx context.Context, id int64) (trigger *m.Trigger, err error)
- func (n *TriggerEndpoint) GetList(ctx context.Context, pagination common.PageParams, ids *[]uint64) (result []*m.Trigger, total int64, err error)
- func (n *TriggerEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*m.Trigger, total int64, err error)
- func (n *TriggerEndpoint) Update(ctx context.Context, params *m.UpdateTrigger) (result *m.Trigger, err error)
- type UserEndpoint
- func (n *UserEndpoint) Add(ctx context.Context, params *models.User, currentUser *models.User) (result *models.User, err error)
- func (n *UserEndpoint) Delete(ctx context.Context, userId int64) (err error)
- func (n *UserEndpoint) GetById(ctx context.Context, userId int64) (result *models.User, err error)
- func (n *UserEndpoint) GetList(ctx context.Context, pagination common.PageParams) (result []*models.User, total int64, err error)
- func (n *UserEndpoint) Update(ctx context.Context, params *models.User) (result *models.User, err error)
- func (n *UserEndpoint) UpdateStatus(ctx context.Context, userId int64, newStatus string) (err error)
- type VariableEndpoint
- func (v *VariableEndpoint) Add(ctx context.Context, variable m.Variable) (err error)
- func (n *VariableEndpoint) CreateOrUpdate(ctx context.Context, variable m.Variable) (err error)
- func (v *VariableEndpoint) Delete(ctx context.Context, name string) (err error)
- func (v *VariableEndpoint) GetById(ctx context.Context, name string) (variable m.Variable, err error)
- func (v *VariableEndpoint) GetList(ctx context.Context, pagination common.PageParams, query *string, ...) (list []m.Variable, total int64, err error)
- func (n *VariableEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []m.Variable, total int64, err error)
- func (v *VariableEndpoint) Update(ctx context.Context, _variable m.Variable) (err error)
- type VersionEndpoint
- type Zigbee2mqttEndpoint
- func (n *Zigbee2mqttEndpoint) AddBridge(ctx context.Context, params *models.Zigbee2mqtt) (bridge *models.Zigbee2mqtt, err error)
- func (n *Zigbee2mqttEndpoint) Delete(ctx context.Context, id int64) (err error)
- func (n *Zigbee2mqttEndpoint) DeviceBan(_ context.Context, id int64, friendlyName string) (err error)
- func (n *Zigbee2mqttEndpoint) DeviceList(ctx context.Context, bridgeId int64, pagination common.PageParams) (result []*models.Zigbee2mqttDevice, total int64, err error)
- func (n *Zigbee2mqttEndpoint) DeviceRename(_ context.Context, friendlyName, name string) (err error)
- func (n *Zigbee2mqttEndpoint) DeviceWhitelist(_ context.Context, id int64, friendlyName string) (err error)
- func (n *Zigbee2mqttEndpoint) GetBridgeById(ctx context.Context, id int64) (bridge *models.Zigbee2mqtt, err error)
- func (n *Zigbee2mqttEndpoint) GetBridgeList(ctx context.Context, pagination common.PageParams) (list []*models.Zigbee2mqtt, total int64, err error)
- func (n *Zigbee2mqttEndpoint) Networkmap(_ context.Context, id int64) (networkmap string, err error)
- func (n *Zigbee2mqttEndpoint) ResetBridge(_ context.Context, id int64) (err error)
- func (n *Zigbee2mqttEndpoint) SearchDevice(ctx context.Context, search common.SearchParams) (result []*models.Zigbee2mqttDevice, total int64, err error)
- func (n *Zigbee2mqttEndpoint) UpdateBridge(ctx context.Context, params *models.Zigbee2mqtt) (bridge *models.Zigbee2mqtt, err error)
- func (n *Zigbee2mqttEndpoint) UpdateNetworkmap(_ context.Context, id int64) (err error)
Constants ¶
const (
// AdminId ...
AdminId = 1
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionEndpoint ¶
type ActionEndpoint struct {
*CommonEndpoint
}
ActionEndpoint ...
func NewActionEndpoint ¶
func NewActionEndpoint(common *CommonEndpoint) *ActionEndpoint
NewActionEndpoint ...
func (*ActionEndpoint) Delete ¶
func (n *ActionEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*ActionEndpoint) GetList ¶
func (n *ActionEndpoint) GetList(ctx context.Context, pagination common.PageParams, ids *[]uint64) (result []*m.Action, total int64, err error)
GetList ...
type AlexaSkillEndpoint ¶
type AlexaSkillEndpoint struct {
*CommonEndpoint
}
AlexaSkillEndpoint ...
func NewAlexaSkillEndpoint ¶
func NewAlexaSkillEndpoint(common *CommonEndpoint) *AlexaSkillEndpoint
NewAlexaSkillEndpoint ...
func (*AlexaSkillEndpoint) Add ¶
func (n *AlexaSkillEndpoint) Add(ctx context.Context, params *m.AlexaSkill) (result *m.AlexaSkill, err error)
Add ...
func (*AlexaSkillEndpoint) Delete ¶
func (n *AlexaSkillEndpoint) Delete(ctx context.Context, skillId int64) (err error)
Delete ...
func (*AlexaSkillEndpoint) GetById ¶
func (n *AlexaSkillEndpoint) GetById(ctx context.Context, appId int64) (result *m.AlexaSkill, err error)
GetById ...
func (*AlexaSkillEndpoint) GetList ¶
func (n *AlexaSkillEndpoint) GetList(ctx context.Context, limit, offset int64, order, sortBy string) (result []*m.AlexaSkill, total int64, err error)
GetList ...
func (*AlexaSkillEndpoint) Update ¶
func (n *AlexaSkillEndpoint) Update(ctx context.Context, params *m.AlexaSkill) (skill *m.AlexaSkill, err error)
Update ...
type AreaEndpoint ¶
type AreaEndpoint struct {
*CommonEndpoint
}
AreaEndpoint ...
func NewAreaEndpoint ¶
func NewAreaEndpoint(common *CommonEndpoint) *AreaEndpoint
NewAreaEndpoint ...
func (*AreaEndpoint) Delete ¶
func (n *AreaEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*AreaEndpoint) GetList ¶
func (n *AreaEndpoint) GetList(ctx context.Context, pagination common.PageParams) (result []*m.Area, total int64, err error)
GetList ...
type AuthEndpoint ¶
type AuthEndpoint struct {
*CommonEndpoint
}
AuthEndpoint ...
func NewAuthEndpoint ¶
func NewAuthEndpoint(common *CommonEndpoint) *AuthEndpoint
NewAuthEndpoint ...
func (*AuthEndpoint) AccessList ¶
func (a *AuthEndpoint) AccessList(ctx context.Context, user *models.User, accessListService access_list.AccessListService) (accessList *access_list.AccessList, err error)
AccessList ...
func (*AuthEndpoint) PasswordReset ¶
func (a *AuthEndpoint) PasswordReset(ctx context.Context, userEmail string, token, newPassword *string) (err error)
PasswordReset ...
type AutomationEndpoint ¶
type AutomationEndpoint struct {
*CommonEndpoint
}
AutomationEndpoint ...
func NewAutomationEndpoint ¶
func NewAutomationEndpoint(common *CommonEndpoint) *AutomationEndpoint
NewAutomationEndpoint ...
type BackupEndpoint ¶
type BackupEndpoint struct { *CommonEndpoint // contains filtered or unexported fields }
BackupEndpoint ...
func NewBackupEndpoint ¶
func NewBackupEndpoint(common *CommonEndpoint, backup *backup.Backup) *BackupEndpoint
NewBackupEndpoint ...
func (*BackupEndpoint) ApplyChanges ¶
func (b *BackupEndpoint) ApplyChanges(ctx context.Context) (err error)
func (*BackupEndpoint) Delete ¶
func (b *BackupEndpoint) Delete(ctx context.Context, name string) (err error)
func (*BackupEndpoint) GetList ¶
func (b *BackupEndpoint) GetList(ctx context.Context, pagination common.PageParams) (items []*m.Backup, total int64, err error)
GetList ...
func (*BackupEndpoint) Restore ¶
func (b *BackupEndpoint) Restore(ctx context.Context, name string) (err error)
Restore ...
func (*BackupEndpoint) RollbackChanges ¶
func (b *BackupEndpoint) RollbackChanges(ctx context.Context) (err error)
type CommonEndpoint ¶
type CommonEndpoint struct {
// contains filtered or unexported fields
}
CommonEndpoint ...
func NewCommonEndpoint ¶
func NewCommonEndpoint(adaptors *adaptors.Adaptors, accessList access_list.AccessListService, scriptService scripts.ScriptService, zigbee2mqtt zigbee2mqtt.Zigbee2mqtt, eventBus bus.Bus, supervisor plugins.Supervisor, mqtt mqtt.MqttServ, jwtManager jwt_manager.JwtManager, validation *validation.Validate, appConfig *m.AppConfig, automation automation.Automation, ) *CommonEndpoint
NewCommonEndpoint ...
type ConditionEndpoint ¶
type ConditionEndpoint struct {
*CommonEndpoint
}
ConditionEndpoint ...
func NewConditionEndpoint ¶
func NewConditionEndpoint(common *CommonEndpoint) *ConditionEndpoint
NewConditionEndpoint ...
func (*ConditionEndpoint) Add ¶
func (n *ConditionEndpoint) Add(ctx context.Context, condition *m.Condition) (result *m.Condition, err error)
Add ...
func (*ConditionEndpoint) Delete ¶
func (n *ConditionEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*ConditionEndpoint) GetList ¶
func (n *ConditionEndpoint) GetList(ctx context.Context, pagination common.PageParams, ids *[]uint64) (result []*m.Condition, total int64, err error)
GetList ...
type DashboardCardEndpoint ¶
type DashboardCardEndpoint struct {
*CommonEndpoint
}
DashboardCardEndpoint ...
func NewDashboardCardEndpoint ¶
func NewDashboardCardEndpoint(common *CommonEndpoint) *DashboardCardEndpoint
NewDashboardCardEndpoint ...
func (*DashboardCardEndpoint) Add ¶
func (c *DashboardCardEndpoint) Add(ctx context.Context, card *models.DashboardCard) (result *models.DashboardCard, err error)
Add ...
func (*DashboardCardEndpoint) Delete ¶
func (c *DashboardCardEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*DashboardCardEndpoint) GetById ¶
func (c *DashboardCardEndpoint) GetById(ctx context.Context, id int64) (card *models.DashboardCard, err error)
GetById ...
func (*DashboardCardEndpoint) GetList ¶
func (c *DashboardCardEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*models.DashboardCard, total int64, err error)
GetList ...
func (*DashboardCardEndpoint) Import ¶
func (c *DashboardCardEndpoint) Import(ctx context.Context, card *models.DashboardCard) (result *models.DashboardCard, err error)
Import ...
func (*DashboardCardEndpoint) Update ¶
func (i *DashboardCardEndpoint) Update(ctx context.Context, params *models.DashboardCard) (result *models.DashboardCard, err error)
Update ...
type DashboardCardItemEndpoint ¶
type DashboardCardItemEndpoint struct {
*CommonEndpoint
}
DashboardCardItemEndpoint ...
func NewDashboardCardItemEndpoint ¶
func NewDashboardCardItemEndpoint(common *CommonEndpoint) *DashboardCardItemEndpoint
NewDashboardCardItemEndpoint ...
func (*DashboardCardItemEndpoint) Add ¶
func (c *DashboardCardItemEndpoint) Add(ctx context.Context, cardItem *m.DashboardCardItem) (result *m.DashboardCardItem, err error)
Add ...
func (*DashboardCardItemEndpoint) Delete ¶
func (c *DashboardCardItemEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*DashboardCardItemEndpoint) GetById ¶
func (c *DashboardCardItemEndpoint) GetById(ctx context.Context, id int64) (card *m.DashboardCardItem, err error)
GetById ...
func (*DashboardCardItemEndpoint) GetList ¶
func (c *DashboardCardItemEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*m.DashboardCardItem, total int64, err error)
GetList ...
func (*DashboardCardItemEndpoint) Update ¶
func (c *DashboardCardItemEndpoint) Update(ctx context.Context, params *m.DashboardCardItem) (result *m.DashboardCardItem, err error)
Update ...
type DashboardEndpoint ¶
type DashboardEndpoint struct {
*CommonEndpoint
}
DashboardEndpoint ...
func NewDashboardEndpoint ¶
func NewDashboardEndpoint(common *CommonEndpoint) *DashboardEndpoint
NewDashboardEndpoint ...
func (*DashboardEndpoint) Add ¶
func (d *DashboardEndpoint) Add(ctx context.Context, board *models.Dashboard) (result *models.Dashboard, err error)
Add ...
func (*DashboardEndpoint) Delete ¶
func (d *DashboardEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*DashboardEndpoint) GetById ¶
func (d *DashboardEndpoint) GetById(ctx context.Context, id int64) (board *models.Dashboard, err error)
GetById ...
func (*DashboardEndpoint) GetList ¶
func (d *DashboardEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*models.Dashboard, total int64, err error)
GetList ...
func (*DashboardEndpoint) Import ¶
func (d *DashboardEndpoint) Import(ctx context.Context, board *models.Dashboard) (result *models.Dashboard, err error)
Import ...
type DashboardTabEndpoint ¶
type DashboardTabEndpoint struct {
*CommonEndpoint
}
DashboardTabEndpoint ...
func NewDashboardTabEndpoint ¶
func NewDashboardTabEndpoint(common *CommonEndpoint) *DashboardTabEndpoint
NewDashboardTabEndpoint ...
func (*DashboardTabEndpoint) Add ¶
func (t *DashboardTabEndpoint) Add(ctx context.Context, tab *models.DashboardTab) (result *models.DashboardTab, err error)
Add ...
func (*DashboardTabEndpoint) Delete ¶
func (t *DashboardTabEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*DashboardTabEndpoint) GetById ¶
func (t *DashboardTabEndpoint) GetById(ctx context.Context, id int64) (tab *models.DashboardTab, err error)
GetById ...
func (*DashboardTabEndpoint) GetList ¶
func (t *DashboardTabEndpoint) GetList(ctx context.Context, pagination common.PageParams) (list []*models.DashboardTab, total int64, err error)
GetList ...
func (*DashboardTabEndpoint) Import ¶
func (t *DashboardTabEndpoint) Import(ctx context.Context, tab *models.DashboardTab) (result *models.DashboardTab, err error)
Import ...
func (*DashboardTabEndpoint) Update ¶
func (t *DashboardTabEndpoint) Update(ctx context.Context, params *models.DashboardTab) (result *models.DashboardTab, err error)
Update ...
type DeveloperToolsEndpoint ¶
type DeveloperToolsEndpoint struct {
*CommonEndpoint
}
DeveloperToolsEndpoint ...
func NewDeveloperToolsEndpoint ¶
func NewDeveloperToolsEndpoint(common *CommonEndpoint) *DeveloperToolsEndpoint
NewDeveloperToolsEndpoint ...
func (DeveloperToolsEndpoint) EntitySetState ¶
func (d DeveloperToolsEndpoint) EntitySetState(ctx context.Context, entityId string, newState *string, attrs map[string]interface{}) (err error)
EntitySetState ...
func (*DeveloperToolsEndpoint) EntitySetStateName ¶
func (d *DeveloperToolsEndpoint) EntitySetStateName(ctx context.Context, id pkgCommon.EntityId, name string) (err error)
EntitySetStateName ...
func (*DeveloperToolsEndpoint) GetEventBusState ¶
func (d *DeveloperToolsEndpoint) GetEventBusState(ctx context.Context, pagination common.PageParams) (bus.Stats, int64, error)
GetEventBusState ...
func (*DeveloperToolsEndpoint) ReloadEntity ¶
func (d *DeveloperToolsEndpoint) ReloadEntity(ctx context.Context, id pkgCommon.EntityId) (err error)
ReloadEntity ...
func (DeveloperToolsEndpoint) StateList ¶
func (d DeveloperToolsEndpoint) StateList(ctx context.Context) (states []m.EntityShort, total int64, err error)
StateList ...
func (*DeveloperToolsEndpoint) TaskCallAction ¶
func (d *DeveloperToolsEndpoint) TaskCallAction(ctx context.Context, id int64, name string) (err error)
TaskCallAction ...
func (*DeveloperToolsEndpoint) TaskCallTrigger ¶
func (d *DeveloperToolsEndpoint) TaskCallTrigger(ctx context.Context, id int64, name string) (err error)
TaskCallTrigger ...
type Endpoint ¶
type Endpoint struct { AlexaSkill *AlexaSkillEndpoint Auth *AuthEndpoint Image *ImageEndpoint Log *LogEndpoint Role *RoleEndpoint Script *ScriptEndpoint Tag *TagEndpoint User *UserEndpoint Template *TemplateEndpoint Notify *NotifyEndpoint MessageDelivery *MessageDeliveryEndpoint Version *VersionEndpoint Zigbee2mqtt *Zigbee2mqttEndpoint Entity *EntityEndpoint DeveloperTools *DeveloperToolsEndpoint Mqtt *MqttEndpoint Plugin *PluginEndpoint Action *ActionEndpoint Condition *ConditionEndpoint Trigger *TriggerEndpoint Task *TaskEndpoint Area *AreaEndpoint Interact *InteractEndpoint Dashboard *DashboardEndpoint DashboardTab *DashboardTabEndpoint DashboardCard *DashboardCardEndpoint DashboardCardItem *DashboardCardItemEndpoint Variable *VariableEndpoint EntityStorage *EntityStorageEndpoint Metric *MetricEndpoint Backup *BackupEndpoint Stream *StreamEndpoint Automation *AutomationEndpoint }
Endpoint ...
func NewEndpoint ¶
NewEndpoint ...
type EntityEndpoint ¶
type EntityEndpoint struct {
*CommonEndpoint
}
EntityEndpoint ...
func NewEntityEndpoint ¶
func NewEntityEndpoint(common *CommonEndpoint) *EntityEndpoint
NewEntityEndpoint ...
func (*EntityEndpoint) Add ¶
func (n *EntityEndpoint) Add(ctx context.Context, entity *models.Entity) (result *models.Entity, err error)
Add ...
func (*EntityEndpoint) GetById ¶
func (n *EntityEndpoint) GetById(ctx context.Context, id pkgCommon.EntityId) (result *models.Entity, err error)
GetById ...
func (*EntityEndpoint) List ¶
func (n *EntityEndpoint) List(ctx context.Context, pagination common.PageParams, query, plugin *string, areaId *int64, tags *[]string) (entities []*models.Entity, total int64, err error)
List ...
func (*EntityEndpoint) Search ¶
func (n *EntityEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*models.Entity, total int64, err error)
Search ...
type EntityStorageEndpoint ¶
type EntityStorageEndpoint struct {
*CommonEndpoint
}
EntityStorageEndpoint ...
func NewEntityStorageEndpoint ¶
func NewEntityStorageEndpoint(common *CommonEndpoint) *EntityStorageEndpoint
NewEntityStorageEndpoint ...
func (*EntityStorageEndpoint) GetList ¶
func (i *EntityStorageEndpoint) GetList(ctx context.Context, entityIds []pkgCommon.EntityId, pagination common.PageParams, startDate, endDate *time.Time) (result *models.EntityStorageList, total int64, err error)
GetList ...
type ImageEndpoint ¶
type ImageEndpoint struct {
*CommonEndpoint
}
ImageEndpoint ...
func NewImageEndpoint ¶
func NewImageEndpoint(common *CommonEndpoint) *ImageEndpoint
NewImageEndpoint ...
func (*ImageEndpoint) Delete ¶
func (i *ImageEndpoint) Delete(ctx context.Context, imageId int64) (err error)
Delete ...
func (*ImageEndpoint) GetFilterList ¶
func (i *ImageEndpoint) GetFilterList(ctx context.Context) (filterList []*m.ImageFilterList, err error)
GetFilterList ...
func (*ImageEndpoint) GetList ¶
func (i *ImageEndpoint) GetList(ctx context.Context, pagination common.PageParams) (items []*m.Image, total int64, err error)
GetList ...
func (*ImageEndpoint) GetListByDate ¶
func (i *ImageEndpoint) GetListByDate(ctx context.Context, filter string) (images []*m.Image, err error)
GetListByDate ...
type InteractEndpoint ¶
type InteractEndpoint struct {
*CommonEndpoint
}
InteractEndpoint ...
func NewInteractEndpoint ¶
func NewInteractEndpoint(common *CommonEndpoint) *InteractEndpoint
NewInteractEndpoint ...
type LogEndpoint ¶
type LogEndpoint struct {
*CommonEndpoint
}
LogEndpoint ...
func (*LogEndpoint) Delete ¶
func (l *LogEndpoint) Delete(ctx context.Context, logId int64) (err error)
Delete ...
type MessageDeliveryEndpoint ¶
type MessageDeliveryEndpoint struct {
*CommonEndpoint
}
MessageDeliveryEndpoint ...
func NewMessageDeliveryEndpoint ¶
func NewMessageDeliveryEndpoint(common *CommonEndpoint) *MessageDeliveryEndpoint
NewMessageDeliveryEndpoint ...
func (*MessageDeliveryEndpoint) Delete ¶
func (n *MessageDeliveryEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*MessageDeliveryEndpoint) List ¶
func (n *MessageDeliveryEndpoint) List(ctx context.Context, pagination common.PageParams, query *string, startDate, endDate *time.Time) (result []*m.MessageDelivery, total int64, err error)
List ...
type MetricEndpoint ¶
type MetricEndpoint struct {
*CommonEndpoint
}
MetricEndpoint ...
func NewMetricEndpoint ¶
func NewMetricEndpoint(common *CommonEndpoint) *MetricEndpoint
NewMetricEndpoint ...
type MqttEndpoint ¶
type MqttEndpoint struct {
*CommonEndpoint
}
MqttEndpoint ...
func NewMqttEndpoint ¶
func NewMqttEndpoint(common *CommonEndpoint) *MqttEndpoint
NewMqttEndpoint ...
func (*MqttEndpoint) CloseClient ¶
func (m *MqttEndpoint) CloseClient(clientId string) (err error)
CloseClient ...
func (*MqttEndpoint) GetClientById ¶
func (m *MqttEndpoint) GetClientById(ctx context.Context, clientId string) (client *admin2.ClientInfo, err error)
GetClientById ...
func (*MqttEndpoint) GetClientList ¶
func (m *MqttEndpoint) GetClientList(ctx context.Context, pagination common.PageParams) (list []*admin2.ClientInfo, total uint32, err error)
GetClientList ...
func (*MqttEndpoint) GetSession ¶
func (m *MqttEndpoint) GetSession(clientId string) (session *admin2.SessionInfo, err error)
GetSession ...
func (*MqttEndpoint) GetSessions ¶
func (m *MqttEndpoint) GetSessions(limit, offset uint) (list []*admin2.SessionInfo, total int, err error)
GetSessions ...
func (*MqttEndpoint) GetSubscriptionList ¶
func (m *MqttEndpoint) GetSubscriptionList(ctx context.Context, clientId *string, pagination common.PageParams) (list []*admin2.SubscriptionInfo, total int, err error)
GetSubscriptionList ...
func (*MqttEndpoint) SearchTopic ¶
func (m *MqttEndpoint) SearchTopic(query string, limit, offset int) (result []*admin2.SubscriptionInfo, total int64, err error)
SearchTopic ...
func (*MqttEndpoint) Subscribe ¶
func (m *MqttEndpoint) Subscribe(clientId, topic string, qos int) (err error)
Subscribe ...
func (*MqttEndpoint) Unsubscribe ¶
func (m *MqttEndpoint) Unsubscribe(clientId, topic string) (err error)
Unsubscribe ...
type NotifyEndpoint ¶
type NotifyEndpoint struct {
*CommonEndpoint
}
NotifyEndpoint ...
func NewNotifyEndpoint ¶
func NewNotifyEndpoint(common *CommonEndpoint) *NotifyEndpoint
NewNotifyEndpoint ...
func (*NotifyEndpoint) Repeat ¶
func (n *NotifyEndpoint) Repeat(ctx context.Context, id int64) (err error)
Repeat ...
func (*NotifyEndpoint) Send ¶
func (n *NotifyEndpoint) Send(ctx context.Context, params *models.NewNotifrMessage) (err error)
Send ...
type PluginEndpoint ¶
type PluginEndpoint struct {
*CommonEndpoint
}
PluginEndpoint ...
func NewPluginEndpoint ¶
func NewPluginEndpoint(common *CommonEndpoint) *PluginEndpoint
NewPluginEndpoint ...
func (*PluginEndpoint) Custom ¶ added in v0.21.1
func (p *PluginEndpoint) Custom(w http.ResponseWriter, r *http.Request)
Custom ...
func (*PluginEndpoint) Disable ¶
func (p *PluginEndpoint) Disable(ctx context.Context, pluginName string) (err error)
Disable ...
func (*PluginEndpoint) Enable ¶
func (p *PluginEndpoint) Enable(ctx context.Context, pluginName string) (err error)
Enable ...
func (*PluginEndpoint) GetByName ¶
func (p *PluginEndpoint) GetByName(ctx context.Context, pluginName string) (plugin *models.Plugin, err error)
GetByName ...
func (*PluginEndpoint) GetList ¶
func (p *PluginEndpoint) GetList(ctx context.Context, pagination common.PageParams, enabled, triggers *bool) (plugins []*models.Plugin, total int64, err error)
GetList ...
func (*PluginEndpoint) GetOptions ¶
func (p *PluginEndpoint) GetOptions(ctx context.Context, pluginName string) (options models.PluginOptions, err error)
GetOptions ...
func (*PluginEndpoint) RemovePlugin ¶
func (p *PluginEndpoint) RemovePlugin(ctx context.Context, pluginName string) (err error)
func (*PluginEndpoint) Search ¶
func (p *PluginEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*models.Plugin, total int64, err error)
Search ...
func (*PluginEndpoint) UpdateSettings ¶
func (p *PluginEndpoint) UpdateSettings(ctx context.Context, pluginName string, settings models.Attributes) (err error)
UpdateSettings ...
type RoleEndpoint ¶
type RoleEndpoint struct {
*CommonEndpoint
}
RoleEndpoint ...
func NewRoleEndpoint ¶
func NewRoleEndpoint(common *CommonEndpoint) *RoleEndpoint
NewRoleEndpoint ...
func (*RoleEndpoint) Add ¶
func (n *RoleEndpoint) Add(ctx context.Context, params *models.Role) (result *models.Role, err error)
Add ...
func (*RoleEndpoint) Delete ¶
func (n *RoleEndpoint) Delete(ctx context.Context, name string) (err error)
Delete ...
func (*RoleEndpoint) GetAccessList ¶
func (n *RoleEndpoint) GetAccessList(ctx context.Context, roleName string, accessListService access_list.AccessListService) (accessList access_list.AccessList, err error)
GetAccessList ...
func (*RoleEndpoint) GetList ¶
func (n *RoleEndpoint) GetList(ctx context.Context, pagination common.PageParams) (result []*models.Role, total int64, err error)
GetList ...
func (*RoleEndpoint) Search ¶
func (n *RoleEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*models.Role, total int64, err error)
Search ...
func (*RoleEndpoint) Update ¶
func (n *RoleEndpoint) Update(ctx context.Context, params *models.Role) (result *models.Role, err error)
Update ...
func (*RoleEndpoint) UpdateAccessList ¶
func (n *RoleEndpoint) UpdateAccessList(ctx context.Context, roleName string, accessListDif map[string]map[string]bool) (err error)
UpdateAccessList ...
type ScriptEndpoint ¶
type ScriptEndpoint struct {
*CommonEndpoint
}
ScriptEndpoint ...
func NewScriptEndpoint ¶
func NewScriptEndpoint(common *CommonEndpoint) *ScriptEndpoint
NewScriptEndpoint ...
func (*ScriptEndpoint) Add ¶
func (n *ScriptEndpoint) Add(ctx context.Context, params *models.Script) (script *models.Script, err error)
Add ...
func (*ScriptEndpoint) Copy ¶
func (n *ScriptEndpoint) Copy(ctx context.Context, scriptId int64) (script *models.Script, err error)
Copy ...
func (*ScriptEndpoint) DeleteScriptById ¶
func (n *ScriptEndpoint) DeleteScriptById(ctx context.Context, scriptId int64) (err error)
DeleteScriptById ...
func (*ScriptEndpoint) ExecuteSource ¶
func (n *ScriptEndpoint) ExecuteSource(ctx context.Context, script *models.Script) (result string, err error)
ExecuteSource ...
func (*ScriptEndpoint) GetById ¶
func (n *ScriptEndpoint) GetById(ctx context.Context, scriptId int64) (result *models.Script, err error)
GetById ...
func (*ScriptEndpoint) GetList ¶
func (n *ScriptEndpoint) GetList(ctx context.Context, pagination common.PageParams, query *string, ids *[]uint64) (result []*models.Script, total int64, err error)
GetList ...
func (*ScriptEndpoint) Search ¶
func (n *ScriptEndpoint) Search(ctx context.Context, query string, limit, offset int64) (devices []*models.Script, total int64, err error)
Search ...
type StreamEndpoint ¶
type StreamEndpoint struct { *CommonEndpoint // contains filtered or unexported fields }
func NewStreamEndpoint ¶
func NewStreamEndpoint(common *CommonEndpoint, stream *stream.Stream) *StreamEndpoint
NewStreamEndpoint ...
type TagEndpoint ¶
type TagEndpoint struct {
*CommonEndpoint
}
TagEndpoint ...
func (*TagEndpoint) DeleteTagById ¶
func (n *TagEndpoint) DeleteTagById(ctx context.Context, tagId int64) (err error)
DeleteTagById ...
func (*TagEndpoint) GetList ¶
func (n *TagEndpoint) GetList(ctx context.Context, pagination common.PageParams, query *string, names *[]string) (result []*m.Tag, total int64, err error)
GetList ...
type TaskEndpoint ¶
type TaskEndpoint struct {
*CommonEndpoint
}
TaskEndpoint ...
func NewTaskEndpoint ¶
func NewTaskEndpoint(common *CommonEndpoint) *TaskEndpoint
NewTaskEndpoint ...
func (*TaskEndpoint) Add ¶
func (n *TaskEndpoint) Add(ctx context.Context, task *models.NewTask) (result *models.Task, err error)
Add ...
func (*TaskEndpoint) Delete ¶
func (n *TaskEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*TaskEndpoint) Disable ¶
func (n *TaskEndpoint) Disable(ctx context.Context, id int64) (err error)
Disable ...
func (*TaskEndpoint) Enable ¶
func (n *TaskEndpoint) Enable(ctx context.Context, id int64) (err error)
Enable ...
func (*TaskEndpoint) Import ¶
func (n *TaskEndpoint) Import(ctx context.Context, task *models.Task) (result *models.Task, err error)
Import ...
func (*TaskEndpoint) List ¶
func (n *TaskEndpoint) List(ctx context.Context, pagination common.PageParams) (tasks []*models.Task, total int64, err error)
List ...
func (*TaskEndpoint) Update ¶
func (n *TaskEndpoint) Update(ctx context.Context, task *models.UpdateTask) (result *models.Task, err error)
Update ...
type TemplateEndpoint ¶
type TemplateEndpoint struct {
*CommonEndpoint
}
TemplateEndpoint ...
func NewTemplateEndpoint ¶
func NewTemplateEndpoint(common *CommonEndpoint) *TemplateEndpoint
NewTemplateEndpoint ...
func (*TemplateEndpoint) Delete ¶
func (t *TemplateEndpoint) Delete(ctx context.Context, name string) (err error)
Delete ...
func (*TemplateEndpoint) GetByName ¶
func (t *TemplateEndpoint) GetByName(ctx context.Context, name string) (result *models.Template, err error)
GetByName ...
func (*TemplateEndpoint) GetItemByName ¶
func (t *TemplateEndpoint) GetItemByName(ctx context.Context, name string) (result *models.Template, err error)
GetItemByName ...
func (*TemplateEndpoint) GetItemsSortedList ¶
func (t *TemplateEndpoint) GetItemsSortedList(ctx context.Context) (count int64, items []string, err error)
GetItemsSortedList ...
func (*TemplateEndpoint) GetItemsTree ¶
func (t *TemplateEndpoint) GetItemsTree(ctx context.Context) (tree []*models.TemplateTree, err error)
GetItemsTree ...
func (*TemplateEndpoint) GetList ¶
func (t *TemplateEndpoint) GetList(ctx context.Context) (count int64, templates []*models.Template, err error)
GetList ...
func (*TemplateEndpoint) Preview ¶
func (t *TemplateEndpoint) Preview(ctx context.Context, template *models.TemplateContent) (data string, err error)
Preview ...
func (*TemplateEndpoint) Search ¶
func (t *TemplateEndpoint) Search(ctx context.Context, query string, limit, offset int) (result []*models.Template, total int64, err error)
Search ...
func (*TemplateEndpoint) UpdateItemsTree ¶
func (t *TemplateEndpoint) UpdateItemsTree(ctx context.Context, tree []*models.TemplateTree) (err error)
UpdateItemsTree ...
func (*TemplateEndpoint) UpdateOrCreate ¶
UpdateOrCreate ...
func (*TemplateEndpoint) UpdateStatus ¶
UpdateStatus ...
type TriggerEndpoint ¶
type TriggerEndpoint struct {
*CommonEndpoint
}
TriggerEndpoint ...
func NewTriggerEndpoint ¶
func NewTriggerEndpoint(common *CommonEndpoint) *TriggerEndpoint
NewTriggerEndpoint ...
func (*TriggerEndpoint) Add ¶
func (n *TriggerEndpoint) Add(ctx context.Context, params *m.NewTrigger) (result *m.Trigger, err error)
Add ...
func (*TriggerEndpoint) Delete ¶
func (n *TriggerEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*TriggerEndpoint) Disable ¶
func (n *TriggerEndpoint) Disable(ctx context.Context, id int64) (err error)
Disable ...
func (*TriggerEndpoint) Enable ¶
func (n *TriggerEndpoint) Enable(ctx context.Context, id int64) (err error)
Enable ...
func (*TriggerEndpoint) GetList ¶
func (n *TriggerEndpoint) GetList(ctx context.Context, pagination common.PageParams, ids *[]uint64) (result []*m.Trigger, total int64, err error)
GetList ...
func (*TriggerEndpoint) Search ¶
func (n *TriggerEndpoint) Search(ctx context.Context, query string, limit, offset int64) (result []*m.Trigger, total int64, err error)
Search ...
func (*TriggerEndpoint) Update ¶
func (n *TriggerEndpoint) Update(ctx context.Context, params *m.UpdateTrigger) (result *m.Trigger, err error)
Update ...
type UserEndpoint ¶
type UserEndpoint struct {
*CommonEndpoint
}
UserEndpoint ...
func NewUserEndpoint ¶
func NewUserEndpoint(common *CommonEndpoint) *UserEndpoint
NewUserEndpoint ...
func (*UserEndpoint) Add ¶
func (n *UserEndpoint) Add(ctx context.Context, params *models.User, currentUser *models.User) (result *models.User, err error)
Add ...
func (*UserEndpoint) Delete ¶
func (n *UserEndpoint) Delete(ctx context.Context, userId int64) (err error)
Delete ...
func (*UserEndpoint) GetList ¶
func (n *UserEndpoint) GetList(ctx context.Context, pagination common.PageParams) (result []*models.User, total int64, err error)
GetList ...
func (*UserEndpoint) Update ¶
func (n *UserEndpoint) Update(ctx context.Context, params *models.User) (result *models.User, err error)
Update ...
func (*UserEndpoint) UpdateStatus ¶
func (n *UserEndpoint) UpdateStatus(ctx context.Context, userId int64, newStatus string) (err error)
UpdateStatus ...
type VariableEndpoint ¶
type VariableEndpoint struct {
*CommonEndpoint
}
VariableEndpoint ...
func NewVariableEndpoint ¶
func NewVariableEndpoint(common *CommonEndpoint) *VariableEndpoint
NewVariableEndpoint ...
func (*VariableEndpoint) CreateOrUpdate ¶
CreateOrUpdate ...
func (*VariableEndpoint) Delete ¶
func (v *VariableEndpoint) Delete(ctx context.Context, name string) (err error)
Delete ...
func (*VariableEndpoint) GetById ¶
func (v *VariableEndpoint) GetById(ctx context.Context, name string) (variable m.Variable, err error)
GetById ...
func (*VariableEndpoint) GetList ¶
func (v *VariableEndpoint) GetList(ctx context.Context, pagination common.PageParams, query *string, tags *[]string, entityIds *[]string) (list []m.Variable, total int64, err error)
GetList ...
type VersionEndpoint ¶
type VersionEndpoint struct {
*CommonEndpoint
}
VersionEndpoint ...
func NewVersionEndpoint ¶
func NewVersionEndpoint(common *CommonEndpoint) *VersionEndpoint
NewVersionEndpoint ...
func (*VersionEndpoint) ServerVersion ¶
func (v *VersionEndpoint) ServerVersion() (ver m.Version)
ServerVersion ...
type Zigbee2mqttEndpoint ¶
type Zigbee2mqttEndpoint struct {
*CommonEndpoint
}
Zigbee2mqttEndpoint ...
func NewZigbee2mqttEndpoint ¶
func NewZigbee2mqttEndpoint(common *CommonEndpoint) *Zigbee2mqttEndpoint
NewZigbee2mqttEndpoint ...
func (*Zigbee2mqttEndpoint) AddBridge ¶
func (n *Zigbee2mqttEndpoint) AddBridge(ctx context.Context, params *models.Zigbee2mqtt) (bridge *models.Zigbee2mqtt, err error)
AddBridge ...
func (*Zigbee2mqttEndpoint) Delete ¶
func (n *Zigbee2mqttEndpoint) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*Zigbee2mqttEndpoint) DeviceBan ¶
func (n *Zigbee2mqttEndpoint) DeviceBan(_ context.Context, id int64, friendlyName string) (err error)
DeviceBan ...
func (*Zigbee2mqttEndpoint) DeviceList ¶
func (n *Zigbee2mqttEndpoint) DeviceList(ctx context.Context, bridgeId int64, pagination common.PageParams) (result []*models.Zigbee2mqttDevice, total int64, err error)
DeviceList ...
func (*Zigbee2mqttEndpoint) DeviceRename ¶
func (n *Zigbee2mqttEndpoint) DeviceRename(_ context.Context, friendlyName, name string) (err error)
DeviceRename ...
func (*Zigbee2mqttEndpoint) DeviceWhitelist ¶
func (n *Zigbee2mqttEndpoint) DeviceWhitelist(_ context.Context, id int64, friendlyName string) (err error)
DeviceWhitelist ...
func (*Zigbee2mqttEndpoint) GetBridgeById ¶
func (n *Zigbee2mqttEndpoint) GetBridgeById(ctx context.Context, id int64) (bridge *models.Zigbee2mqtt, err error)
GetBridgeById ...
func (*Zigbee2mqttEndpoint) GetBridgeList ¶
func (n *Zigbee2mqttEndpoint) GetBridgeList(ctx context.Context, pagination common.PageParams) (list []*models.Zigbee2mqtt, total int64, err error)
GetBridgeList ...
func (*Zigbee2mqttEndpoint) Networkmap ¶
func (n *Zigbee2mqttEndpoint) Networkmap(_ context.Context, id int64) (networkmap string, err error)
Networkmap ...
func (*Zigbee2mqttEndpoint) ResetBridge ¶
func (n *Zigbee2mqttEndpoint) ResetBridge(_ context.Context, id int64) (err error)
ResetBridge ...
func (*Zigbee2mqttEndpoint) SearchDevice ¶
func (n *Zigbee2mqttEndpoint) SearchDevice(ctx context.Context, search common.SearchParams) (result []*models.Zigbee2mqttDevice, total int64, err error)
SearchDevice ...
func (*Zigbee2mqttEndpoint) UpdateBridge ¶
func (n *Zigbee2mqttEndpoint) UpdateBridge(ctx context.Context, params *models.Zigbee2mqtt) (bridge *models.Zigbee2mqtt, err error)
UpdateBridge ...
func (*Zigbee2mqttEndpoint) UpdateNetworkmap ¶
func (n *Zigbee2mqttEndpoint) UpdateNetworkmap(_ context.Context, id int64) (err error)
UpdateNetworkmap ...
Source Files ¶
- action.go
- alexa_skill.go
- area.go
- auth.go
- automation.go
- backup.go
- common.go
- condition.go
- dashboard.go
- dashboard_card.go
- dashboard_card_item.go
- dashboard_tab.go
- developer_tools.go
- endpoint.go
- entity.go
- entity_storage.go
- image.go
- interact.go
- log.go
- message_delivery.go
- metric.go
- mqtt.go
- notify.go
- plugin.go
- role.go
- script.go
- stream.go
- tag.go
- task.go
- template.go
- trigger.go
- user.go
- variable.go
- version.go
- zigbee2mqtt.go