Documentation ¶
Index ¶
- Constants
- Variables
- type AuthEndpoint
- func (a *AuthEndpoint) AccessList(user *m.User, accessListService *access_list.AccessListService) (accessList *access_list.AccessList, err error)
- func (a *AuthEndpoint) Recovery()
- func (a *AuthEndpoint) Reset()
- func (a *AuthEndpoint) SignIn(email, password string, ip string) (user *m.User, accessToken string, err error)
- func (a *AuthEndpoint) SignOut(user *m.User) (err error)
- type CommonEndpoint
- type DeviceActionEndpoint
- func (d *DeviceActionEndpoint) Add(params *m.DeviceAction) (action *m.DeviceAction, errs []*validation.Error, err error)
- func (d *DeviceActionEndpoint) Delete(id int64) (err error)
- func (d *DeviceActionEndpoint) GetById(id int64) (device *m.DeviceAction, err error)
- func (d *DeviceActionEndpoint) GetList(deviceId int64) (actions []*m.DeviceAction, err error)
- func (d *DeviceActionEndpoint) Search(query string, limit, offset int) (actions []*m.DeviceAction, total int64, err error)
- func (d *DeviceActionEndpoint) Update(params *m.DeviceAction) (result *m.DeviceAction, errs []*validation.Error, err error)
- type DeviceEndpoint
- func (d *DeviceEndpoint) Add(params *m.Device) (device *m.Device, errs []*validation.Error, err error)
- func (d *DeviceEndpoint) Delete(deviceId int64) (err error)
- func (d *DeviceEndpoint) GetById(deviceId int64) (device *m.Device, err error)
- func (d *DeviceEndpoint) GetList(limit, offset int64, order, sortBy string) (devices []*m.Device, total int64, err error)
- func (d *DeviceEndpoint) Search(query string, limit, offset int) (devices []*m.Device, total int64, err error)
- func (d *DeviceEndpoint) Update(device *m.Device) (result *m.Device, errs []*validation.Error, err error)
- type DeviceStateEndpoint
- func (d *DeviceStateEndpoint) Add(params *m.DeviceState) (state *m.DeviceState, id int64, errs []*validation.Error, err error)
- func (d *DeviceStateEndpoint) Delete(id int64) (err error)
- func (d *DeviceStateEndpoint) GetById(id int64) (device *m.DeviceState, err error)
- func (d *DeviceStateEndpoint) GetList(deviceId int64) (actions []*m.DeviceState, err error)
- func (d *DeviceStateEndpoint) Update(params *m.DeviceState) (state *m.DeviceState, errs []*validation.Error, err error)
- type Endpoint
- type FlowEndpoint
- func (f *FlowEndpoint) Add(params *m.Flow) (result *m.Flow, errs []*validation.Error, err error)
- func (f *FlowEndpoint) Delete(flowId int64) (err error)
- func (n *FlowEndpoint) ExportToRedactor(f *m.Flow) (redactorFlow *m.RedactorFlow, err error)
- func (f *FlowEndpoint) GetById(id int64) (flow *m.Flow, err error)
- func (f *FlowEndpoint) GetList(limit, offset int64, order, sortBy string) (list []*m.Flow, total int64, err error)
- func (f *FlowEndpoint) GetRedactor(flowId int64) (redactorFlow *m.RedactorFlow, err error)
- func (f *FlowEndpoint) Search(query string, limit, offset int) (list []*m.Flow, total int64, err error)
- func (f *FlowEndpoint) Update(params *m.Flow) (result *m.Flow, errs []*validation.Error, err error)
- func (f *FlowEndpoint) UpdateRedactor(params *m.RedactorFlow) (result *m.RedactorFlow, errs []*validation.Error, err error)
- type GateEndpoint
- func (d *GateEndpoint) AddMobile(ctx context.Context) (list *gate_client.MobileList, err error)
- func (d *GateEndpoint) DeleteMobile(token string, ctx context.Context) (list *gate_client.MobileList, err error)
- func (d *GateEndpoint) GetMobileList(ctx *gin.Context) (list *gate_client.MobileList, err error)
- func (d *GateEndpoint) GetSettings() (settings gate_client.Settings, err error)
- func (d *GateEndpoint) UpdateSettings(settings gate_client.Settings) (err error)
- type ImageEndpoint
- func (i *ImageEndpoint) Add(params *m.Image) (image *m.Image, errs []*validation.Error, err error)
- func (i *ImageEndpoint) Delete(imageId int64) (err error)
- func (i *ImageEndpoint) GetById(id int64) (image *m.Image, err error)
- func (i *ImageEndpoint) GetList(limit, offset int64, order, sortBy string) (items []*m.Image, total int64, err error)
- func (i *ImageEndpoint) Update(params *m.Image) (result *m.Image, errs []*validation.Error, err error)
- func (i *ImageEndpoint) Upload(files map[string][]*multipart.FileHeader) (fileList []*m.Image, errs []error)
- type LogEndpoint
- func (l *LogEndpoint) Add(log *m.Log) (result *m.Log, errs []*validation.Error, err error)
- func (l *LogEndpoint) Delete(logId int64) (err error)
- func (l *LogEndpoint) GetById(id int64) (log *m.Log, err error)
- func (l *LogEndpoint) GetList(limit, offset int64, order, sortBy, query string) (list []*m.Log, total int64, err error)
- func (l *LogEndpoint) Search(query string, limit, offset int) (list []*m.Log, total int64, err error)
- type MapElementEndpoint
- func (n *MapElementEndpoint) Add(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)
- func (n *MapElementEndpoint) Delete(mId int64) (err error)
- func (n *MapElementEndpoint) GetById(mId int64) (result *m.MapElement, err error)
- func (n *MapElementEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.MapElement, total int64, err error)
- func (n *MapElementEndpoint) Sort(params []*m.SortMapElement) (err error)
- func (n *MapElementEndpoint) Update(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)
- func (n *MapElementEndpoint) UpdateElement(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)
- type MapEndpoint
- func (m *MapEndpoint) Add(params *m.Map) (result *m.Map, errs []*validation.Error, err error)
- func (n *MapEndpoint) Delete(mId int64) (err error)
- func (m *MapEndpoint) GetActiveElements(sortBy, order string, limit, offset int) (result []*m.MapElement, total int64, err error)
- func (m *MapEndpoint) GetById(id int64) (result *m.Map, err error)
- func (m *MapEndpoint) GetFullById(mId int64) (result *m.Map, err error)
- func (n *MapEndpoint) GetList(limit, offset int64, order, sortBy string) (items []*m.Map, total int64, err error)
- func (n *MapEndpoint) Search(query string, limit, offset int) (items []*m.Map, total int64, err error)
- func (n *MapEndpoint) Update(params *m.Map) (result *m.Map, errs []*validation.Error, err error)
- type MapLayerEndpoint
- func (n *MapLayerEndpoint) Add(params *m.MapLayer) (result *m.MapLayer, errs []*validation.Error, err error)
- func (n *MapLayerEndpoint) Delete(mId int64) (err error)
- func (n *MapLayerEndpoint) GetById(mId int64) (result *m.MapLayer, err error)
- func (n *MapLayerEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.MapLayer, total int64, err error)
- func (n *MapLayerEndpoint) Sort(params []*m.SortMapLayer) (err error)
- func (n *MapLayerEndpoint) Update(params *m.MapLayer) (result *m.MapLayer, errs []*validation.Error, err error)
- type MapZoneEndpoint
- type MessageDeliveryEndpoint
- type MqttEndpoint
- func (m *MqttEndpoint) CloseClient(clientId string) (err error)
- func (m *MqttEndpoint) GetClient(clientId string) (client *management.ClientInfo, err error)
- func (m *MqttEndpoint) GetClients(limit, offset int) (list []*management.ClientInfo, total int, err error)
- func (m *MqttEndpoint) GetSession(clientId string) (session *management.SessionInfo, err error)
- func (m *MqttEndpoint) GetSessions(limit, offset int) (list []*management.SessionInfo, total int, err error)
- func (m *MqttEndpoint) GetSubscriptions(clientId string, limit, offset int) (list []*management.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 []*management.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 NodeEndpoint
- func (n *NodeEndpoint) Add(params *m.Node) (result *m.Node, errs []*validation.Error, err error)
- func (n *NodeEndpoint) Delete(nodeId int64) (err error)
- func (n *NodeEndpoint) GetById(nodeId int64) (result *m.Node, err error)
- func (n *NodeEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.Node, total int64, err error)
- func (n *NodeEndpoint) Search(query string, limit, offset int) (result []*m.Node, total int64, err error)
- func (n *NodeEndpoint) Update(params *m.Node) (result *m.Node, errs []*validation.Error, err error)
- type NotifyEndpoint
- type RoleEndpoint
- func (n *RoleEndpoint) Add(params *m.Role) (result *m.Role, errs []*validation.Error, err error)
- func (n *RoleEndpoint) Delete(name string) (err error)
- func (n *RoleEndpoint) GetAccessList(roleName string, accessListService *access_list.AccessListService) (accessList access_list.AccessList, err error)
- func (n *RoleEndpoint) GetByName(name string) (result *m.Role, err error)
- func (n *RoleEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.Role, total int64, err error)
- func (n *RoleEndpoint) Search(query string, limit, offset int) (result []*m.Role, total int64, err error)
- func (n *RoleEndpoint) Update(params *m.Role) (result *m.Role, errs []*validation.Error, err error)
- func (n *RoleEndpoint) UpdateAccessList(roleName string, accessListDif map[string]map[string]bool) (err error)
- type ScriptEndpoint
- func (n *ScriptEndpoint) Add(params *m.Script) (result *m.Script, errs []*validation.Error, err error)
- func (n *ScriptEndpoint) Copy(scriptId int64) (script *m.Script, err error)
- func (n *ScriptEndpoint) DeleteScriptById(scriptId int64) (err error)
- func (n *ScriptEndpoint) Execute(scriptId int64) (result string, err error)
- func (n *ScriptEndpoint) ExecuteSource(script *m.Script) (result string, err error)
- func (n *ScriptEndpoint) GetById(scriptId int64) (result *m.Script, err error)
- func (n *ScriptEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.Script, total int64, err error)
- func (n *ScriptEndpoint) Search(query string, limit, offset int) (devices []*m.Script, total int64, err error)
- func (n *ScriptEndpoint) Update(params *m.Script) (result *m.Script, errs []*validation.Error, err error)
- type TemplateEndpoint
- func (t *TemplateEndpoint) Delete(name string) (err error)
- func (t *TemplateEndpoint) GetByName(name string) (result *m.Template, err error)
- func (t *TemplateEndpoint) GetItemByName(name string) (result *m.Template, err error)
- func (t *TemplateEndpoint) GetItemsSortedList() (count int64, items []string, err error)
- func (t *TemplateEndpoint) GetItemsTree() (tree []*m.TemplateTree, err error)
- func (t *TemplateEndpoint) GetList() (count int64, templates []*m.Template, err error)
- func (t *TemplateEndpoint) Preview(template *m.TemplateContent) (data string, err error)
- func (t *TemplateEndpoint) Search(query string, limit, offset int) (result []*m.Template, total int64, err error)
- func (t *TemplateEndpoint) UpdateItemsTree(tree []*m.TemplateTree) (err error)
- func (t *TemplateEndpoint) UpdateOrCreate(params *m.Template) (errs []*validation.Error, err error)
- func (t *TemplateEndpoint) UpdateStatus(params *m.Template) (errs []*validation.Error, err error)
- type UserEndpoint
- func (n *UserEndpoint) Add(params *m.User, currentUser *m.User) (result *m.User, errs []*validation.Error, err error)
- func (n *UserEndpoint) Delete(userId int64) (err error)
- func (n *UserEndpoint) GetById(userId int64) (result *m.User, err error)
- func (n *UserEndpoint) GetList(limit, offset int, order, sortBy string) (result []*m.User, total int64, err error)
- func (n *UserEndpoint) Update(params *m.User) (result *m.User, errs []*validation.Error, err error)
- func (n *UserEndpoint) UpdateStatus(userId int64, newStatus string) (err error)
- type VersionEndpoint
- type WorkflowEndpoint
- func (n *WorkflowEndpoint) Add(params *m.Workflow) (result *m.Workflow, errs []*validation.Error, err error)
- func (n WorkflowEndpoint) AddScript(workflow *m.Workflow, script *m.Script) (err error)
- func (n *WorkflowEndpoint) Delete(workflowId int64) (err error)
- func (n *WorkflowEndpoint) GetById(workflowId int64) (result *m.Workflow, err error)
- func (n *WorkflowEndpoint) GetList(limit, offset int64, order, sortBy string, onlyEnabled bool) (result []*m.Workflow, total int64, err error)
- func (n *WorkflowEndpoint) Search(query string, limit, offset int) (result []*m.Workflow, total int64, err error)
- func (n *WorkflowEndpoint) Update(params *m.Workflow) (result *m.Workflow, errs []*validation.Error, err error)
- func (n *WorkflowEndpoint) UpdateScenario(workflowId int64, workflowScenarioId int64) (err error)
- type WorkflowScenarioEndpoint
- func (n *WorkflowScenarioEndpoint) Add(params *m.WorkflowScenario) (result *m.WorkflowScenario, errs []*validation.Error, err error)
- func (n *WorkflowScenarioEndpoint) Delete(workflowScenarioId int64) (err error)
- func (n *WorkflowScenarioEndpoint) GetById(workflowId, scenarioId int64) (result *m.WorkflowScenario, err error)
- func (n *WorkflowScenarioEndpoint) GetList(workflowId int64) (result []*m.WorkflowScenario, total int64, err error)
- func (n *WorkflowScenarioEndpoint) Search(query string, limit, offset int) (result []*m.WorkflowScenario, total int64, err error)
- func (n *WorkflowScenarioEndpoint) Update(params *m.WorkflowScenario) (result *m.WorkflowScenario, errs []*validation.Error, err error)
- type Zigbee2mqttEndpoint
- func (n *Zigbee2mqttEndpoint) Add(params *m.Zigbee2mqtt) (result *m.Zigbee2mqtt, errs []*validation.Error, err error)
- func (n *Zigbee2mqttEndpoint) Delete(id int64) (err error)
- func (n *Zigbee2mqttEndpoint) DeviceBan(id int64, friendlyName string) (err error)
- func (n *Zigbee2mqttEndpoint) DeviceRename(friendlyName, name string) (err error)
- func (n *Zigbee2mqttEndpoint) DeviceWhitelist(id int64, friendlyName string) (err error)
- func (n *Zigbee2mqttEndpoint) GetById(id int64) (result *zigbee2mqtt.Zigbee2mqttInfo, err error)
- func (n *Zigbee2mqttEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*zigbee2mqtt.Zigbee2mqttInfo, total int64, err error)
- func (n *Zigbee2mqttEndpoint) Networkmap(id int64) (networkmap string, err error)
- func (n *Zigbee2mqttEndpoint) ResetBridge(id int64) (err error)
- func (n *Zigbee2mqttEndpoint) SearchDevice(query string, limit, offset int) (result []*m.Zigbee2mqttDevice, total int64, err error)
- func (n *Zigbee2mqttEndpoint) Update(params *m.Zigbee2mqtt) (bridge *m.Zigbee2mqtt, errs []*validation.Error, err error)
- func (n *Zigbee2mqttEndpoint) UpdateNetworkmap(id int64) (err error)
Constants ¶
View Source
const (
AdminId = 1
)
Variables ¶
View Source
var (
ErrMqttServerNoWorked = errors.New("mqtt server not worked")
)
Functions ¶
This section is empty.
Types ¶
type AuthEndpoint ¶
type AuthEndpoint struct {
*CommonEndpoint
}
func NewAuthEndpoint ¶
func NewAuthEndpoint(common *CommonEndpoint) *AuthEndpoint
func (*AuthEndpoint) AccessList ¶
func (a *AuthEndpoint) AccessList(user *m.User, accessListService *access_list.AccessListService) (accessList *access_list.AccessList, err error)
func (*AuthEndpoint) Recovery ¶
func (a *AuthEndpoint) Recovery()
func (*AuthEndpoint) Reset ¶
func (a *AuthEndpoint) Reset()
type CommonEndpoint ¶
type CommonEndpoint struct {
// contains filtered or unexported fields
}
func NewCommonEndpoint ¶
func NewCommonEndpoint(adaptors *adaptors.Adaptors, core *core.Core, accessList *access_list.AccessListService, scriptService *scripts.ScriptService, gate *gate_client.GateClient, notify *notify.Notify, mqtt *mqtt.Mqtt, zigbee2mqtt *zigbee2mqtt.Zigbee2mqtt) *CommonEndpoint
type DeviceActionEndpoint ¶
type DeviceActionEndpoint struct {
*CommonEndpoint
}
func NewDeviceActionEndpoint ¶
func NewDeviceActionEndpoint(common *CommonEndpoint) *DeviceActionEndpoint
func (*DeviceActionEndpoint) Add ¶
func (d *DeviceActionEndpoint) Add(params *m.DeviceAction) (action *m.DeviceAction, errs []*validation.Error, err error)
func (*DeviceActionEndpoint) Delete ¶
func (d *DeviceActionEndpoint) Delete(id int64) (err error)
func (*DeviceActionEndpoint) GetById ¶
func (d *DeviceActionEndpoint) GetById(id int64) (device *m.DeviceAction, err error)
func (*DeviceActionEndpoint) GetList ¶
func (d *DeviceActionEndpoint) GetList(deviceId int64) (actions []*m.DeviceAction, err error)
func (*DeviceActionEndpoint) Search ¶
func (d *DeviceActionEndpoint) Search(query string, limit, offset int) (actions []*m.DeviceAction, total int64, err error)
func (*DeviceActionEndpoint) Update ¶
func (d *DeviceActionEndpoint) Update(params *m.DeviceAction) (result *m.DeviceAction, errs []*validation.Error, err error)
type DeviceEndpoint ¶
type DeviceEndpoint struct {
*CommonEndpoint
}
func NewDeviceEndpoint ¶
func NewDeviceEndpoint(common *CommonEndpoint) *DeviceEndpoint
func (*DeviceEndpoint) Add ¶
func (d *DeviceEndpoint) Add(params *m.Device) (device *m.Device, errs []*validation.Error, err error)
func (*DeviceEndpoint) Delete ¶
func (d *DeviceEndpoint) Delete(deviceId int64) (err error)
func (*DeviceEndpoint) GetById ¶
func (d *DeviceEndpoint) GetById(deviceId int64) (device *m.Device, err error)
func (*DeviceEndpoint) Update ¶
func (d *DeviceEndpoint) Update(device *m.Device) (result *m.Device, errs []*validation.Error, err error)
type DeviceStateEndpoint ¶
type DeviceStateEndpoint struct {
*CommonEndpoint
}
func NewDeviceStateEndpoint ¶
func NewDeviceStateEndpoint(common *CommonEndpoint) *DeviceStateEndpoint
func (*DeviceStateEndpoint) Add ¶
func (d *DeviceStateEndpoint) Add(params *m.DeviceState) (state *m.DeviceState, id int64, errs []*validation.Error, err error)
func (*DeviceStateEndpoint) Delete ¶
func (d *DeviceStateEndpoint) Delete(id int64) (err error)
func (*DeviceStateEndpoint) GetById ¶
func (d *DeviceStateEndpoint) GetById(id int64) (device *m.DeviceState, err error)
func (*DeviceStateEndpoint) GetList ¶
func (d *DeviceStateEndpoint) GetList(deviceId int64) (actions []*m.DeviceState, err error)
func (*DeviceStateEndpoint) Update ¶
func (d *DeviceStateEndpoint) Update(params *m.DeviceState) (state *m.DeviceState, errs []*validation.Error, err error)
type Endpoint ¶
type Endpoint struct { Auth *AuthEndpoint Device *DeviceEndpoint DeviceAction *DeviceActionEndpoint DeviceState *DeviceStateEndpoint Flow *FlowEndpoint Image *ImageEndpoint Log *LogEndpoint Map *MapEndpoint MapElement *MapElementEndpoint MapLayer *MapLayerEndpoint MapZone *MapZoneEndpoint Node *NodeEndpoint Role *RoleEndpoint Script *ScriptEndpoint Workflow *WorkflowEndpoint WorkflowScenario *WorkflowScenarioEndpoint User *UserEndpoint Gate *GateEndpoint Template *TemplateEndpoint Notify *NotifyEndpoint MessageDelivery *MessageDeliveryEndpoint Mqtt *MqttEndpoint Version *VersionEndpoint Zigbee2mqtt *Zigbee2mqttEndpoint }
func NewEndpoint ¶
func NewEndpoint(adaptors *adaptors.Adaptors, core *core.Core, scriptService *scripts.ScriptService, accessList *access_list.AccessListService, gate *gate_client.GateClient, notify *notify.Notify, mqtt *mqtt.Mqtt, zigbee2mqtt *zigbee2mqtt.Zigbee2mqtt) *Endpoint
type FlowEndpoint ¶
type FlowEndpoint struct {
*CommonEndpoint
}
func NewFlowEndpoint ¶
func NewFlowEndpoint(common *CommonEndpoint) *FlowEndpoint
func (*FlowEndpoint) Add ¶
func (f *FlowEndpoint) Add(params *m.Flow) (result *m.Flow, errs []*validation.Error, err error)
func (*FlowEndpoint) Delete ¶
func (f *FlowEndpoint) Delete(flowId int64) (err error)
func (*FlowEndpoint) ExportToRedactor ¶
func (n *FlowEndpoint) ExportToRedactor(f *m.Flow) (redactorFlow *m.RedactorFlow, err error)
func (*FlowEndpoint) GetRedactor ¶
func (f *FlowEndpoint) GetRedactor(flowId int64) (redactorFlow *m.RedactorFlow, err error)
func (*FlowEndpoint) Update ¶
func (f *FlowEndpoint) Update(params *m.Flow) (result *m.Flow, errs []*validation.Error, err error)
func (*FlowEndpoint) UpdateRedactor ¶
func (f *FlowEndpoint) UpdateRedactor(params *m.RedactorFlow) (result *m.RedactorFlow, errs []*validation.Error, err error)
type GateEndpoint ¶ added in v0.0.9
type GateEndpoint struct {
*CommonEndpoint
}
func NewGateEndpoint ¶ added in v0.0.9
func NewGateEndpoint(common *CommonEndpoint) *GateEndpoint
func (*GateEndpoint) AddMobile ¶ added in v0.0.9
func (d *GateEndpoint) AddMobile(ctx context.Context) (list *gate_client.MobileList, err error)
func (*GateEndpoint) DeleteMobile ¶ added in v0.0.9
func (d *GateEndpoint) DeleteMobile(token string, ctx context.Context) (list *gate_client.MobileList, err error)
func (*GateEndpoint) GetMobileList ¶ added in v0.0.9
func (d *GateEndpoint) GetMobileList(ctx *gin.Context) (list *gate_client.MobileList, err error)
func (*GateEndpoint) GetSettings ¶ added in v0.0.9
func (d *GateEndpoint) GetSettings() (settings gate_client.Settings, err error)
func (*GateEndpoint) UpdateSettings ¶ added in v0.0.9
func (d *GateEndpoint) UpdateSettings(settings gate_client.Settings) (err error)
type ImageEndpoint ¶
type ImageEndpoint struct {
*CommonEndpoint
}
func NewImageEndpoint ¶
func NewImageEndpoint(common *CommonEndpoint) *ImageEndpoint
func (*ImageEndpoint) Add ¶
func (i *ImageEndpoint) Add(params *m.Image) (image *m.Image, errs []*validation.Error, err error)
func (*ImageEndpoint) Delete ¶
func (i *ImageEndpoint) Delete(imageId int64) (err error)
func (*ImageEndpoint) GetById ¶
func (i *ImageEndpoint) GetById(id int64) (image *m.Image, err error)
func (*ImageEndpoint) Update ¶
func (i *ImageEndpoint) Update(params *m.Image) (result *m.Image, errs []*validation.Error, err error)
func (*ImageEndpoint) Upload ¶
func (i *ImageEndpoint) Upload(files map[string][]*multipart.FileHeader) (fileList []*m.Image, errs []error)
type LogEndpoint ¶
type LogEndpoint struct {
*CommonEndpoint
}
func NewLogEndpoint ¶
func NewLogEndpoint(common *CommonEndpoint) *LogEndpoint
func (*LogEndpoint) Add ¶
func (l *LogEndpoint) Add(log *m.Log) (result *m.Log, errs []*validation.Error, err error)
func (*LogEndpoint) Delete ¶
func (l *LogEndpoint) Delete(logId int64) (err error)
type MapElementEndpoint ¶
type MapElementEndpoint struct {
*CommonEndpoint
}
func NewMapElementEndpoint ¶
func NewMapElementEndpoint(common *CommonEndpoint) *MapElementEndpoint
func (*MapElementEndpoint) Add ¶
func (n *MapElementEndpoint) Add(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)
func (*MapElementEndpoint) Delete ¶
func (n *MapElementEndpoint) Delete(mId int64) (err error)
func (*MapElementEndpoint) GetById ¶
func (n *MapElementEndpoint) GetById(mId int64) (result *m.MapElement, err error)
func (*MapElementEndpoint) GetList ¶
func (n *MapElementEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.MapElement, total int64, err error)
func (*MapElementEndpoint) Sort ¶
func (n *MapElementEndpoint) Sort(params []*m.SortMapElement) (err error)
func (*MapElementEndpoint) Update ¶
func (n *MapElementEndpoint) Update(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)
func (*MapElementEndpoint) UpdateElement ¶
func (n *MapElementEndpoint) UpdateElement(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)
type MapEndpoint ¶
type MapEndpoint struct {
*CommonEndpoint
}
func NewMapEndpoint ¶
func NewMapEndpoint(common *CommonEndpoint) *MapEndpoint
func (*MapEndpoint) Add ¶
func (m *MapEndpoint) Add(params *m.Map) (result *m.Map, errs []*validation.Error, err error)
func (*MapEndpoint) Delete ¶
func (n *MapEndpoint) Delete(mId int64) (err error)
func (*MapEndpoint) GetActiveElements ¶ added in v0.0.14
func (m *MapEndpoint) GetActiveElements(sortBy, order string, limit, offset int) (result []*m.MapElement, total int64, err error)
func (*MapEndpoint) GetFullById ¶
func (m *MapEndpoint) GetFullById(mId int64) (result *m.Map, err error)
func (*MapEndpoint) Update ¶
func (n *MapEndpoint) Update(params *m.Map) (result *m.Map, errs []*validation.Error, err error)
type MapLayerEndpoint ¶
type MapLayerEndpoint struct {
*CommonEndpoint
}
func NewMapLayerEndpoint ¶
func NewMapLayerEndpoint(common *CommonEndpoint) *MapLayerEndpoint
func (*MapLayerEndpoint) Add ¶
func (n *MapLayerEndpoint) Add(params *m.MapLayer) (result *m.MapLayer, errs []*validation.Error, err error)
func (*MapLayerEndpoint) Delete ¶
func (n *MapLayerEndpoint) Delete(mId int64) (err error)
func (*MapLayerEndpoint) GetById ¶
func (n *MapLayerEndpoint) GetById(mId int64) (result *m.MapLayer, err error)
func (*MapLayerEndpoint) Sort ¶
func (n *MapLayerEndpoint) Sort(params []*m.SortMapLayer) (err error)
func (*MapLayerEndpoint) Update ¶
func (n *MapLayerEndpoint) Update(params *m.MapLayer) (result *m.MapLayer, errs []*validation.Error, err error)
type MapZoneEndpoint ¶ added in v0.0.14
type MapZoneEndpoint struct {
*CommonEndpoint
}
func NewMapZoneEndpoint ¶ added in v0.0.14
func NewMapZoneEndpoint(common *CommonEndpoint) *MapZoneEndpoint
func (*MapZoneEndpoint) Add ¶ added in v0.0.14
func (n *MapZoneEndpoint) Add(zone *m.MapZone) (result *m.MapZone, errs []*validation.Error, err error)
func (*MapZoneEndpoint) Delete ¶ added in v0.0.14
func (n *MapZoneEndpoint) Delete(zoneName string) (err error)
type MessageDeliveryEndpoint ¶ added in v0.0.17
type MessageDeliveryEndpoint struct {
*CommonEndpoint
}
func NewMessageDeliveryEndpoint ¶ added in v0.0.17
func NewMessageDeliveryEndpoint(common *CommonEndpoint) *MessageDeliveryEndpoint
func (*MessageDeliveryEndpoint) Delete ¶ added in v0.0.17
func (n *MessageDeliveryEndpoint) Delete(id int64) (err error)
func (*MessageDeliveryEndpoint) GetList ¶ added in v0.0.17
func (n *MessageDeliveryEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.MessageDelivery, total int64, err error)
type MqttEndpoint ¶ added in v0.0.20
type MqttEndpoint struct {
*CommonEndpoint
}
func NewMqttEndpoint ¶ added in v0.0.20
func NewMqttEndpoint(common *CommonEndpoint) *MqttEndpoint
func (*MqttEndpoint) CloseClient ¶ added in v0.0.20
func (m *MqttEndpoint) CloseClient(clientId string) (err error)
func (*MqttEndpoint) GetClient ¶ added in v0.0.20
func (m *MqttEndpoint) GetClient(clientId string) (client *management.ClientInfo, err error)
func (*MqttEndpoint) GetClients ¶ added in v0.0.20
func (m *MqttEndpoint) GetClients(limit, offset int) (list []*management.ClientInfo, total int, err error)
func (*MqttEndpoint) GetSession ¶ added in v0.0.20
func (m *MqttEndpoint) GetSession(clientId string) (session *management.SessionInfo, err error)
func (*MqttEndpoint) GetSessions ¶ added in v0.0.20
func (m *MqttEndpoint) GetSessions(limit, offset int) (list []*management.SessionInfo, total int, err error)
func (*MqttEndpoint) GetSubscriptions ¶ added in v0.0.20
func (m *MqttEndpoint) GetSubscriptions(clientId string, limit, offset int) (list []*management.SubscriptionInfo, total int, err error)
func (*MqttEndpoint) SearchTopic ¶ added in v0.0.21
func (m *MqttEndpoint) SearchTopic(query string, limit, offset int) (result []*management.SubscriptionInfo, total int64, err error)
func (*MqttEndpoint) Subscribe ¶ added in v0.0.20
func (m *MqttEndpoint) Subscribe(clientId, topic string, qos int) (err error)
func (*MqttEndpoint) Unsubscribe ¶ added in v0.0.20
func (m *MqttEndpoint) Unsubscribe(clientId, topic string) (err error)
type NodeEndpoint ¶
type NodeEndpoint struct {
*CommonEndpoint
}
func NewNodeEndpoint ¶
func NewNodeEndpoint(common *CommonEndpoint) *NodeEndpoint
func (*NodeEndpoint) Add ¶
func (n *NodeEndpoint) Add(params *m.Node) (result *m.Node, errs []*validation.Error, err error)
func (*NodeEndpoint) Delete ¶
func (n *NodeEndpoint) Delete(nodeId int64) (err error)
func (*NodeEndpoint) GetById ¶
func (n *NodeEndpoint) GetById(nodeId int64) (result *m.Node, err error)
func (*NodeEndpoint) Update ¶
func (n *NodeEndpoint) Update(params *m.Node) (result *m.Node, errs []*validation.Error, err error)
type NotifyEndpoint ¶ added in v0.0.17
type NotifyEndpoint struct {
*CommonEndpoint
}
func NewNotifyEndpoint ¶ added in v0.0.17
func NewNotifyEndpoint(common *CommonEndpoint) *NotifyEndpoint
func (*NotifyEndpoint) GetSettings ¶ added in v0.0.17
func (n *NotifyEndpoint) GetSettings() (cfg *notify.NotifyConfig, err error)
func (*NotifyEndpoint) Repeat ¶ added in v0.0.17
func (n *NotifyEndpoint) Repeat(id int64) (err error)
func (*NotifyEndpoint) Send ¶ added in v0.0.17
func (n *NotifyEndpoint) Send(params *m.NewNotifrMessage) (err error)
func (*NotifyEndpoint) UpdateSettings ¶ added in v0.0.17
func (n *NotifyEndpoint) UpdateSettings(cfg *notify.NotifyConfig) (err error)
type RoleEndpoint ¶
type RoleEndpoint struct {
*CommonEndpoint
}
func NewRoleEndpoint ¶
func NewRoleEndpoint(common *CommonEndpoint) *RoleEndpoint
func (*RoleEndpoint) Add ¶
func (n *RoleEndpoint) Add(params *m.Role) (result *m.Role, errs []*validation.Error, err error)
func (*RoleEndpoint) Delete ¶
func (n *RoleEndpoint) Delete(name string) (err error)
func (*RoleEndpoint) GetAccessList ¶
func (n *RoleEndpoint) GetAccessList(roleName string, accessListService *access_list.AccessListService) (accessList access_list.AccessList, err error)
func (*RoleEndpoint) GetByName ¶
func (n *RoleEndpoint) GetByName(name string) (result *m.Role, err error)
func (*RoleEndpoint) Update ¶
func (n *RoleEndpoint) Update(params *m.Role) (result *m.Role, errs []*validation.Error, err error)
func (*RoleEndpoint) UpdateAccessList ¶
type ScriptEndpoint ¶
type ScriptEndpoint struct {
*CommonEndpoint
}
func NewScriptEndpoint ¶
func NewScriptEndpoint(common *CommonEndpoint) *ScriptEndpoint
func (*ScriptEndpoint) Add ¶
func (n *ScriptEndpoint) Add(params *m.Script) (result *m.Script, errs []*validation.Error, err error)
func (*ScriptEndpoint) Copy ¶ added in v0.0.10
func (n *ScriptEndpoint) Copy(scriptId int64) (script *m.Script, err error)
func (*ScriptEndpoint) DeleteScriptById ¶
func (n *ScriptEndpoint) DeleteScriptById(scriptId int64) (err error)
func (*ScriptEndpoint) Execute ¶
func (n *ScriptEndpoint) Execute(scriptId int64) (result string, err error)
func (*ScriptEndpoint) ExecuteSource ¶
func (n *ScriptEndpoint) ExecuteSource(script *m.Script) (result string, err error)
func (*ScriptEndpoint) GetById ¶
func (n *ScriptEndpoint) GetById(scriptId int64) (result *m.Script, err error)
func (*ScriptEndpoint) Update ¶
func (n *ScriptEndpoint) Update(params *m.Script) (result *m.Script, errs []*validation.Error, err error)
type TemplateEndpoint ¶ added in v0.0.17
type TemplateEndpoint struct {
*CommonEndpoint
}
func NewTemplateEndpoint ¶ added in v0.0.17
func NewTemplateEndpoint(common *CommonEndpoint) *TemplateEndpoint
func (*TemplateEndpoint) Delete ¶ added in v0.0.17
func (t *TemplateEndpoint) Delete(name string) (err error)
func (*TemplateEndpoint) GetByName ¶ added in v0.0.17
func (t *TemplateEndpoint) GetByName(name string) (result *m.Template, err error)
func (*TemplateEndpoint) GetItemByName ¶ added in v0.0.17
func (t *TemplateEndpoint) GetItemByName(name string) (result *m.Template, err error)
func (*TemplateEndpoint) GetItemsSortedList ¶ added in v0.0.17
func (t *TemplateEndpoint) GetItemsSortedList() (count int64, items []string, err error)
func (*TemplateEndpoint) GetItemsTree ¶ added in v0.0.17
func (t *TemplateEndpoint) GetItemsTree() (tree []*m.TemplateTree, err error)
func (*TemplateEndpoint) GetList ¶ added in v0.0.17
func (t *TemplateEndpoint) GetList() (count int64, templates []*m.Template, err error)
func (*TemplateEndpoint) Preview ¶ added in v0.0.17
func (t *TemplateEndpoint) Preview(template *m.TemplateContent) (data string, err error)
func (*TemplateEndpoint) UpdateItemsTree ¶ added in v0.0.17
func (t *TemplateEndpoint) UpdateItemsTree(tree []*m.TemplateTree) (err error)
func (*TemplateEndpoint) UpdateOrCreate ¶ added in v0.0.17
func (t *TemplateEndpoint) UpdateOrCreate(params *m.Template) (errs []*validation.Error, err error)
func (*TemplateEndpoint) UpdateStatus ¶ added in v0.0.17
func (t *TemplateEndpoint) UpdateStatus(params *m.Template) (errs []*validation.Error, err error)
type UserEndpoint ¶
type UserEndpoint struct {
*CommonEndpoint
}
func NewUserEndpoint ¶
func NewUserEndpoint(common *CommonEndpoint) *UserEndpoint
func (*UserEndpoint) Add ¶
func (n *UserEndpoint) Add(params *m.User, currentUser *m.User) (result *m.User, errs []*validation.Error, err error)
func (*UserEndpoint) Delete ¶
func (n *UserEndpoint) Delete(userId int64) (err error)
func (*UserEndpoint) GetById ¶
func (n *UserEndpoint) GetById(userId int64) (result *m.User, err error)
func (*UserEndpoint) Update ¶
func (n *UserEndpoint) Update(params *m.User) (result *m.User, errs []*validation.Error, err error)
func (*UserEndpoint) UpdateStatus ¶
func (n *UserEndpoint) UpdateStatus(userId int64, newStatus string) (err error)
type VersionEndpoint ¶ added in v0.0.24
type VersionEndpoint struct {
*CommonEndpoint
}
func NewVersionEndpoint ¶ added in v0.0.24
func NewVersionEndpoint(common *CommonEndpoint) *VersionEndpoint
func (*VersionEndpoint) ServerVersion ¶ added in v0.0.24
func (v *VersionEndpoint) ServerVersion() (ver *m.Version)
type WorkflowEndpoint ¶
type WorkflowEndpoint struct {
*CommonEndpoint
}
func NewWorkflowEndpoint ¶
func NewWorkflowEndpoint(common *CommonEndpoint) *WorkflowEndpoint
func (*WorkflowEndpoint) Add ¶
func (n *WorkflowEndpoint) Add(params *m.Workflow) (result *m.Workflow, errs []*validation.Error, err error)
func (*WorkflowEndpoint) Delete ¶
func (n *WorkflowEndpoint) Delete(workflowId int64) (err error)
func (*WorkflowEndpoint) GetById ¶
func (n *WorkflowEndpoint) GetById(workflowId int64) (result *m.Workflow, err error)
func (*WorkflowEndpoint) Update ¶
func (n *WorkflowEndpoint) Update(params *m.Workflow, ) (result *m.Workflow, errs []*validation.Error, err error)
func (*WorkflowEndpoint) UpdateScenario ¶
func (n *WorkflowEndpoint) UpdateScenario(workflowId int64, workflowScenarioId int64) (err error)
type WorkflowScenarioEndpoint ¶
type WorkflowScenarioEndpoint struct {
*CommonEndpoint
}
func NewWorkflowScenarioEndpoint ¶
func NewWorkflowScenarioEndpoint(common *CommonEndpoint) *WorkflowScenarioEndpoint
func (*WorkflowScenarioEndpoint) Add ¶
func (n *WorkflowScenarioEndpoint) Add(params *m.WorkflowScenario) (result *m.WorkflowScenario, errs []*validation.Error, err error)
func (*WorkflowScenarioEndpoint) Delete ¶
func (n *WorkflowScenarioEndpoint) Delete(workflowScenarioId int64) (err error)
func (*WorkflowScenarioEndpoint) GetById ¶
func (n *WorkflowScenarioEndpoint) GetById(workflowId, scenarioId int64) (result *m.WorkflowScenario, err error)
func (*WorkflowScenarioEndpoint) GetList ¶
func (n *WorkflowScenarioEndpoint) GetList(workflowId int64) (result []*m.WorkflowScenario, total int64, err error)
func (*WorkflowScenarioEndpoint) Search ¶
func (n *WorkflowScenarioEndpoint) Search(query string, limit, offset int) (result []*m.WorkflowScenario, total int64, err error)
func (*WorkflowScenarioEndpoint) Update ¶
func (n *WorkflowScenarioEndpoint) Update(params *m.WorkflowScenario) (result *m.WorkflowScenario, errs []*validation.Error, err error)
type Zigbee2mqttEndpoint ¶ added in v0.1.0
type Zigbee2mqttEndpoint struct {
*CommonEndpoint
}
func NewZigbee2mqttEndpoint ¶ added in v0.1.0
func NewZigbee2mqttEndpoint(common *CommonEndpoint) *Zigbee2mqttEndpoint
func (*Zigbee2mqttEndpoint) Add ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) Add(params *m.Zigbee2mqtt) (result *m.Zigbee2mqtt, errs []*validation.Error, err error)
func (*Zigbee2mqttEndpoint) Delete ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) Delete(id int64) (err error)
func (*Zigbee2mqttEndpoint) DeviceBan ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) DeviceBan(id int64, friendlyName string) (err error)
func (*Zigbee2mqttEndpoint) DeviceRename ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) DeviceRename(friendlyName, name string) (err error)
func (*Zigbee2mqttEndpoint) DeviceWhitelist ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) DeviceWhitelist(id int64, friendlyName string) (err error)
func (*Zigbee2mqttEndpoint) GetById ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) GetById(id int64) (result *zigbee2mqtt.Zigbee2mqttInfo, err error)
func (*Zigbee2mqttEndpoint) GetList ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*zigbee2mqtt.Zigbee2mqttInfo, total int64, err error)
func (*Zigbee2mqttEndpoint) Networkmap ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) Networkmap(id int64) (networkmap string, err error)
func (*Zigbee2mqttEndpoint) ResetBridge ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) ResetBridge(id int64) (err error)
func (*Zigbee2mqttEndpoint) SearchDevice ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) SearchDevice(query string, limit, offset int) (result []*m.Zigbee2mqttDevice, total int64, err error)
func (*Zigbee2mqttEndpoint) Update ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) Update(params *m.Zigbee2mqtt) (bridge *m.Zigbee2mqtt, errs []*validation.Error, err error)
func (*Zigbee2mqttEndpoint) UpdateNetworkmap ¶ added in v0.1.0
func (n *Zigbee2mqttEndpoint) UpdateNetworkmap(id int64) (err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.