endpoint

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2020 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AdminId ...
	AdminId = 1
)

Variables

View Source
var (
	// ErrMqttServerNoWorked ...
	ErrMqttServerNoWorked = errors.New("mqtt server not worked")
)

Functions

This section is empty.

Types

type AlexaSkillEndpoint added in v0.3.0

type AlexaSkillEndpoint struct {
	*CommonEndpoint
}

AlexaSkillEndpoint ...

func NewAlexaSkillEndpoint added in v0.3.0

func NewAlexaSkillEndpoint(common *CommonEndpoint) *AlexaSkillEndpoint

NewAlexaSkillEndpoint ...

func (*AlexaSkillEndpoint) Add added in v0.3.0

func (n *AlexaSkillEndpoint) Add(params *m.AlexaSkill) (result *m.AlexaSkill, errs []*validation.Error, err error)

Add ...

func (*AlexaSkillEndpoint) Delete added in v0.3.0

func (n *AlexaSkillEndpoint) Delete(skillId int64) (err error)

Delete ...

func (*AlexaSkillEndpoint) GetById added in v0.3.0

func (n *AlexaSkillEndpoint) GetById(appId int64) (result *m.AlexaSkill, err error)

GetById ...

func (*AlexaSkillEndpoint) GetList added in v0.3.0

func (n *AlexaSkillEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.AlexaSkill, total int64, err error)

GetList ...

func (*AlexaSkillEndpoint) Update added in v0.3.0

func (n *AlexaSkillEndpoint) Update(params *m.AlexaSkill) (skill *m.AlexaSkill, errs []*validation.Error, err error)

Update ...

type AuthEndpoint

type AuthEndpoint struct {
	*CommonEndpoint
}

AuthEndpoint ...

func NewAuthEndpoint

func NewAuthEndpoint(common *CommonEndpoint) *AuthEndpoint

NewAuthEndpoint ...

func (*AuthEndpoint) AccessList

func (a *AuthEndpoint) AccessList(user *m.User, accessListService *access_list.AccessListService) (accessList *access_list.AccessList, err error)

AccessList ...

func (*AuthEndpoint) Recovery

func (a *AuthEndpoint) Recovery()

Recovery ...

func (*AuthEndpoint) Reset

func (a *AuthEndpoint) Reset()

Reset ...

func (*AuthEndpoint) SignIn

func (a *AuthEndpoint) SignIn(email, password string, ip string) (user *m.User, accessToken string, err error)

SignIn ...

func (*AuthEndpoint) SignOut

func (a *AuthEndpoint) SignOut(user *m.User) (err error)

SignOut ...

type CommonEndpoint

type CommonEndpoint struct {
	// contains filtered or unexported fields
}

CommonEndpoint ...

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,
	metric *metrics.MetricManager,
	alexa *alexa.Alexa) *CommonEndpoint

NewCommonEndpoint ...

type DeviceActionEndpoint

type DeviceActionEndpoint struct {
	*CommonEndpoint
}

DeviceActionEndpoint ...

func NewDeviceActionEndpoint

func NewDeviceActionEndpoint(common *CommonEndpoint) *DeviceActionEndpoint

NewDeviceActionEndpoint ...

func (*DeviceActionEndpoint) Add

func (d *DeviceActionEndpoint) Add(params *m.DeviceAction) (action *m.DeviceAction, errs []*validation.Error, err error)

Add ...

func (*DeviceActionEndpoint) Delete

func (d *DeviceActionEndpoint) Delete(id int64) (err error)

Delete ...

func (*DeviceActionEndpoint) GetById

func (d *DeviceActionEndpoint) GetById(id int64) (device *m.DeviceAction, err error)

GetById ...

func (*DeviceActionEndpoint) GetList

func (d *DeviceActionEndpoint) GetList(deviceId int64) (actions []*m.DeviceAction, err error)

GetList ...

func (*DeviceActionEndpoint) Search

func (d *DeviceActionEndpoint) Search(query string, limit, offset int) (actions []*m.DeviceAction, total int64, err error)

Search ...

func (*DeviceActionEndpoint) Update

func (d *DeviceActionEndpoint) Update(params *m.DeviceAction) (result *m.DeviceAction, errs []*validation.Error, err error)

Update ...

type DeviceEndpoint

type DeviceEndpoint struct {
	*CommonEndpoint
}

DeviceEndpoint ...

func NewDeviceEndpoint

func NewDeviceEndpoint(common *CommonEndpoint) *DeviceEndpoint

NewDeviceEndpoint ...

func (*DeviceEndpoint) Add

func (d *DeviceEndpoint) Add(params *m.Device) (device *m.Device, errs []*validation.Error, err error)

Add ...

func (*DeviceEndpoint) Delete

func (d *DeviceEndpoint) Delete(deviceId int64) (err error)

Delete ...

func (*DeviceEndpoint) GetById

func (d *DeviceEndpoint) GetById(deviceId int64) (device *m.Device, err error)

GetById ...

func (*DeviceEndpoint) GetList

func (d *DeviceEndpoint) GetList(limit, offset int64, order, sortBy string) (devices []*m.Device, total int64, err error)

GetList ...

func (*DeviceEndpoint) Search

func (d *DeviceEndpoint) Search(query string, limit, offset int) (devices []*m.Device, total int64, err error)

Search ...

func (*DeviceEndpoint) Update

func (d *DeviceEndpoint) Update(device *m.Device) (result *m.Device, errs []*validation.Error, err error)

Update ...

type DeviceStateEndpoint

type DeviceStateEndpoint struct {
	*CommonEndpoint
}

DeviceStateEndpoint ...

func NewDeviceStateEndpoint

func NewDeviceStateEndpoint(common *CommonEndpoint) *DeviceStateEndpoint

NewDeviceStateEndpoint ...

func (*DeviceStateEndpoint) Add

func (d *DeviceStateEndpoint) Add(params *m.DeviceState) (state *m.DeviceState, id int64, errs []*validation.Error, err error)

Add ...

func (*DeviceStateEndpoint) Delete

func (d *DeviceStateEndpoint) Delete(id int64) (err error)

Delete ...

func (*DeviceStateEndpoint) GetById

func (d *DeviceStateEndpoint) GetById(id int64) (device *m.DeviceState, err error)

GetById ...

func (*DeviceStateEndpoint) GetList

func (d *DeviceStateEndpoint) GetList(deviceId int64) (actions []*m.DeviceState, err error)

GetList ...

func (*DeviceStateEndpoint) Update

func (d *DeviceStateEndpoint) Update(params *m.DeviceState) (state *m.DeviceState, errs []*validation.Error, err error)

Update ...

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
	MapDeviceHistory *MapDeviceHistoryEndpoint
	AlexaSkill       *AlexaSkillEndpoint
}

Endpoint ...

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,
	metric *metrics.MetricManager,
	alexa *alexa.Alexa) *Endpoint

NewEndpoint ...

type FlowEndpoint

type FlowEndpoint struct {
	*CommonEndpoint
}

FlowEndpoint ...

func NewFlowEndpoint

func NewFlowEndpoint(common *CommonEndpoint) *FlowEndpoint

NewFlowEndpoint ...

func (*FlowEndpoint) Add

func (f *FlowEndpoint) Add(params *m.Flow) (result *m.Flow, errs []*validation.Error, err error)

Add ...

func (*FlowEndpoint) Delete

func (f *FlowEndpoint) Delete(flowId int64) (err error)

Delete ...

func (*FlowEndpoint) ExportToRedactor

func (n *FlowEndpoint) ExportToRedactor(f *m.Flow) (redactorFlow *m.RedactorFlow, err error)

ExportToRedactor ...

func (*FlowEndpoint) GetById

func (f *FlowEndpoint) GetById(id int64) (flow *m.Flow, err error)

GetById ...

func (*FlowEndpoint) GetList

func (f *FlowEndpoint) GetList(limit, offset int64, order, sortBy string) (list []*m.Flow, total int64, err error)

GetList ...

func (*FlowEndpoint) GetRedactor

func (f *FlowEndpoint) GetRedactor(flowId int64) (redactorFlow *m.RedactorFlow, err error)

GetRedactor ...

func (*FlowEndpoint) Search

func (f *FlowEndpoint) Search(query string, limit, offset int) (list []*m.Flow, total int64, err error)

Search ...

func (*FlowEndpoint) Update

func (f *FlowEndpoint) Update(params *m.Flow) (result *m.Flow, errs []*validation.Error, err error)

Update ...

func (*FlowEndpoint) UpdateRedactor

func (f *FlowEndpoint) UpdateRedactor(params *m.RedactorFlow) (result *m.RedactorFlow,
	errs []*validation.Error, err error)

UpdateRedactor ...

type GateEndpoint added in v0.0.9

type GateEndpoint struct {
	*CommonEndpoint
}

GateEndpoint ...

func NewGateEndpoint added in v0.0.9

func NewGateEndpoint(common *CommonEndpoint) *GateEndpoint

NewGateEndpoint ...

func (*GateEndpoint) AddMobile added in v0.0.9

func (d *GateEndpoint) AddMobile(ctx context.Context) (list *gate_client.MobileList, err error)

AddMobile ...

func (*GateEndpoint) DeleteMobile added in v0.0.9

func (d *GateEndpoint) DeleteMobile(token string, ctx context.Context) (list *gate_client.MobileList, err error)

DeleteMobile ...

func (*GateEndpoint) GetMobileList added in v0.0.9

func (d *GateEndpoint) GetMobileList(ctx *gin.Context) (list *gate_client.MobileList, err error)

GetMobileList ...

func (*GateEndpoint) GetSettings added in v0.0.9

func (d *GateEndpoint) GetSettings() (settings gate_client.Settings, err error)

GetSettings ...

func (*GateEndpoint) UpdateSettings added in v0.0.9

func (d *GateEndpoint) UpdateSettings(settings gate_client.Settings) (err error)

UpdateSettings ...

type ImageEndpoint

type ImageEndpoint struct {
	*CommonEndpoint
}

ImageEndpoint ...

func NewImageEndpoint

func NewImageEndpoint(common *CommonEndpoint) *ImageEndpoint

NewImageEndpoint ...

func (*ImageEndpoint) Add

func (i *ImageEndpoint) Add(params *m.Image) (image *m.Image, errs []*validation.Error, err error)

Add ...

func (*ImageEndpoint) Delete

func (i *ImageEndpoint) Delete(imageId int64) (err error)

Delete ...

func (*ImageEndpoint) GetById

func (i *ImageEndpoint) GetById(id int64) (image *m.Image, err error)

GetById ...

func (*ImageEndpoint) GetList

func (i *ImageEndpoint) GetList(limit, offset int64, order, sortBy string) (items []*m.Image, total int64, err error)

GetList ...

func (*ImageEndpoint) Update

func (i *ImageEndpoint) Update(params *m.Image) (result *m.Image, errs []*validation.Error, err error)

Update ...

func (*ImageEndpoint) Upload

func (i *ImageEndpoint) Upload(files map[string][]*multipart.FileHeader) (fileList []*m.Image, errs []error)

Upload ...

type LogEndpoint

type LogEndpoint struct {
	*CommonEndpoint
}

LogEndpoint ...

func NewLogEndpoint

func NewLogEndpoint(common *CommonEndpoint) *LogEndpoint

NewLogEndpoint ...

func (*LogEndpoint) Add

func (l *LogEndpoint) Add(log *m.Log) (result *m.Log, errs []*validation.Error, err error)

Add ...

func (*LogEndpoint) Delete

func (l *LogEndpoint) Delete(logId int64) (err error)

Delete ...

func (*LogEndpoint) GetById

func (l *LogEndpoint) GetById(id int64) (log *m.Log, err error)

GetById ...

func (*LogEndpoint) GetList

func (l *LogEndpoint) GetList(limit, offset int64, order, sortBy, query string) (list []*m.Log, total int64, err error)

GetList ...

func (*LogEndpoint) Search

func (l *LogEndpoint) Search(query string, limit, offset int) (list []*m.Log, total int64, err error)

Search ...

type MapDeviceHistoryEndpoint added in v0.2.0

type MapDeviceHistoryEndpoint struct {
	*CommonEndpoint
}

MapDeviceHistoryEndpoint ...

func NewMapDeviceHistoryEndpoint added in v0.2.0

func NewMapDeviceHistoryEndpoint(common *CommonEndpoint) *MapDeviceHistoryEndpoint

NewMapDeviceHistoryEndpoint ...

func (*MapDeviceHistoryEndpoint) ListByDeviceId added in v0.2.0

func (e *MapDeviceHistoryEndpoint) ListByDeviceId(mapDeviceId int64, limit, offset int) (list []*m.MapDeviceHistory, total int64, err error)

ListByDeviceId ...

func (*MapDeviceHistoryEndpoint) ListByElementId added in v0.2.0

func (e *MapDeviceHistoryEndpoint) ListByElementId(mapElementId int64, limit, offset int) (list []*m.MapDeviceHistory, total int64, err error)

ListByElementId ...

func (*MapDeviceHistoryEndpoint) ListByMapId added in v0.2.0

func (e *MapDeviceHistoryEndpoint) ListByMapId(mapId int64, limit, offset int, orderBy, sort string) (list []*m.MapDeviceHistory, total int64, err error)

ListByMapId ...

type MapElementEndpoint

type MapElementEndpoint struct {
	*CommonEndpoint
}

MapElementEndpoint ...

func NewMapElementEndpoint

func NewMapElementEndpoint(common *CommonEndpoint) *MapElementEndpoint

NewMapElementEndpoint ...

func (*MapElementEndpoint) Add

func (n *MapElementEndpoint) Add(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)

Add ...

func (*MapElementEndpoint) Delete

func (n *MapElementEndpoint) Delete(mId int64) (err error)

Delete ...

func (*MapElementEndpoint) GetById

func (n *MapElementEndpoint) GetById(mId int64) (result *m.MapElement, err error)

GetById ...

func (*MapElementEndpoint) GetList

func (n *MapElementEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.MapElement, total int64, err error)

GetList ...

func (*MapElementEndpoint) Sort

func (n *MapElementEndpoint) Sort(params []*m.SortMapElement) (err error)

Sort ...

func (*MapElementEndpoint) Update

func (n *MapElementEndpoint) Update(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)

Update ...

func (*MapElementEndpoint) UpdateElement

func (n *MapElementEndpoint) UpdateElement(params *m.MapElement) (result *m.MapElement, errs []*validation.Error, err error)

UpdateElement ...

type MapEndpoint

type MapEndpoint struct {
	*CommonEndpoint
}

MapEndpoint ...

func NewMapEndpoint

func NewMapEndpoint(common *CommonEndpoint) *MapEndpoint

NewMapEndpoint ...

func (*MapEndpoint) Add

func (m *MapEndpoint) Add(params *m.Map) (result *m.Map, errs []*validation.Error, err error)

Add ...

func (*MapEndpoint) Delete

func (n *MapEndpoint) Delete(mId int64) (err error)

Delete ...

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)

GetActiveElements ...

func (*MapEndpoint) GetById

func (m *MapEndpoint) GetById(id int64) (result *m.Map, err error)

GetById ...

func (*MapEndpoint) GetFullById

func (m *MapEndpoint) GetFullById(mId int64) (result *m.Map, err error)

GetFullById ...

func (*MapEndpoint) GetList

func (n *MapEndpoint) GetList(limit, offset int64, order, sortBy string) (items []*m.Map, total int64, err error)

GetList ...

func (*MapEndpoint) Search

func (n *MapEndpoint) Search(query string, limit, offset int) (items []*m.Map, total int64, err error)

Search ...

func (*MapEndpoint) Update

func (n *MapEndpoint) Update(params *m.Map) (result *m.Map, errs []*validation.Error, err error)

Update ...

type MapLayerEndpoint

type MapLayerEndpoint struct {
	*CommonEndpoint
}

MapLayerEndpoint ...

func NewMapLayerEndpoint

func NewMapLayerEndpoint(common *CommonEndpoint) *MapLayerEndpoint

NewMapLayerEndpoint ...

func (*MapLayerEndpoint) Add

func (n *MapLayerEndpoint) Add(params *m.MapLayer) (result *m.MapLayer, errs []*validation.Error, err error)

Add ...

func (*MapLayerEndpoint) Delete

func (n *MapLayerEndpoint) Delete(mId int64) (err error)

Delete ...

func (*MapLayerEndpoint) GetById

func (n *MapLayerEndpoint) GetById(mId int64) (result *m.MapLayer, err error)

GetById ...

func (*MapLayerEndpoint) GetList

func (n *MapLayerEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.MapLayer, total int64, err error)

GetList ...

func (*MapLayerEndpoint) Sort

func (n *MapLayerEndpoint) Sort(params []*m.SortMapLayer) (err error)

Sort ...

func (*MapLayerEndpoint) Update

func (n *MapLayerEndpoint) Update(params *m.MapLayer) (result *m.MapLayer, errs []*validation.Error, err error)

Update ...

type MapZoneEndpoint added in v0.0.14

type MapZoneEndpoint struct {
	*CommonEndpoint
}

MapZoneEndpoint ...

func NewMapZoneEndpoint added in v0.0.14

func NewMapZoneEndpoint(common *CommonEndpoint) *MapZoneEndpoint

NewMapZoneEndpoint ...

func (*MapZoneEndpoint) Add added in v0.0.14

func (n *MapZoneEndpoint) Add(zone *m.MapZone) (result *m.MapZone, errs []*validation.Error, err error)

Add ...

func (*MapZoneEndpoint) Delete added in v0.0.14

func (n *MapZoneEndpoint) Delete(zoneName string) (err error)

Delete ...

func (*MapZoneEndpoint) Search added in v0.0.14

func (n *MapZoneEndpoint) Search(query string, limit, offset int) (result []*m.MapZone, total int64, err error)

Search ...

type MessageDeliveryEndpoint added in v0.0.17

type MessageDeliveryEndpoint struct {
	*CommonEndpoint
}

MessageDeliveryEndpoint ...

func NewMessageDeliveryEndpoint added in v0.0.17

func NewMessageDeliveryEndpoint(common *CommonEndpoint) *MessageDeliveryEndpoint

NewMessageDeliveryEndpoint ...

func (*MessageDeliveryEndpoint) Delete added in v0.0.17

func (n *MessageDeliveryEndpoint) Delete(id int64) (err error)

Delete ...

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)

GetList ...

type MqttEndpoint added in v0.0.20

type MqttEndpoint struct {
	*CommonEndpoint
}

MqttEndpoint ...

func NewMqttEndpoint added in v0.0.20

func NewMqttEndpoint(common *CommonEndpoint) *MqttEndpoint

NewMqttEndpoint ...

func (*MqttEndpoint) CloseClient added in v0.0.20

func (m *MqttEndpoint) CloseClient(clientId string) (err error)

CloseClient ...

func (*MqttEndpoint) GetClient added in v0.0.20

func (m *MqttEndpoint) GetClient(clientId string) (client *management.ClientInfo, err error)

GetClient ...

func (*MqttEndpoint) GetClients added in v0.0.20

func (m *MqttEndpoint) GetClients(limit, offset int) (list []*management.ClientInfo, total int, err error)

GetClients ...

func (*MqttEndpoint) GetSession added in v0.0.20

func (m *MqttEndpoint) GetSession(clientId string) (session *management.SessionInfo, err error)

GetSession ...

func (*MqttEndpoint) GetSessions added in v0.0.20

func (m *MqttEndpoint) GetSessions(limit, offset int) (list []*management.SessionInfo, total int, err error)

GetSessions ...

func (*MqttEndpoint) GetSubscriptions added in v0.0.20

func (m *MqttEndpoint) GetSubscriptions(clientId string, limit, offset int) (list []*management.SubscriptionInfo, total int, err error)

GetSubscriptions ...

func (*MqttEndpoint) Publish added in v0.0.20

func (m *MqttEndpoint) Publish(topic string, qos int, payload []byte, retain bool) (err error)

Publish ...

func (*MqttEndpoint) SearchTopic added in v0.0.21

func (m *MqttEndpoint) SearchTopic(query string, limit, offset int) (result []*management.SubscriptionInfo, total int64, err error)

SearchTopic ...

func (*MqttEndpoint) Subscribe added in v0.0.20

func (m *MqttEndpoint) Subscribe(clientId, topic string, qos int) (err error)

Subscribe ...

func (*MqttEndpoint) Unsubscribe added in v0.0.20

func (m *MqttEndpoint) Unsubscribe(clientId, topic string) (err error)

Unsubscribe ...

type NodeEndpoint

type NodeEndpoint struct {
	*CommonEndpoint
}

NodeEndpoint ...

func NewNodeEndpoint

func NewNodeEndpoint(common *CommonEndpoint) *NodeEndpoint

NewNodeEndpoint ...

func (*NodeEndpoint) Add

func (n *NodeEndpoint) Add(params *m.Node) (result *m.Node, errs []*validation.Error, err error)

Add ...

func (*NodeEndpoint) Delete

func (n *NodeEndpoint) Delete(nodeId int64) (err error)

Delete ...

func (*NodeEndpoint) GetById

func (n *NodeEndpoint) GetById(nodeId int64) (result *m.Node, err error)

GetById ...

func (*NodeEndpoint) GetList

func (n *NodeEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.Node, total int64, err error)

GetList ...

func (*NodeEndpoint) Search

func (n *NodeEndpoint) Search(query string, limit, offset int) (result []*m.Node, total int64, err error)

Search ...

func (*NodeEndpoint) Update

func (n *NodeEndpoint) Update(params *m.Node) (result *m.Node, errs []*validation.Error, err error)

Update ...

type NotifyEndpoint added in v0.0.17

type NotifyEndpoint struct {
	*CommonEndpoint
}

NotifyEndpoint ...

func NewNotifyEndpoint added in v0.0.17

func NewNotifyEndpoint(common *CommonEndpoint) *NotifyEndpoint

NewNotifyEndpoint ...

func (*NotifyEndpoint) GetSettings added in v0.0.17

func (n *NotifyEndpoint) GetSettings() (cfg *notify.NotifyConfig, err error)

GetSettings ...

func (*NotifyEndpoint) Repeat added in v0.0.17

func (n *NotifyEndpoint) Repeat(id int64) (err error)

Repeat ...

func (*NotifyEndpoint) Send added in v0.0.17

func (n *NotifyEndpoint) Send(params *m.NewNotifrMessage) (err error)

Send ...

func (*NotifyEndpoint) UpdateSettings added in v0.0.17

func (n *NotifyEndpoint) UpdateSettings(cfg *notify.NotifyConfig) (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(params *m.Role) (result *m.Role, errs []*validation.Error, err error)

Add ...

func (*RoleEndpoint) Delete

func (n *RoleEndpoint) Delete(name string) (err error)

Delete ...

func (*RoleEndpoint) GetAccessList

func (n *RoleEndpoint) GetAccessList(roleName string,
	accessListService *access_list.AccessListService) (accessList access_list.AccessList, err error)

GetAccessList ...

func (*RoleEndpoint) GetByName

func (n *RoleEndpoint) GetByName(name string) (result *m.Role, err error)

GetByName ...

func (*RoleEndpoint) GetList

func (n *RoleEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.Role, total int64, err error)

GetList ...

func (*RoleEndpoint) Search

func (n *RoleEndpoint) Search(query string, limit, offset int) (result []*m.Role, total int64, err error)

Search ...

func (*RoleEndpoint) Update

func (n *RoleEndpoint) Update(params *m.Role) (result *m.Role, errs []*validation.Error, err error)

Update ...

func (*RoleEndpoint) UpdateAccessList

func (n *RoleEndpoint) UpdateAccessList(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(params *m.Script) (result *m.Script, errs []*validation.Error, err error)

Add ...

func (*ScriptEndpoint) Copy added in v0.0.10

func (n *ScriptEndpoint) Copy(scriptId int64) (script *m.Script, err error)

Copy ...

func (*ScriptEndpoint) DeleteScriptById

func (n *ScriptEndpoint) DeleteScriptById(scriptId int64) (err error)

DeleteScriptById ...

func (*ScriptEndpoint) Execute

func (n *ScriptEndpoint) Execute(scriptId int64) (result string, err error)

Execute ...

func (*ScriptEndpoint) ExecuteSource

func (n *ScriptEndpoint) ExecuteSource(script *m.Script) (result string, err error)

ExecuteSource ...

func (*ScriptEndpoint) GetById

func (n *ScriptEndpoint) GetById(scriptId int64) (result *m.Script, err error)

GetById ...

func (*ScriptEndpoint) GetList

func (n *ScriptEndpoint) GetList(limit, offset int64, order, sortBy string) (result []*m.Script, total int64, err error)

GetList ...

func (*ScriptEndpoint) Search

func (n *ScriptEndpoint) Search(query string, limit, offset int) (devices []*m.Script, total int64, err error)

Search ...

func (*ScriptEndpoint) Update

func (n *ScriptEndpoint) Update(params *m.Script) (result *m.Script, errs []*validation.Error, err error)

Update ...

type TemplateEndpoint added in v0.0.17

type TemplateEndpoint struct {
	*CommonEndpoint
}

TemplateEndpoint ...

func NewTemplateEndpoint added in v0.0.17

func NewTemplateEndpoint(common *CommonEndpoint) *TemplateEndpoint

NewTemplateEndpoint ...

func (*TemplateEndpoint) Delete added in v0.0.17

func (t *TemplateEndpoint) Delete(name string) (err error)

Delete ...

func (*TemplateEndpoint) GetByName added in v0.0.17

func (t *TemplateEndpoint) GetByName(name string) (result *m.Template, err error)

GetByName ...

func (*TemplateEndpoint) GetItemByName added in v0.0.17

func (t *TemplateEndpoint) GetItemByName(name string) (result *m.Template, err error)

GetItemByName ...

func (*TemplateEndpoint) GetItemsSortedList added in v0.0.17

func (t *TemplateEndpoint) GetItemsSortedList() (count int64, items []string, err error)

GetItemsSortedList ...

func (*TemplateEndpoint) GetItemsTree added in v0.0.17

func (t *TemplateEndpoint) GetItemsTree() (tree []*m.TemplateTree, err error)

GetItemsTree ...

func (*TemplateEndpoint) GetList added in v0.0.17

func (t *TemplateEndpoint) GetList() (count int64, templates []*m.Template, err error)

GetList ...

func (*TemplateEndpoint) Preview added in v0.0.17

func (t *TemplateEndpoint) Preview(template *m.TemplateContent) (data string, err error)

Preview ...

func (*TemplateEndpoint) Search added in v0.0.17

func (t *TemplateEndpoint) Search(query string, limit, offset int) (result []*m.Template, total int64, err error)

Search ...

func (*TemplateEndpoint) UpdateItemsTree added in v0.0.17

func (t *TemplateEndpoint) UpdateItemsTree(tree []*m.TemplateTree) (err error)

UpdateItemsTree ...

func (*TemplateEndpoint) UpdateOrCreate added in v0.0.17

func (t *TemplateEndpoint) UpdateOrCreate(params *m.Template) (errs []*validation.Error, err error)

UpdateOrCreate ...

func (*TemplateEndpoint) UpdateStatus added in v0.0.17

func (t *TemplateEndpoint) UpdateStatus(params *m.Template) (errs []*validation.Error, err error)

UpdateStatus ...

type UserEndpoint

type UserEndpoint struct {
	*CommonEndpoint
}

UserEndpoint ...

func NewUserEndpoint

func NewUserEndpoint(common *CommonEndpoint) *UserEndpoint

NewUserEndpoint ...

func (*UserEndpoint) Add

func (n *UserEndpoint) Add(params *m.User,
	currentUser *m.User) (result *m.User, errs []*validation.Error, err error)

Add ...

func (*UserEndpoint) Delete

func (n *UserEndpoint) Delete(userId int64) (err error)

Delete ...

func (*UserEndpoint) GetById

func (n *UserEndpoint) GetById(userId int64) (result *m.User, err error)

GetById ...

func (*UserEndpoint) GetList

func (n *UserEndpoint) GetList(limit, offset int, order, sortBy string) (result []*m.User, total int64, err error)

GetList ...

func (*UserEndpoint) Update

func (n *UserEndpoint) Update(params *m.User) (result *m.User, errs []*validation.Error, err error)

Update ...

func (*UserEndpoint) UpdateStatus

func (n *UserEndpoint) UpdateStatus(userId int64, newStatus string) (err error)

UpdateStatus ...

type VersionEndpoint added in v0.0.24

type VersionEndpoint struct {
	*CommonEndpoint
}

VersionEndpoint ...

func NewVersionEndpoint added in v0.0.24

func NewVersionEndpoint(common *CommonEndpoint) *VersionEndpoint

NewVersionEndpoint ...

func (*VersionEndpoint) ServerVersion added in v0.0.24

func (v *VersionEndpoint) ServerVersion() (ver m.Version)

ServerVersion ...

type WorkflowEndpoint

type WorkflowEndpoint struct {
	*CommonEndpoint
}

WorkflowEndpoint ...

func NewWorkflowEndpoint

func NewWorkflowEndpoint(common *CommonEndpoint) *WorkflowEndpoint

NewWorkflowEndpoint ...

func (*WorkflowEndpoint) Add

func (n *WorkflowEndpoint) Add(params *m.Workflow) (result *m.Workflow, errs []*validation.Error, err error)

Add ...

func (WorkflowEndpoint) AddScript added in v0.0.17

func (n WorkflowEndpoint) AddScript(workflow *m.Workflow, script *m.Script) (err error)

AddScript ...

func (*WorkflowEndpoint) Delete

func (n *WorkflowEndpoint) Delete(workflowId int64) (err error)

Delete ...

func (*WorkflowEndpoint) GetById

func (n *WorkflowEndpoint) GetById(workflowId int64) (result *m.Workflow, err error)

GetById ...

func (*WorkflowEndpoint) GetList

func (n *WorkflowEndpoint) GetList(limit, offset int64, order, sortBy string, onlyEnabled bool) (result []*m.Workflow, total int64, err error)

GetList ...

func (*WorkflowEndpoint) Search

func (n *WorkflowEndpoint) Search(query string, limit, offset int) (result []*m.Workflow, total int64, err error)

Search ...

func (*WorkflowEndpoint) Update

func (n *WorkflowEndpoint) Update(params *m.Workflow,
) (result *m.Workflow, errs []*validation.Error, err error)

Update ...

func (*WorkflowEndpoint) UpdateScenario

func (n *WorkflowEndpoint) UpdateScenario(workflowId int64, workflowScenarioId int64) (err error)

UpdateScenario ...

type WorkflowScenarioEndpoint

type WorkflowScenarioEndpoint struct {
	*CommonEndpoint
}

WorkflowScenarioEndpoint ...

func NewWorkflowScenarioEndpoint

func NewWorkflowScenarioEndpoint(common *CommonEndpoint) *WorkflowScenarioEndpoint

NewWorkflowScenarioEndpoint ...

func (*WorkflowScenarioEndpoint) Add

func (n *WorkflowScenarioEndpoint) Add(params *m.WorkflowScenario) (result *m.WorkflowScenario, errs []*validation.Error, err error)

Add ...

func (*WorkflowScenarioEndpoint) Delete

func (n *WorkflowScenarioEndpoint) Delete(workflowScenarioId int64) (err error)

Delete ...

func (*WorkflowScenarioEndpoint) GetById

func (n *WorkflowScenarioEndpoint) GetById(workflowId, scenarioId int64) (result *m.WorkflowScenario, err error)

GetById ...

func (*WorkflowScenarioEndpoint) GetList

func (n *WorkflowScenarioEndpoint) GetList(workflowId int64) (result []*m.WorkflowScenario, total int64, err error)

GetList ...

func (*WorkflowScenarioEndpoint) Search

func (n *WorkflowScenarioEndpoint) Search(query string, limit, offset int) (result []*m.WorkflowScenario, total int64, err error)

Search ...

func (*WorkflowScenarioEndpoint) Update

func (n *WorkflowScenarioEndpoint) Update(params *m.WorkflowScenario) (result *m.WorkflowScenario,
	errs []*validation.Error, err error)

Update ...

type Zigbee2mqttEndpoint added in v0.1.0

type Zigbee2mqttEndpoint struct {
	*CommonEndpoint
}

Zigbee2mqttEndpoint ...

func NewZigbee2mqttEndpoint added in v0.1.0

func NewZigbee2mqttEndpoint(common *CommonEndpoint) *Zigbee2mqttEndpoint

NewZigbee2mqttEndpoint ...

func (*Zigbee2mqttEndpoint) Add added in v0.1.0

func (n *Zigbee2mqttEndpoint) Add(params *m.Zigbee2mqtt) (result *m.Zigbee2mqtt, errs []*validation.Error, err error)

Add ...

func (*Zigbee2mqttEndpoint) Delete added in v0.1.0

func (n *Zigbee2mqttEndpoint) Delete(id int64) (err error)

Delete ...

func (*Zigbee2mqttEndpoint) DeviceBan added in v0.1.0

func (n *Zigbee2mqttEndpoint) DeviceBan(id int64, friendlyName string) (err error)

DeviceBan ...

func (*Zigbee2mqttEndpoint) DeviceRename added in v0.1.0

func (n *Zigbee2mqttEndpoint) DeviceRename(friendlyName, name string) (err error)

DeviceRename ...

func (*Zigbee2mqttEndpoint) DeviceWhitelist added in v0.1.0

func (n *Zigbee2mqttEndpoint) DeviceWhitelist(id int64, friendlyName string) (err error)

DeviceWhitelist ...

func (*Zigbee2mqttEndpoint) GetById added in v0.1.0

func (n *Zigbee2mqttEndpoint) GetById(id int64) (result *zigbee2mqtt.Zigbee2mqttInfo, err error)

GetById ...

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)

GetList ...

func (*Zigbee2mqttEndpoint) Networkmap added in v0.1.0

func (n *Zigbee2mqttEndpoint) Networkmap(id int64) (networkmap string, err error)

Networkmap ...

func (*Zigbee2mqttEndpoint) ResetBridge added in v0.1.0

func (n *Zigbee2mqttEndpoint) ResetBridge(id int64) (err error)

ResetBridge ...

func (*Zigbee2mqttEndpoint) SearchDevice added in v0.1.0

func (n *Zigbee2mqttEndpoint) SearchDevice(query string, limit, offset int) (result []*m.Zigbee2mqttDevice, total int64, err error)

SearchDevice ...

func (*Zigbee2mqttEndpoint) Update added in v0.1.0

func (n *Zigbee2mqttEndpoint) Update(params *m.Zigbee2mqtt) (bridge *m.Zigbee2mqtt, errs []*validation.Error, err error)

Update ...

func (*Zigbee2mqttEndpoint) UpdateNetworkmap added in v0.1.0

func (n *Zigbee2mqttEndpoint) UpdateNetworkmap(id int64) (err error)

UpdateNetworkmap ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL