Documentation ¶
Index ¶
- type Action
- type Actions
- type AlexaIntent
- type AlexaIntents
- type AlexaSkill
- type AlexaSkills
- func (n AlexaSkills) Add(v *AlexaSkill) (id int64, err error)
- func (n AlexaSkills) Delete(id int64) (err error)
- func (n AlexaSkills) GetById(id int64) (v *AlexaSkill, err error)
- func (n *AlexaSkills) List(limit, offset int64, orderBy, sort string) (list []*AlexaSkill, total int64, err error)
- func (n *AlexaSkills) ListEnabled(limit, offset int64) (list []*AlexaSkill, err error)
- func (n AlexaSkills) Update(v *AlexaSkill) (err error)
- type Area
- type Areas
- func (n Areas) Add(area *Area) (id int64, err error)
- func (n Areas) Clean() (err error)
- func (n Areas) DeleteByName(name string) (err error)
- func (n Areas) GetById(areaId int64) (area *Area, err error)
- func (n Areas) GetByName(name string) (area *Area, err error)
- func (n *Areas) List(limit, offset int64, orderBy, sort string) (list []*Area, total int64, err error)
- func (n *Areas) Search(query string, limit, offset int64) (list []*Area, total int64, err error)
- func (n Areas) Update(m *Area) (err error)
- type Condition
- type Conditions
- type Dashboard
- type DashboardCard
- type DashboardCardItem
- type DashboardCardItems
- func (n DashboardCardItems) Add(item *DashboardCardItem) (id int64, err error)
- func (n DashboardCardItems) Delete(id int64) (err error)
- func (n DashboardCardItems) GetById(id int64) (item *DashboardCardItem, err error)
- func (n *DashboardCardItems) List(limit, offset int64, orderBy, sort string) (list []*DashboardCardItem, total int64, err error)
- func (n DashboardCardItems) Update(m *DashboardCardItem) (err error)
- type DashboardCards
- func (n DashboardCards) Add(card *DashboardCard) (id int64, err error)
- func (n DashboardCards) Delete(id int64) (err error)
- func (n DashboardCards) GetById(id int64) (card *DashboardCard, err error)
- func (n *DashboardCards) List(limit, offset int64, orderBy, sort string) (list []*DashboardCard, total int64, err error)
- func (n DashboardCards) Update(m *DashboardCard) (err error)
- type DashboardTab
- type DashboardTabs
- func (n DashboardTabs) Add(tab *DashboardTab) (id int64, err error)
- func (n DashboardTabs) Delete(id int64) (err error)
- func (n DashboardTabs) GetById(id int64) (tab *DashboardTab, err error)
- func (n *DashboardTabs) List(limit, offset int64, orderBy, sort string) (list []*DashboardTab, total int64, err error)
- func (n DashboardTabs) Update(m *DashboardTab) (err error)
- type Dashboards
- func (n Dashboards) Add(board *Dashboard) (id int64, err error)
- func (n Dashboards) Delete(id int64) (err error)
- func (n Dashboards) GetById(id int64) (board *Dashboard, err error)
- func (n *Dashboards) List(limit, offset int64, orderBy, sort string) (list []*Dashboard, total int64, err error)
- func (d *Dashboards) Search(query string, limit, offset int64) (list []*Dashboard, total int64, err error)
- func (n Dashboards) Update(m *Dashboard) (err error)
- type Entities
- func (n Entities) Add(v *Entity) (err error)
- func (n Entities) AppendMetric(id common.EntityId, metric Metric) (err error)
- func (n Entities) AppendScript(id common.EntityId, script *Script) (err error)
- func (n Entities) Delete(id common.EntityId) (err error)
- func (n Entities) DeleteMetric(id common.EntityId, metricId int64) (err error)
- func (n Entities) DeleteScript(id common.EntityId, scriptId int64) (err error)
- func (n Entities) GetById(id common.EntityId) (v *Entity, err error)
- func (n Entities) GetByIds(ids []common.EntityId) (list []*Entity, err error)
- func (n *Entities) GetByType(t string, limit, offset int64) (list []*Entity, err error)
- func (n *Entities) List(limit, offset int64, orderBy, sort string, autoLoad bool) (list []*Entity, total int64, err error)
- func (n Entities) ReplaceMetric(id common.EntityId, metric Metric) (err error)
- func (n Entities) ReplaceScript(id common.EntityId, script *Script) (err error)
- func (n *Entities) Search(query string, limit, offset int64) (list []*Entity, total int64, err error)
- func (n Entities) Update(v *Entity) (err error)
- func (n Entities) UpdateSettings(entityId common.EntityId, settings []byte) (err error)
- type Entity
- type EntityAction
- type EntityActions
- func (n EntityActions) Add(v *EntityAction) (id int64, err error)
- func (n EntityActions) DeleteByEntityId(deviceId common.EntityId) (err error)
- func (n EntityActions) GetById(id int64) (v *EntityAction, err error)
- func (n *EntityActions) List(limit, offset int64, orderBy, sort string) (list []*EntityAction, total int64, err error)
- func (n EntityActions) Update(m *EntityAction) (err error)
- type EntityMetric
- type EntityScript
- type EntityScripts
- type EntityState
- type EntityStates
- func (n EntityStates) Add(v *EntityState) (id int64, err error)
- func (n EntityStates) DeleteByEntityId(entityId common.EntityId) (err error)
- func (n EntityStates) GetById(id int64) (v *EntityState, err error)
- func (n *EntityStates) List(limit, offset int64, orderBy, sort string) (list []*EntityState, total int64, err error)
- func (n EntityStates) Update(m *EntityState) (err error)
- type EntityStorage
- type EntityStorages
- func (n *EntityStorages) Add(v EntityStorage) (id int64, err error)
- func (n *EntityStorages) GetLastByEntityId(entityId common.EntityId) (v EntityStorage, err error)
- func (n *EntityStorages) List(limit, offset int64, orderBy, sort string) (list []EntityStorage, total int64, err error)
- func (n *EntityStorages) ListByEntityId(limit, offset int64, orderBy, sort string, entityId common.EntityId, ...) (list []EntityStorage, total int64, err error)
- type Image
- type ImageFilterList
- type Images
- func (n Images) Add(v *Image) (id int64, err error)
- func (n Images) Delete(mapId int64) (err error)
- func (n *Images) GetAllByDate(filter string) (images []*Image, err error)
- func (n Images) GetById(id int64) (v *Image, err error)
- func (n Images) GetByImageName(imageName string) (v *Image, err error)
- func (n *Images) GetFilterList() (images []*ImageFilterList, err error)
- func (n *Images) List(limit, offset int64, orderBy, sort string) (list []*Image, total int64, err error)
- func (n Images) Update(m *Image) (err error)
- type Log
- type LogQuery
- type Logs
- func (n Logs) Add(v *Log) (id int64, err error)
- func (n Logs) Delete(mapId int64) (err error)
- func (n *Logs) DeleteOldest(days int) (err error)
- func (n Logs) GetById(id int64) (v *Log, err error)
- func (n *Logs) List(limit, offset int64, orderBy, sort string, queryObj *LogQuery) (list []*Log, total int64, err error)
- func (n *Logs) Search(query string, limit, offset int) (list []*Log, total int64, err error)
- type Message
- type MessageDeliveries
- func (n MessageDeliveries) Add(msg MessageDelivery) (id int64, err error)
- func (n MessageDeliveries) Delete(id int64) (err error)
- func (n *MessageDeliveries) GetAllUncompleted(limit, offset int64) (list []MessageDelivery, total int64, err error)
- func (n MessageDeliveries) GetById(id int64) (msg MessageDelivery, err error)
- func (n *MessageDeliveries) List(limit, offset int64, orderBy, sort string) (list []MessageDelivery, total int64, err error)
- func (n MessageDeliveries) SetStatus(msg MessageDelivery) (err error)
- type MessageDelivery
- type Messages
- type Metric
- type MetricBucket
- type MetricBuckets
- func (n MetricBuckets) Add(metric MetricBucket) (err error)
- func (n MetricBuckets) CreateHypertable() (err error)
- func (n MetricBuckets) DeleteById(id int64) (err error)
- func (n MetricBuckets) DeleteByMetricId(metricId int64) (err error)
- func (n *MetricBuckets) DeleteOldest(days int) (err error)
- func (n *MetricBuckets) Simple24HPreview(metricId int64, optionItems []string) (list []MetricBucket, err error)
- func (n *MetricBuckets) SimpleListByRangeType(metricId int64, metricRange common.MetricRange, optionItems []string) (list []MetricBucket, err error)
- func (n *MetricBuckets) SimpleListWithSoftRange(from, to time.Time, metricId int64, optionItems []string) (list []MetricBucket, err error)
- type Metrics
- func (n Metrics) Add(metric Metric) (id int64, err error)
- func (n Metrics) Delete(id int64) (err error)
- func (n Metrics) GetById(id int64) (metric Metric, err error)
- func (n *Metrics) List(limit, offset int64, orderBy, sort string) (list []Metric, total int64, err error)
- func (n *Metrics) Search(query string, limit, offset int) (list []Metric, total int64, err error)
- func (n Metrics) Update(m Metric) (err error)
- type Permission
- type Permissions
- type Plugin
- type Plugins
- func (n Plugins) Add(plugin Plugin) (err error)
- func (n Plugins) CreateOrUpdate(v Plugin) (err error)
- func (n Plugins) Delete(name string) (err error)
- func (n Plugins) GetByName(name string) (plugin Plugin, err error)
- func (n Plugins) List(limit, offset int64, orderBy, sort string) (list []Plugin, total int64, err error)
- func (n Plugins) Search(query string, limit, offset int64) (list []Plugin, total int64, err error)
- func (n Plugins) Update(m Plugin) (err error)
- type Role
- type Roles
- func (n Roles) Add(role *Role) (err error)
- func (n Roles) Delete(name string) (err error)
- func (n Roles) GetByName(name string) (role *Role, err error)
- func (n *Roles) List(limit, offset int64, orderBy, sort string) (list []*Role, total int64, err error)
- func (n *Roles) RelData(role *Role) (err error)
- func (n *Roles) Search(query string, limit, offset int64) (list []*Role, total int64, err error)
- func (n Roles) Update(m *Role) (err error)
- type RunHistory
- type RunStory
- type Script
- type Scripts
- func (n Scripts) Add(script *Script) (id int64, err error)
- func (n Scripts) Delete(scriptId int64) (err error)
- func (n Scripts) GetById(scriptId int64) (script *Script, err error)
- func (n Scripts) GetByName(name string) (script *Script, err error)
- func (n *Scripts) List(limit, offset int64, orderBy, sort string) (list []*Script, total int64, err error)
- func (n *Scripts) Search(query string, limit, offset int64) (list []*Script, total int64, err error)
- func (n Scripts) Update(m *Script) (err error)
- type Storage
- type Storages
- type Task
- type Tasks
- func (n Tasks) Add(task *Task) (id int64, err error)
- func (n Tasks) Delete(id int64) (err error)
- func (n Tasks) Disable(id int64) (err error)
- func (n Tasks) Enable(id int64) (err error)
- func (n Tasks) GetAllEnabled() (list []*Task, err error)
- func (n Tasks) GetById(taskId int64) (task *Task, err error)
- func (n *Tasks) List(limit, offset int64, orderBy, sort string, onlyEnabled bool) (list []*Task, total int64, err error)
- func (n *Tasks) Search(query string, limit, offset int) (list []*Task, total int64, err error)
- func (n Tasks) Update(m *Task) (err error)
- type TelegramChat
- type TelegramChats
- type Template
- type TemplateTree
- type Templates
- func (n Templates) Create(tpl *Template) (err error)
- func (n Templates) Delete(name string) (err error)
- func (n Templates) GetByName(name, itemType string) (*Template, error)
- func (n Templates) GetItemsSortedList() (count int64, newItems []string, err error)
- func (n Templates) GetItemsTree() (tree []*TemplateTree, err error)
- func (n Templates) GetList(templateType string) ([]*Template, error)
- func (n *Templates) Search(query string, limit, offset int) (items []*Template, total int64, err error)
- func (n Templates) Update(m *Template) error
- func (n Templates) UpdateItemsTree(tree []*TemplateTree, parent string) error
- func (n Templates) UpdateOrCreate(tpl *Template) (err error)
- func (n Templates) UpdateStatus(m *Template) error
- type Trigger
- type Triggers
- type User
- type UserMeta
- type UserMetas
- type Users
- func (u *Users) Add(user *User) (id int64, err error)
- func (u *Users) ClearResetPassToken(userId int64) (err error)
- func (u *Users) ClearToken(userId int64) (err error)
- func (u *Users) Delete(userId int64) (err error)
- func (u *Users) GetByAuthenticationToken(token string) (user *User, err error)
- func (u *Users) GetByEmail(email string) (user *User, err error)
- func (u *Users) GetById(userId int64) (user *User, err error)
- func (u *Users) GetByNickname(nickname string) (user *User, err error)
- func (u *Users) GetByResetPassToken(token string) (user *User, err error)
- func (n *Users) List(limit, offset int64, orderBy, sort string) (list []*User, total int64, err error)
- func (u *Users) NewResetPassToken(userId int64, token string) (err error)
- func (u *Users) Update(user *User) (err error)
- func (u *Users) UpdateAuthenticationToken(userId int64, token string) (err error)
- type Variable
- type Variables
- func (n Variables) Add(variable Variable) (err error)
- func (n *Variables) CreateOrUpdate(v Variable) (err error)
- func (n Variables) Delete(name string) (err error)
- func (n Variables) GetAllSystem() (list []Variable, err error)
- func (n Variables) GetByName(name string) (variable Variable, err error)
- func (n *Variables) List(limit, offset int64, orderBy, sort string, system bool) (list []Variable, total int64, err error)
- func (n Variables) Update(m Variable) (err error)
- type Zigbee2mqtt
- type Zigbee2mqttDevice
- type Zigbee2mqttDevices
- func (z Zigbee2mqttDevices) Add(v *Zigbee2mqttDevice) (err error)
- func (z Zigbee2mqttDevices) Delete(id string) (err error)
- func (z Zigbee2mqttDevices) GetById(id string) (v *Zigbee2mqttDevice, err error)
- func (z *Zigbee2mqttDevices) List(limit, offset int64) (list []*Zigbee2mqttDevice, total int64, err error)
- func (z *Zigbee2mqttDevices) ListByBridgeId(bridgeId, limit, offset int64) (list []*Zigbee2mqttDevice, total int64, err error)
- func (z *Zigbee2mqttDevices) Search(query string, limit, offset int64) (list []*Zigbee2mqttDevice, total int64, err error)
- func (z Zigbee2mqttDevices) Update(m *Zigbee2mqttDevice) (err error)
- type Zigbee2mqtts
- func (z Zigbee2mqtts) Add(v *Zigbee2mqtt) (id int64, err error)
- func (z Zigbee2mqtts) Delete(id int64) (err error)
- func (z Zigbee2mqtts) GetById(id int64) (v *Zigbee2mqtt, err error)
- func (z *Zigbee2mqtts) GetByLogin(login string) (bridge *Zigbee2mqtt, err error)
- func (z *Zigbee2mqtts) List(limit, offset int64) (list []*Zigbee2mqtt, total int64, err error)
- func (z Zigbee2mqtts) Update(m *Zigbee2mqtt) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶ added in v0.5.0
type Action struct { Id int64 `gorm:"primary_key"` Name string Task *Task TaskId int64 Script *Script ScriptId int64 }
Action ...
type Actions ¶ added in v0.5.0
Actions ...
func (Actions) DeleteByTaskId ¶ added in v0.5.0
DeleteByTaskId ...
type AlexaIntent ¶ added in v0.3.0
type AlexaIntent struct { Name string `gorm:"primary_key"` AlexaSkill *AlexaSkill AlexaSkillId int64 Script *Script ScriptId int64 Description string CreatedAt time.Time UpdatedAt time.Time }
AlexaIntent ...
func (*AlexaIntent) TableName ¶ added in v0.3.0
func (d *AlexaIntent) TableName() string
TableName ...
type AlexaIntents ¶ added in v0.3.0
AlexaIntents ...
func (AlexaIntents) Add ¶ added in v0.3.0
func (n AlexaIntents) Add(v *AlexaIntent) (err error)
Add ...
func (AlexaIntents) Delete ¶ added in v0.3.0
func (n AlexaIntents) Delete(v *AlexaIntent) (err error)
Delete ...
func (AlexaIntents) GetByName ¶ added in v0.3.0
func (n AlexaIntents) GetByName(name string) (intent *AlexaIntent, err error)
GetByName ...
func (AlexaIntents) Update ¶ added in v0.3.0
func (n AlexaIntents) Update(v *AlexaIntent) (err error)
Update ...
type AlexaSkill ¶ added in v0.3.0
type AlexaSkill struct { Id int64 `gorm:"primary_key"` SkillId string Description string Intents []*AlexaIntent `gorm:"foreignkey:AlexaSkillId"` Status common.StatusType Script *Script ScriptId *int64 CreatedAt time.Time UpdatedAt time.Time }
AlexaSkill ...
func (*AlexaSkill) TableName ¶ added in v0.3.0
func (d *AlexaSkill) TableName() string
TableName ...
type AlexaSkills ¶ added in v0.3.0
AlexaSkills ...
func (AlexaSkills) Add ¶ added in v0.3.0
func (n AlexaSkills) Add(v *AlexaSkill) (id int64, err error)
Add ...
func (AlexaSkills) Delete ¶ added in v0.3.0
func (n AlexaSkills) Delete(id int64) (err error)
Delete ...
func (AlexaSkills) GetById ¶ added in v0.3.0
func (n AlexaSkills) GetById(id int64) (v *AlexaSkill, err error)
GetById ...
func (*AlexaSkills) List ¶ added in v0.3.0
func (n *AlexaSkills) List(limit, offset int64, orderBy, sort string) (list []*AlexaSkill, total int64, err error)
List ...
func (*AlexaSkills) ListEnabled ¶ added in v0.3.0
func (n *AlexaSkills) ListEnabled(limit, offset int64) (list []*AlexaSkill, err error)
ListEnabled ...
func (AlexaSkills) Update ¶ added in v0.3.0
func (n AlexaSkills) Update(v *AlexaSkill) (err error)
Update ...
type Area ¶ added in v0.5.0
type Area struct { Id int64 `gorm:"primary_key"` Name string Description string CreatedAt time.Time UpdatedAt time.Time }
Area ...
type Areas ¶ added in v0.5.0
Areas ...
func (Areas) DeleteByName ¶ added in v0.5.0
DeleteByName ...
func (*Areas) List ¶ added in v0.5.0
func (n *Areas) List(limit, offset int64, orderBy, sort string) (list []*Area, total int64, err error)
List ...
type Condition ¶ added in v0.5.0
type Condition struct { Id int64 `gorm:"primary_key"` Name string Task *Task TaskId int64 Script *Script ScriptId int64 }
Condition ...
type Conditions ¶ added in v0.5.0
Conditions ...
func (Conditions) DeleteByTaskId ¶ added in v0.5.0
func (n Conditions) DeleteByTaskId(id int64) (err error)
DeleteByTaskId ...
type Dashboard ¶ added in v0.6.0
type Dashboard struct { Id int64 `gorm:"primary_key"` Name string Description string Enabled bool AreaId *int64 Area *Area Tabs []*DashboardTab CreatedAt time.Time UpdatedAt time.Time }
Dashboard ...
type DashboardCard ¶ added in v0.6.0
type DashboardCard struct { Id int64 `gorm:"primary_key"` Title string Weight int Width int Height int Background string Enabled bool DashboardTabId int64 DashboardTab *DashboardTab Items []*DashboardCardItem Payload json.RawMessage `gorm:"type:jsonb;not null"` CreatedAt time.Time UpdatedAt time.Time }
DashboardCard ...
func (*DashboardCard) TableName ¶ added in v0.6.0
func (d *DashboardCard) TableName() string
TableName ...
type DashboardCardItem ¶ added in v0.6.0
type DashboardCardItem struct { Id int64 `gorm:"primary_key"` Title string Type string Weight int Enabled bool DashboardCardId int64 DashboardCard *DashboardCard EntityId *common.EntityId Payload json.RawMessage `gorm:"type:jsonb;not null"` Hidden bool Frozen bool CreatedAt time.Time UpdatedAt time.Time }
DashboardCardItem ...
func (*DashboardCardItem) TableName ¶ added in v0.6.0
func (d *DashboardCardItem) TableName() string
TableName ...
type DashboardCardItems ¶ added in v0.6.0
DashboardCardItems ...
func (DashboardCardItems) Add ¶ added in v0.6.0
func (n DashboardCardItems) Add(item *DashboardCardItem) (id int64, err error)
Add ...
func (DashboardCardItems) Delete ¶ added in v0.6.0
func (n DashboardCardItems) Delete(id int64) (err error)
Delete ...
func (DashboardCardItems) GetById ¶ added in v0.6.0
func (n DashboardCardItems) GetById(id int64) (item *DashboardCardItem, err error)
GetById ...
func (*DashboardCardItems) List ¶ added in v0.6.0
func (n *DashboardCardItems) List(limit, offset int64, orderBy, sort string) (list []*DashboardCardItem, total int64, err error)
List ...
func (DashboardCardItems) Update ¶ added in v0.6.0
func (n DashboardCardItems) Update(m *DashboardCardItem) (err error)
Update ...
type DashboardCards ¶ added in v0.6.0
DashboardCards ...
func (DashboardCards) Add ¶ added in v0.6.0
func (n DashboardCards) Add(card *DashboardCard) (id int64, err error)
Add ...
func (DashboardCards) Delete ¶ added in v0.6.0
func (n DashboardCards) Delete(id int64) (err error)
Delete ...
func (DashboardCards) GetById ¶ added in v0.6.0
func (n DashboardCards) GetById(id int64) (card *DashboardCard, err error)
GetById ...
func (*DashboardCards) List ¶ added in v0.6.0
func (n *DashboardCards) List(limit, offset int64, orderBy, sort string) (list []*DashboardCard, total int64, err error)
List ...
func (DashboardCards) Update ¶ added in v0.6.0
func (n DashboardCards) Update(m *DashboardCard) (err error)
Update ...
type DashboardTab ¶ added in v0.6.0
type DashboardTab struct { Id int64 `gorm:"primary_key"` Name string Icon string Enabled bool Weight int ColumnWidth int Gap bool Background string DashboardId int64 Dashboard *Dashboard Cards []*DashboardCard CreatedAt time.Time UpdatedAt time.Time }
DashboardTab ...
func (*DashboardTab) TableName ¶ added in v0.6.0
func (d *DashboardTab) TableName() string
TableName ...
type DashboardTabs ¶ added in v0.6.0
DashboardTabs ...
func (DashboardTabs) Add ¶ added in v0.6.0
func (n DashboardTabs) Add(tab *DashboardTab) (id int64, err error)
Add ...
func (DashboardTabs) Delete ¶ added in v0.6.0
func (n DashboardTabs) Delete(id int64) (err error)
Delete ...
func (DashboardTabs) GetById ¶ added in v0.6.0
func (n DashboardTabs) GetById(id int64) (tab *DashboardTab, err error)
GetById ...
func (*DashboardTabs) List ¶ added in v0.6.0
func (n *DashboardTabs) List(limit, offset int64, orderBy, sort string) (list []*DashboardTab, total int64, err error)
List ...
func (DashboardTabs) Update ¶ added in v0.6.0
func (n DashboardTabs) Update(m *DashboardTab) (err error)
Update ...
type Dashboards ¶ added in v0.6.0
Dashboards ...
func (Dashboards) Add ¶ added in v0.6.0
func (n Dashboards) Add(board *Dashboard) (id int64, err error)
Add ...
func (Dashboards) Delete ¶ added in v0.6.0
func (n Dashboards) Delete(id int64) (err error)
Delete ...
func (Dashboards) GetById ¶ added in v0.6.0
func (n Dashboards) GetById(id int64) (board *Dashboard, err error)
GetById ...
func (*Dashboards) List ¶ added in v0.6.0
func (n *Dashboards) List(limit, offset int64, orderBy, sort string) (list []*Dashboard, total int64, err error)
List ...
func (*Dashboards) Search ¶ added in v0.7.0
func (d *Dashboards) Search(query string, limit, offset int64) (list []*Dashboard, total int64, err error)
Search ...
func (Dashboards) Update ¶ added in v0.6.0
func (n Dashboards) Update(m *Dashboard) (err error)
Update ...
type Entities ¶ added in v0.5.0
Entities ...
func (Entities) AppendMetric ¶ added in v0.5.0
AppendMetric ...
func (Entities) AppendScript ¶ added in v0.5.0
AppendScript ...
func (Entities) DeleteMetric ¶ added in v0.5.0
DeleteMetric ...
func (Entities) DeleteScript ¶ added in v0.5.0
DeleteScript ...
func (*Entities) List ¶ added in v0.5.0
func (n *Entities) List(limit, offset int64, orderBy, sort string, autoLoad bool) (list []*Entity, total int64, err error)
List ...
func (Entities) ReplaceMetric ¶ added in v0.5.0
ReplaceMetric ...
func (Entities) ReplaceScript ¶ added in v0.5.0
ReplaceScript ...
type Entity ¶ added in v0.5.0
type Entity struct { Id common.EntityId `gorm:"primary_key"` Description string PluginName string Image *Image ImageId *int64 States []*EntityState Actions []*EntityAction AreaId *int64 Area *Area Metrics []Metric `gorm:"many2many:entity_metrics;"` Scripts []Script `gorm:"many2many:entity_scripts;"` Icon *string Payload json.RawMessage `gorm:"type:jsonb;not null"` Settings json.RawMessage `gorm:"type:jsonb;not null"` Storage []*EntityStorage AutoLoad bool ParentId *common.EntityId `gorm:"column:parent_id"` CreatedAt time.Time UpdatedAt time.Time }
Entity ...
type EntityAction ¶ added in v0.5.0
type EntityAction struct { Id int64 `gorm:"primary_key"` Name string Description string Icon *string Entity *Entity EntityId common.EntityId Image *Image ImageId *int64 Script *Script ScriptId *int64 Type string CreatedAt time.Time UpdatedAt time.Time }
EntityAction ...
func (*EntityAction) TableName ¶ added in v0.5.0
func (d *EntityAction) TableName() string
TableName ...
type EntityActions ¶ added in v0.5.0
EntityActions ...
func (EntityActions) Add ¶ added in v0.5.0
func (n EntityActions) Add(v *EntityAction) (id int64, err error)
Add ...
func (EntityActions) DeleteByEntityId ¶ added in v0.5.0
func (n EntityActions) DeleteByEntityId(deviceId common.EntityId) (err error)
DeleteByEntityId ...
func (EntityActions) GetById ¶ added in v0.5.0
func (n EntityActions) GetById(id int64) (v *EntityAction, err error)
GetById ...
func (*EntityActions) List ¶ added in v0.5.0
func (n *EntityActions) List(limit, offset int64, orderBy, sort string) (list []*EntityAction, total int64, err error)
List ...
func (EntityActions) Update ¶ added in v0.5.0
func (n EntityActions) Update(m *EntityAction) (err error)
Update ...
type EntityMetric ¶ added in v0.5.0
type EntityMetric struct { Entity *Entity EntityId string `gorm:"primary_key;auto_increment:false"` Metric *Metric MetricId int64 `gorm:"primary_key;auto_increment:false"` }
EntityMetric ...
func (EntityMetric) TableName ¶ added in v0.5.0
func (EntityMetric) TableName() string
TableName ...
type EntityScript ¶ added in v0.5.0
type EntityScript struct { Id int64 `gorm:"primary_key"` EntityId string `gorm:"primary_key;auto_increment:false"` Entity *Entity ScriptId int64 `gorm:"primary_key;auto_increment:false"` Script *Script Weight int }
EntityScript ...
func (*EntityScript) TableName ¶ added in v0.5.0
func (d *EntityScript) TableName() string
TableName ...
type EntityState ¶ added in v0.5.0
type EntityState struct { Id int64 `gorm:"primary_key"` Name string Description string Icon *string Entity *Entity EntityId common.EntityId Image *Image ImageId *int64 Style string CreatedAt time.Time UpdatedAt time.Time }
EntityState ...
func (*EntityState) TableName ¶ added in v0.5.0
func (d *EntityState) TableName() string
TableName ...
type EntityStates ¶ added in v0.5.0
EntityStates ...
func (EntityStates) Add ¶ added in v0.5.0
func (n EntityStates) Add(v *EntityState) (id int64, err error)
Add ...
func (EntityStates) DeleteByEntityId ¶ added in v0.5.0
func (n EntityStates) DeleteByEntityId(entityId common.EntityId) (err error)
DeleteByEntityId ...
func (EntityStates) GetById ¶ added in v0.5.0
func (n EntityStates) GetById(id int64) (v *EntityState, err error)
GetById ...
func (*EntityStates) List ¶ added in v0.5.0
func (n *EntityStates) List(limit, offset int64, orderBy, sort string) (list []*EntityState, total int64, err error)
List ...
func (EntityStates) Update ¶ added in v0.5.0
func (n EntityStates) Update(m *EntityState) (err error)
Update ...
type EntityStorage ¶ added in v0.5.0
type EntityStorage struct { Id int64 `gorm:"primary_key"` EntityId common.EntityId State string Attributes json.RawMessage `gorm:"type:jsonb;not null"` CreatedAt time.Time }
EntityStorage ...
func (*EntityStorage) TableName ¶ added in v0.5.0
func (d *EntityStorage) TableName() string
TableName ...
type EntityStorages ¶ added in v0.5.0
EntityStorages ...
func (*EntityStorages) Add ¶ added in v0.5.0
func (n *EntityStorages) Add(v EntityStorage) (id int64, err error)
Add ...
func (*EntityStorages) GetLastByEntityId ¶ added in v0.5.0
func (n *EntityStorages) GetLastByEntityId(entityId common.EntityId) (v EntityStorage, err error)
GetLastByEntityId ...
func (*EntityStorages) List ¶ added in v0.5.0
func (n *EntityStorages) List(limit, offset int64, orderBy, sort string) (list []EntityStorage, total int64, err error)
List ...
func (*EntityStorages) ListByEntityId ¶ added in v0.6.0
func (n *EntityStorages) ListByEntityId(limit, offset int64, orderBy, sort string, entityId common.EntityId, startDate, endDate *time.Time) (list []EntityStorage, total int64, err error)
ListByEntityId ...
type Image ¶
type Image struct { Id int64 `gorm:"primary_key"` Thumb string Image string MimeType string Title string Size int64 Name string CreatedAt time.Time }
Image ...
type ImageFilterList ¶
ImageFilterList ...
type Images ¶
Images ...
func (*Images) GetAllByDate ¶
GetAllByDate ...
func (Images) GetByImageName ¶ added in v0.2.0
GetByImageName ...
func (*Images) GetFilterList ¶
func (n *Images) GetFilterList() (images []*ImageFilterList, err error)
GetFilterList ...
type Log ¶
type Log struct { Id int64 `gorm:"primary_key"` Body string Level common.LogLevel Owner string CreatedAt time.Time }
Log ...
type LogQuery ¶
type LogQuery struct { StartDate *time.Time `json:"start_date"` EndDate *time.Time `json:"end_date"` Levels []string `json:"levels"` }
LogQuery ...
type Logs ¶
Logs ...
func (*Logs) DeleteOldest ¶ added in v0.9.3
DeleteOldest ...
type Message ¶ added in v0.0.17
type Message struct { Id int64 `gorm:"primary_key"` Type string Payload json.RawMessage `gorm:"type:jsonb;not null"` Statuses []*MessageDelivery CreatedAt time.Time UpdatedAt time.Time }
Message ...
type MessageDeliveries ¶ added in v0.0.17
MessageDeliveries ...
func (MessageDeliveries) Add ¶ added in v0.0.17
func (n MessageDeliveries) Add(msg MessageDelivery) (id int64, err error)
Add ...
func (MessageDeliveries) Delete ¶ added in v0.0.17
func (n MessageDeliveries) Delete(id int64) (err error)
Delete ...
func (*MessageDeliveries) GetAllUncompleted ¶ added in v0.0.17
func (n *MessageDeliveries) GetAllUncompleted(limit, offset int64) (list []MessageDelivery, total int64, err error)
GetAllUncompleted ...
func (MessageDeliveries) GetById ¶ added in v0.0.17
func (n MessageDeliveries) GetById(id int64) (msg MessageDelivery, err error)
GetById ...
func (*MessageDeliveries) List ¶ added in v0.0.17
func (n *MessageDeliveries) List(limit, offset int64, orderBy, sort string) (list []MessageDelivery, total int64, err error)
List ...
func (MessageDeliveries) SetStatus ¶ added in v0.0.17
func (n MessageDeliveries) SetStatus(msg MessageDelivery) (err error)
SetStatus ...
type MessageDelivery ¶ added in v0.0.17
type MessageDelivery struct { Id int64 `gorm:"primary_key"` Message Message MessageId int64 Address string Status string ErrorMessageStatus *string `gorm:"column:error_system_code"` ErrorMessageBody *string `gorm:"column:error_system_message"` CreatedAt time.Time UpdatedAt time.Time }
MessageDelivery ...
func (*MessageDelivery) TableName ¶ added in v0.0.17
func (d *MessageDelivery) TableName() string
TableName ...
type Metric ¶ added in v0.5.0
type Metric struct { Id int64 `gorm:"primary_key"` Data []MetricBucket Name string Description string Options json.RawMessage `gorm:"type:jsonb;not null"` Type common.MetricType UpdatedAt time.Time CreatedAt time.Time }
Metric ...
type MetricBucket ¶ added in v0.5.0
type MetricBucket struct { Value json.RawMessage `gorm:"type:jsonb;not null"` Metric *Metric MetricId int64 Time time.Time }
MetricBucket ...
func (*MetricBucket) TableName ¶ added in v0.5.0
func (d *MetricBucket) TableName() string
TableName ...
type MetricBuckets ¶ added in v0.5.0
MetricBuckets ...
func (MetricBuckets) Add ¶ added in v0.5.0
func (n MetricBuckets) Add(metric MetricBucket) (err error)
Add ...
func (MetricBuckets) CreateHypertable ¶ added in v0.5.0
func (n MetricBuckets) CreateHypertable() (err error)
CreateHypertable ...
func (MetricBuckets) DeleteById ¶ added in v0.5.0
func (n MetricBuckets) DeleteById(id int64) (err error)
DeleteById ...
func (MetricBuckets) DeleteByMetricId ¶ added in v0.5.0
func (n MetricBuckets) DeleteByMetricId(metricId int64) (err error)
DeleteByMetricId ...
func (*MetricBuckets) DeleteOldest ¶ added in v0.5.0
func (n *MetricBuckets) DeleteOldest(days int) (err error)
DeleteOldest ...
func (*MetricBuckets) Simple24HPreview ¶ added in v0.5.0
func (n *MetricBuckets) Simple24HPreview(metricId int64, optionItems []string) (list []MetricBucket, err error)
Simple24HPreview ...
func (*MetricBuckets) SimpleListByRangeType ¶ added in v0.5.0
func (n *MetricBuckets) SimpleListByRangeType(metricId int64, metricRange common.MetricRange, optionItems []string) (list []MetricBucket, err error)
SimpleListByRangeType ...
func (*MetricBuckets) SimpleListWithSoftRange ¶ added in v0.5.0
func (n *MetricBuckets) SimpleListWithSoftRange(from, to time.Time, metricId int64, optionItems []string) (list []MetricBucket, err error)
SimpleListWithSoftRange ...
type Metrics ¶ added in v0.5.0
Metrics ...
func (*Metrics) List ¶ added in v0.5.0
func (n *Metrics) List(limit, offset int64, orderBy, sort string) (list []Metric, total int64, err error)
List ...
type Permission ¶
type Permission struct { Id int64 `gorm:"primary_key"` Role *Role `gorm:"foreignkey:RoleName"` RoleName string PackageName string LevelName string }
Permission ...
type Permissions ¶
Permissions ...
func (Permissions) Add ¶
func (n Permissions) Add(permission *Permission) (id int64, err error)
Add ...
func (Permissions) Delete ¶
func (n Permissions) Delete(roleName, packageName string, levelName []string) (err error)
Delete ...
func (Permissions) GetAllPermissions ¶
func (n Permissions) GetAllPermissions(name string) (permissions []*Permission, err error)
GetAllPermissions ...
type Plugin ¶ added in v0.5.0
type Plugin struct { Name string `gorm:"primary_key"` Version string Enabled bool System bool Actor bool Settings json.RawMessage `gorm:"type:jsonb;not null"` }
Plugin ...
type Plugins ¶ added in v0.5.0
Plugins ...
func (Plugins) CreateOrUpdate ¶ added in v0.5.0
CreateOrUpdate ...
func (Plugins) List ¶ added in v0.5.0
func (n Plugins) List(limit, offset int64, orderBy, sort string) (list []Plugin, total int64, err error)
List ...
type Role ¶
type Role struct { Name string `gorm:"primary_key"` Description string Role *Role RoleName sql.NullString `gorm:"column:parent"` Children []*Role Permissions []*Permission CreatedAt time.Time UpdatedAt time.Time }
Role ...
type Roles ¶
Roles ...
func (*Roles) List ¶
func (n *Roles) List(limit, offset int64, orderBy, sort string) (list []*Role, total int64, err error)
List ...
type RunHistory ¶ added in v0.5.0
RunHistory ...
func (RunHistory) Add ¶ added in v0.5.0
func (n RunHistory) Add(story *RunStory) (id int64, err error)
Add ...
func (*RunHistory) List ¶ added in v0.5.0
func (n *RunHistory) List(limit, offset int64, orderBy, sort string) (list []*RunStory, total int64, err error)
List ...
func (RunHistory) Update ¶ added in v0.5.0
func (n RunHistory) Update(m *RunStory) (err error)
Update ...
type Script ¶
type Script struct { Id int64 `gorm:"primary_key"` Lang ScriptLang Name string Source string Description string Compiled string CreatedAt time.Time UpdatedAt time.Time }
Script ...
type Scripts ¶
Scripts ...
func (*Scripts) List ¶
func (n *Scripts) List(limit, offset int64, orderBy, sort string) (list []*Script, total int64, err error)
List ...
type Storage ¶ added in v0.4.0
type Storage struct { Name string `gorm:"primary_key"` Value json.RawMessage `gorm:"type:jsonb;not null"` UpdatedAt time.Time CreatedAt time.Time }
Storage ...
type Storages ¶ added in v0.4.0
Storages ...
func (*Storages) CreateOrUpdate ¶ added in v0.4.0
CreateOrUpdate ...
type Task ¶ added in v0.5.0
type Task struct { Id int64 `gorm:"primary_key"` Name string Description string Enabled bool Condition common.ConditionType Conditions []*Condition Triggers []*Trigger Actions []*Action AreaId *int64 Area *Area CreatedAt time.Time UpdatedAt time.Time }
Task ...
type Tasks ¶ added in v0.5.0
Tasks ...
func (Tasks) GetAllEnabled ¶ added in v0.5.0
GetAllEnabled ...
func (*Tasks) List ¶ added in v0.5.0
func (n *Tasks) List(limit, offset int64, orderBy, sort string, onlyEnabled bool) (list []*Task, total int64, err error)
List ...
type TelegramChat ¶ added in v0.5.0
type TelegramChat struct { EntityId common.EntityId ChatId int64 Username string CreatedAt time.Time }
TelegramChat ...
func (*TelegramChat) TableName ¶ added in v0.5.0
func (d *TelegramChat) TableName() string
TableName ...
type TelegramChats ¶ added in v0.5.0
TelegramChats ...
func (TelegramChats) Add ¶ added in v0.5.0
func (n TelegramChats) Add(ch TelegramChat) (err error)
Add ...
func (TelegramChats) Delete ¶ added in v0.5.0
func (n TelegramChats) Delete(entityId common.EntityId, chatId int64) (err error)
Delete ...
func (*TelegramChats) List ¶ added in v0.5.0
func (n *TelegramChats) List(limit, offset int64, orderBy, sort string, entityId common.EntityId) (list []TelegramChat, total int64, err error)
List ...
type Template ¶ added in v0.0.17
type Template struct { Name string `gorm:"primary_key"` Description string Content string Status string Type string ParentName *string `gorm:"column:parent"` CreatedAt time.Time UpdatedAt time.Time }
Template ...
type TemplateTree ¶ added in v0.0.17
type TemplateTree struct { Name string `json:"name"` Description string `json:"description"` Status string `json:"status"` Nodes []*TemplateTree `json:"nodes"` }
TemplateTree ...
type Templates ¶ added in v0.0.17
Templates ...
func (Templates) GetItemsSortedList ¶ added in v0.0.17
GetItemsSortedList ...
func (Templates) GetItemsTree ¶ added in v0.0.17
func (n Templates) GetItemsTree() (tree []*TemplateTree, err error)
GetItemsTree ...
func (*Templates) Search ¶ added in v0.0.17
func (n *Templates) Search(query string, limit, offset int) (items []*Template, total int64, err error)
Search ...
func (Templates) UpdateItemsTree ¶ added in v0.0.17
func (n Templates) UpdateItemsTree(tree []*TemplateTree, parent string) error
UpdateItemsTree ...
func (Templates) UpdateOrCreate ¶ added in v0.0.17
UpdateOrCreate ...
func (Templates) UpdateStatus ¶ added in v0.0.17
UpdateStatus ...
type Trigger ¶ added in v0.5.0
type Trigger struct { Id int64 `gorm:"primary_key"` Name string Task *Task TaskId int64 Entity *Entity EntityId *common.EntityId Script *Script ScriptId int64 PluginName string Payload string }
Trigger ...
type Triggers ¶ added in v0.5.0
Triggers ...
func (Triggers) DeleteByTaskId ¶ added in v0.5.0
DeleteByTaskId ...
type User ¶
type User struct { Id int64 `gorm:"primary_key"` Nickname string FirstName string LastName string EncryptedPassword string Email string Status string ResetPasswordToken string AuthenticationToken *string Image *Image ImageId sql.NullInt64 SignInCount int64 CurrentSignInIp string LastSignInIp string Lang string User *User UserId sql.NullInt64 Role *Role RoleName string Meta []*UserMeta ResetPasswordSentAt *time.Time CurrentSignInAt *time.Time LastSignInAt *time.Time CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time History json.RawMessage `gorm:"type:jsonb;not null"` }
User ...
type Users ¶
Users ...
func (*Users) ClearResetPassToken ¶
ClearResetPassToken ...
func (*Users) GetByAuthenticationToken ¶
GetByAuthenticationToken ...
func (*Users) GetByEmail ¶
GetByEmail ...
func (*Users) GetByNickname ¶ added in v0.2.0
GetByNickname ...
func (*Users) GetByResetPassToken ¶
GetByResetPassToken ...
func (*Users) List ¶
func (n *Users) List(limit, offset int64, orderBy, sort string) (list []*User, total int64, err error)
List ...
func (*Users) NewResetPassToken ¶
NewResetPassToken ...
type Variable ¶
type Variable struct { Name string `gorm:"primary_key"` Value string System bool EntityId *common.EntityId CreatedAt time.Time UpdatedAt time.Time }
Variable ...
type Variables ¶
Variables ...
func (*Variables) CreateOrUpdate ¶ added in v0.5.0
CreateOrUpdate ...
func (Variables) GetAllSystem ¶ added in v0.6.0
GetAllSystem ...
type Zigbee2mqtt ¶ added in v0.1.0
type Zigbee2mqtt struct { Id int64 `gorm:"primary_key"` Name string Login string Devices []*Zigbee2mqttDevice EncryptedPassword string PermitJoin bool BaseTopic string CreatedAt time.Time UpdatedAt time.Time }
Zigbee2mqtt ...
func (*Zigbee2mqtt) TableName ¶ added in v0.1.0
func (m *Zigbee2mqtt) TableName() string
TableName ...
type Zigbee2mqttDevice ¶ added in v0.1.0
type Zigbee2mqttDevice struct { Id string `gorm:"primary_key"` Zigbee2mqtt *Zigbee2mqtt Zigbee2mqttId int64 Name string Type string Model string Description string Manufacturer string Status string Functions pq.StringArray `gorm:"type:varchar(100)[]"` Payload json.RawMessage `gorm:"type:jsonb;not null"` CreatedAt time.Time UpdatedAt time.Time }
Zigbee2mqttDevice ...
func (*Zigbee2mqttDevice) TableName ¶ added in v0.1.0
func (m *Zigbee2mqttDevice) TableName() string
TableName ...
type Zigbee2mqttDevices ¶ added in v0.1.0
Zigbee2mqttDevices ...
func (Zigbee2mqttDevices) Add ¶ added in v0.1.0
func (z Zigbee2mqttDevices) Add(v *Zigbee2mqttDevice) (err error)
Add ...
func (Zigbee2mqttDevices) Delete ¶ added in v0.1.0
func (z Zigbee2mqttDevices) Delete(id string) (err error)
Delete ...
func (Zigbee2mqttDevices) GetById ¶ added in v0.1.0
func (z Zigbee2mqttDevices) GetById(id string) (v *Zigbee2mqttDevice, err error)
GetById ...
func (*Zigbee2mqttDevices) List ¶ added in v0.1.0
func (z *Zigbee2mqttDevices) List(limit, offset int64) (list []*Zigbee2mqttDevice, total int64, err error)
List ...
func (*Zigbee2mqttDevices) ListByBridgeId ¶ added in v0.5.2
func (z *Zigbee2mqttDevices) ListByBridgeId(bridgeId, limit, offset int64) (list []*Zigbee2mqttDevice, total int64, err error)
ListByBridgeId ...
func (*Zigbee2mqttDevices) Search ¶ added in v0.1.0
func (z *Zigbee2mqttDevices) Search(query string, limit, offset int64) (list []*Zigbee2mqttDevice, total int64, err error)
Search ...
func (Zigbee2mqttDevices) Update ¶ added in v0.1.0
func (z Zigbee2mqttDevices) Update(m *Zigbee2mqttDevice) (err error)
Update ...
type Zigbee2mqtts ¶ added in v0.1.0
Zigbee2mqtts ...
func (Zigbee2mqtts) Add ¶ added in v0.1.0
func (z Zigbee2mqtts) Add(v *Zigbee2mqtt) (id int64, err error)
Add ...
func (Zigbee2mqtts) Delete ¶ added in v0.1.0
func (z Zigbee2mqtts) Delete(id int64) (err error)
Delete ...
func (Zigbee2mqtts) GetById ¶ added in v0.1.0
func (z Zigbee2mqtts) GetById(id int64) (v *Zigbee2mqtt, err error)
GetById ...
func (*Zigbee2mqtts) GetByLogin ¶ added in v0.1.0
func (z *Zigbee2mqtts) GetByLogin(login string) (bridge *Zigbee2mqtt, err error)
GetByLogin ...
func (*Zigbee2mqtts) List ¶ added in v0.1.0
func (z *Zigbee2mqtts) List(limit, offset int64) (list []*Zigbee2mqtt, total int64, err error)
List ...
func (Zigbee2mqtts) Update ¶ added in v0.1.0
func (z Zigbee2mqtts) Update(m *Zigbee2mqtt) (err error)
Update ...
Source Files ¶
- action.go
- alexa_intent.go
- alexa_skill.go
- area.go
- condition.go
- dashboard.go
- dashboard_card.go
- dashboard_card_item.go
- dashboard_tab.go
- db.go
- entity.go
- entity_action.go
- entity_metric.go
- entity_script.go
- entity_state.go
- entity_storage.go
- image.go
- log.go
- message.go
- message_delivery.go
- metric.go
- metric_bucket.go
- permission.go
- plugin.go
- role.go
- run_history.go
- script.go
- storage.go
- task.go
- telegram_chat.go
- template.go
- trigger.go
- user.go
- usermeta.go
- variable.go
- zigbee2mqtt.go
- zigbee2mqtt_device.go