Documentation ¶
Index ¶
- func ExtractTransaction(ctx context.Context) *gorm.DB
- type Action
- type Actions
- func (t Actions) Add(ctx context.Context, action *Action) (id int64, err error)
- func (t Actions) Delete(ctx context.Context, id int64) (err error)
- func (t Actions) GetById(ctx context.Context, id int64) (action *Action, err error)
- func (t *Actions) List(ctx context.Context, limit, offset int, orderBy, sort string, ids *[]uint64) (list []*Action, total int64, err error)
- func (t *Actions) Search(ctx context.Context, query string, limit, offset int) (list []*Action, total int64, err error)
- func (t Actions) Update(ctx context.Context, m *Action) (err error)
- type AlexaIntent
- type AlexaIntents
- func (n AlexaIntents) Add(ctx context.Context, v *AlexaIntent) (err error)
- func (n AlexaIntents) Delete(ctx context.Context, v *AlexaIntent) (err error)
- func (n AlexaIntents) GetByName(ctx context.Context, name string) (intent *AlexaIntent, err error)
- func (n AlexaIntents) Update(ctx context.Context, v *AlexaIntent) (err error)
- type AlexaSkill
- type AlexaSkills
- func (n AlexaSkills) Add(ctx context.Context, v *AlexaSkill) (id int64, err error)
- func (n AlexaSkills) Delete(ctx context.Context, id int64) (err error)
- func (n AlexaSkills) GetById(ctx context.Context, id int64) (v *AlexaSkill, err error)
- func (n *AlexaSkills) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*AlexaSkill, total int64, err error)
- func (n *AlexaSkills) ListEnabled(ctx context.Context, limit, offset int) (list []*AlexaSkill, err error)
- func (n AlexaSkills) Update(ctx context.Context, v *AlexaSkill) (err error)
- type Area
- type Areas
- func (n *Areas) Add(ctx context.Context, area *Area) (id int64, err error)
- func (n *Areas) Clean(ctx context.Context) (err error)
- func (n *Areas) DeleteByName(ctx context.Context, name string) (err error)
- func (n *Areas) GetById(ctx context.Context, areaId int64) (area *Area, err error)
- func (n *Areas) GetByName(ctx context.Context, name string) (area *Area, err error)
- func (n *Areas) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Area, total int64, err error)
- func (n *Areas) Search(ctx context.Context, query string, limit, offset int) (list []*Area, total int64, err error)
- func (n *Areas) Update(ctx context.Context, area *Area) (err error)
- type Automation
- type AutomationStatistic
- type Common
- type Condition
- type Conditions
- func (t Conditions) Add(ctx context.Context, condition *Condition) (id int64, err error)
- func (t Conditions) Delete(ctx context.Context, id int64) (err error)
- func (t Conditions) GetById(ctx context.Context, id int64) (condition *Condition, err error)
- func (t *Conditions) List(ctx context.Context, limit, offset int, orderBy, sort string, ids *[]uint64) (list []*Condition, total int64, err error)
- func (t *Conditions) Search(ctx context.Context, query string, limit, offset int) (list []*Condition, total int64, err error)
- func (t Conditions) Update(ctx context.Context, m *Condition) (err error)
- type Dashboard
- type DashboardCard
- type DashboardCardItem
- type DashboardCardItems
- func (n DashboardCardItems) Add(ctx context.Context, item *DashboardCardItem) (id int64, err error)
- func (n DashboardCardItems) Delete(ctx context.Context, id int64) (err error)
- func (n DashboardCardItems) GetById(ctx context.Context, id int64) (item *DashboardCardItem, err error)
- func (n *DashboardCardItems) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*DashboardCardItem, total int64, err error)
- func (n DashboardCardItems) Update(ctx context.Context, m *DashboardCardItem) (err error)
- type DashboardCards
- func (n DashboardCards) Add(ctx context.Context, card *DashboardCard) (id int64, err error)
- func (n DashboardCards) Delete(ctx context.Context, id int64) (err error)
- func (n DashboardCards) GetById(ctx context.Context, id int64) (card *DashboardCard, err error)
- func (n *DashboardCards) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*DashboardCard, total int64, err error)
- func (n DashboardCards) Update(ctx context.Context, m *DashboardCard) (err error)
- type DashboardTab
- type DashboardTabs
- func (n DashboardTabs) Add(ctx context.Context, tab *DashboardTab) (id int64, err error)
- func (n DashboardTabs) Delete(ctx context.Context, id int64) (err error)
- func (n DashboardTabs) GetById(ctx context.Context, id int64) (tab *DashboardTab, err error)
- func (n *DashboardTabs) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*DashboardTab, total int64, err error)
- func (n DashboardTabs) Update(ctx context.Context, tab *DashboardTab) (err error)
- type Dashboards
- func (n Dashboards) Add(ctx context.Context, board *Dashboard) (id int64, err error)
- func (n Dashboards) Delete(ctx context.Context, id int64) (err error)
- func (n Dashboards) GetById(ctx context.Context, id int64) (board *Dashboard, err error)
- func (n *Dashboards) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Dashboard, total int64, err error)
- func (d *Dashboards) Search(ctx context.Context, query string, limit, offset int) (list []*Dashboard, total int64, err error)
- func (n Dashboards) Update(ctx context.Context, board *Dashboard) (err error)
- type Entities
- func (n Entities) Add(ctx context.Context, v *Entity) (err error)
- func (n Entities) Delete(ctx context.Context, id pkgCommon.EntityId) (err error)
- func (n Entities) DeleteScripts(ctx context.Context, id pkgCommon.EntityId) (err error)
- func (n Entities) DeleteTags(ctx context.Context, id pkgCommon.EntityId) (err error)
- func (n Entities) GetById(ctx context.Context, id pkgCommon.EntityId) (v *Entity, err error)
- func (n Entities) GetByIds(ctx context.Context, ids []pkgCommon.EntityId) (list []*Entity, err error)
- func (n Entities) GetByIdsSimple(ctx context.Context, ids []pkgCommon.EntityId) (list []*Entity, err error)
- func (n *Entities) GetByType(ctx context.Context, t string, limit, offset int) (list []*Entity, err error)
- func (n *Entities) List(ctx context.Context, limit, offset int, orderBy, sort string, autoLoad bool, ...) (list []*Entity, total int64, err error)
- func (n *Entities) ListPlain(ctx context.Context, limit, offset int, orderBy, sort string, autoLoad bool, ...) (list []*Entity, total int64, err error)
- func (n Entities) PreloadStorage(ctx context.Context, list []*Entity) (err error)
- func (n *Entities) Search(ctx context.Context, query string, limit, offset int) (list []*Entity, total int64, err error)
- func (n *Entities) Statistic(ctx context.Context) (statistic *EntitiesStatistic, err error)
- func (n Entities) Update(ctx context.Context, v *Entity) (err error)
- func (n Entities) UpdateAutoload(ctx context.Context, entityId pkgCommon.EntityId, autoLoad bool) (err error)
- type EntitiesStatistic
- type Entity
- type EntityAction
- type EntityActions
- func (n EntityActions) Add(ctx context.Context, v *EntityAction) (id int64, err error)
- func (n *EntityActions) AddMultiple(ctx context.Context, actions []*EntityAction) (err error)
- func (n EntityActions) DeleteByEntityId(ctx context.Context, deviceId pkgCommon.EntityId) (err error)
- func (n EntityActions) GetById(ctx context.Context, id int64) (v *EntityAction, err error)
- func (n *EntityActions) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*EntityAction, total int64, err error)
- func (n EntityActions) Update(ctx context.Context, m *EntityAction) (err error)
- type EntityMetric
- type EntityScript
- type EntityScripts
- type EntityState
- type EntityStates
- func (n EntityStates) Add(ctx context.Context, v *EntityState) (id int64, err error)
- func (n *EntityStates) AddMultiple(ctx context.Context, states []*EntityState) (err error)
- func (n EntityStates) DeleteByEntityId(ctx context.Context, entityId pkgCommon.EntityId) (err error)
- func (n EntityStates) GetById(ctx context.Context, id int64) (v *EntityState, err error)
- func (n *EntityStates) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*EntityState, total int64, err error)
- func (n EntityStates) Update(ctx context.Context, m *EntityState) (err error)
- type EntityStorage
- type EntityStorages
- func (n *EntityStorages) Add(ctx context.Context, v *EntityStorage) (id int64, err error)
- func (n *EntityStorages) DeleteOldest(ctx context.Context, days int) (err error)
- func (n *EntityStorages) GetLastByEntityId(ctx context.Context, entityId pkgCommon.EntityId) (v *EntityStorage, err error)
- func (n *EntityStorages) GetLastThreeById(ctx context.Context, entityId pkgCommon.EntityId, id int64) (list []*EntityStorage, err error)
- func (n *EntityStorages) List(ctx context.Context, limit, offset int, orderBy, sort string, ...) (list []*EntityStorage, total int64, err error)
- type EntityTag
- type EntityTags
- type Image
- type ImageFilterList
- type Images
- func (n Images) Add(ctx context.Context, v *Image) (id int64, err error)
- func (n *Images) AddMultiple(ctx context.Context, images []*Image) (err error)
- func (n Images) Delete(ctx context.Context, mapId int64) (err error)
- func (n *Images) GetAllByDate(ctx context.Context, filter string) (images []*Image, err error)
- func (n Images) GetById(ctx context.Context, id int64) (v *Image, err error)
- func (n Images) GetByImageName(ctx context.Context, imageName string) (v *Image, err error)
- func (n *Images) GetFilterList(ctx context.Context) (images []*ImageFilterList, err error)
- func (n *Images) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Image, total int64, err error)
- func (n Images) Update(ctx context.Context, m *Image) (err error)
- type Log
- type LogQuery
- type Logs
- func (n Logs) Add(ctx context.Context, v *Log) (id int64, err error)
- func (n *Logs) AddMultiple(ctx context.Context, logs []*Log) (err error)
- func (n Logs) Delete(ctx context.Context, mapId int64) (err error)
- func (n *Logs) DeleteOldest(ctx context.Context, days int) (err error)
- func (n Logs) GetById(ctx context.Context, id int64) (v *Log, err error)
- func (n *Logs) List(ctx context.Context, limit, offset int, orderBy, sort string, ...) (list []*Log, total int64, err error)
- func (n *Logs) Search(ctx context.Context, query string, limit, offset int) (list []*Log, total int64, err error)
- type Message
- type MessageDeliveries
- func (n *MessageDeliveries) Add(ctx context.Context, msg *MessageDelivery) (id int64, err error)
- func (n *MessageDeliveries) Delete(ctx context.Context, id int64) (err error)
- func (n *MessageDeliveries) GetAllUncompleted(ctx context.Context, limit, offset int) (list []*MessageDelivery, total int64, err error)
- func (n *MessageDeliveries) GetById(ctx context.Context, id int64) (msg *MessageDelivery, err error)
- func (n *MessageDeliveries) List(ctx context.Context, limit, offset int, orderBy, sort string, ...) (list []*MessageDelivery, total int64, err error)
- func (n *MessageDeliveries) SetStatus(ctx context.Context, msg *MessageDelivery) (err error)
- type MessageDelivery
- type MessageDeliveryQuery
- type Messages
- type Metric
- type MetricBucket
- type MetricBuckets
- func (n MetricBuckets) Add(ctx context.Context, metric *MetricBucket) (err error)
- func (n *MetricBuckets) AddMultiple(ctx context.Context, buckets []*MetricBucket) (err error)
- func (n MetricBuckets) DeleteById(ctx context.Context, id int64) (err error)
- func (n MetricBuckets) DeleteByMetricId(ctx context.Context, metricId int64) (err error)
- func (n *MetricBuckets) DeleteOldest(ctx context.Context, days int) (err error)
- func (n *MetricBuckets) List(ctx context.Context, metricId int64, optionItems []string, ...) (list []*MetricBucket, err error)
- type Metrics
- func (n Metrics) Add(ctx context.Context, metric *Metric) (id int64, err error)
- func (n *Metrics) AddMultiple(ctx context.Context, metrics []*Metric) (err error)
- func (n Metrics) Delete(ctx context.Context, id int64) (err error)
- func (n Metrics) GetById(ctx context.Context, id int64) (metric *Metric, err error)
- func (n *Metrics) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Metric, total int64, err error)
- func (n *Metrics) Search(ctx context.Context, query string, limit, offset int) (list []*Metric, total int64, err error)
- func (n Metrics) Update(ctx context.Context, m *Metric) (err error)
- type Permission
- type Permissions
- func (n Permissions) Add(ctx context.Context, permission *Permission) (id int64, err error)
- func (n Permissions) Delete(ctx context.Context, roleName, packageName string, levelName []string) (err error)
- func (n Permissions) GetAllPermissions(ctx context.Context, name string) (permissions []*Permission, err error)
- type Plugin
- type Plugins
- func (n Plugins) Add(ctx context.Context, plugin *Plugin) (err error)
- func (n Plugins) CreateOrUpdate(ctx context.Context, v *Plugin) (err error)
- func (n Plugins) Delete(ctx context.Context, name string) (err error)
- func (n Plugins) GetByName(ctx context.Context, name string) (plugin *Plugin, err error)
- func (n Plugins) List(ctx context.Context, limit, offset int, orderBy, sort string, ...) (list []*Plugin, total int64, err error)
- func (n Plugins) Search(ctx context.Context, query string, limit, offset int) (list []*Plugin, total int64, err error)
- func (n Plugins) Update(ctx context.Context, m *Plugin) (err error)
- type Point
- type Polygon
- type Role
- type Roles
- func (n Roles) Add(ctx context.Context, role *Role) (err error)
- func (n Roles) Delete(ctx context.Context, name string) (err error)
- func (n Roles) GetByName(ctx context.Context, name string) (role *Role, err error)
- func (n *Roles) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Role, total int64, err error)
- func (n *Roles) RelData(ctx context.Context, role *Role) (err error)
- func (n *Roles) Search(ctx context.Context, query string, limit, offset int) (list []*Role, total int64, err error)
- func (n Roles) Update(ctx context.Context, m *Role) (err error)
- type RunHistory
- func (n RunHistory) Add(ctx context.Context, story *RunStory) (id int64, err error)
- func (n *RunHistory) DeleteOldest(ctx context.Context, days int) (err error)
- func (n *RunHistory) List(ctx context.Context, limit, offset int, orderBy, sort string, from *time.Time) (list []*RunStory, total int64, err error)
- func (n RunHistory) Update(ctx context.Context, m *RunStory) (err error)
- type RunStory
- type Script
- type ScriptInfo
- type ScriptVersion
- type ScriptVersions
- type Scripts
- func (n Scripts) Add(ctx context.Context, script *Script) (id int64, err error)
- func (n Scripts) Delete(ctx context.Context, scriptId int64) (err error)
- func (n Scripts) GetById(ctx context.Context, scriptId int64) (script *Script, err error)
- func (n Scripts) GetByName(ctx context.Context, name string) (script *Script, err error)
- func (n *Scripts) List(ctx context.Context, limit, offset int, orderBy, sort string, query *string, ...) (list []*Script, total int64, err error)
- func (n *Scripts) Search(ctx context.Context, query string, limit, offset int) (list []*Script, total int64, err error)
- func (n *Scripts) Statistic(ctx context.Context) (statistic *ScriptsStatistic, err error)
- func (n Scripts) Update(ctx context.Context, script *Script) (err error)
- type ScriptsStatistic
- type Tag
- type Tags
- func (n Tags) Add(ctx context.Context, tag *Tag) (id int64, err error)
- func (n *Tags) Delete(ctx context.Context, name string) (err error)
- func (n *Tags) GetById(ctx context.Context, id int64) (tag *Tag, err error)
- func (n *Tags) GetByName(ctx context.Context, name string) (tag *Tag, err error)
- func (n *Tags) List(ctx context.Context, limit, offset int, orderBy, sort string, query *string, ...) (list []*Tag, total int64, err error)
- func (n *Tags) Search(ctx context.Context, query string, limit, offset int) (list []*Tag, total int64, err error)
- func (n *Tags) Update(ctx context.Context, tag *Tag) (err error)
- type Task
- type TaskAction
- type TaskCondition
- type TaskTrigger
- type Tasks
- func (n Tasks) Add(ctx context.Context, task *Task) (id int64, err error)
- func (n Tasks) Delete(ctx context.Context, id int64) (err error)
- func (n Tasks) DeleteAction(ctx context.Context, id int64) (err error)
- func (n Tasks) DeleteCondition(ctx context.Context, id int64) (err error)
- func (n Tasks) DeleteTrigger(ctx context.Context, id int64) (err error)
- func (n Tasks) Disable(ctx context.Context, id int64) (err error)
- func (n Tasks) Enable(ctx context.Context, id int64) (err error)
- func (n Tasks) GetById(ctx context.Context, taskId int64) (task *Task, err error)
- func (n Tasks) List(ctx context.Context, limit, offset int, orderBy, sort string, onlyEnabled bool) (list []*Task, total int64, err error)
- func (n Tasks) Search(ctx context.Context, query string, limit, offset int) (list []*Task, total int64, err error)
- func (n Tasks) Update(ctx context.Context, task *Task) (err error)
- type TelegramChat
- type TelegramChats
- func (n TelegramChats) Add(ctx context.Context, ch TelegramChat) (err error)
- func (n TelegramChats) Delete(ctx context.Context, entityId pkgCommon.EntityId, chatId int64) (err error)
- func (n *TelegramChats) List(ctx context.Context, limit, offset int, orderBy, sort string, ...) (list []TelegramChat, total int64, err error)
- type Template
- type TemplateTree
- type Templates
- func (n Templates) Create(ctx context.Context, tpl *Template) (err error)
- func (n Templates) Delete(ctx context.Context, name string) (err error)
- func (n Templates) GetByName(ctx context.Context, name, itemType string) (*Template, error)
- func (n Templates) GetItemsSortedList(ctx context.Context) (count int64, newItems []string, err error)
- func (n Templates) GetItemsTree(ctx context.Context) (tree []*TemplateTree, err error)
- func (n Templates) GetList(ctx context.Context, templateType string) ([]*Template, error)
- func (n *Templates) Search(ctx context.Context, query string, limit, offset int) (items []*Template, total int64, err error)
- func (n Templates) Update(ctx context.Context, m *Template) error
- func (n Templates) UpdateItemsTree(ctx context.Context, tree []*TemplateTree, parent string) error
- func (n Templates) UpdateOrCreate(ctx context.Context, tpl *Template) (err error)
- func (n Templates) UpdateStatus(ctx context.Context, m *Template) error
- type TransactionKey
- type Trigger
- type TriggerEntity
- type Triggers
- func (t Triggers) Add(ctx context.Context, trigger *Trigger) (id int64, err error)
- func (t Triggers) Delete(ctx context.Context, id int64) (err error)
- func (t Triggers) DeleteEntity(ctx context.Context, id int64) (err error)
- func (t Triggers) Disable(ctx context.Context, id int64) (err error)
- func (t Triggers) Enable(ctx context.Context, id int64) (err error)
- func (t Triggers) GetById(ctx context.Context, id int64) (trigger *Trigger, err error)
- func (t Triggers) List(ctx context.Context, limit, offset int, orderBy, sort string, onlyEnabled bool) (list []*Trigger, total int64, err error)
- func (t Triggers) ListPlain(ctx context.Context, limit, offset int, orderBy, sort string, onlyEnabled bool, ...) (list []*Trigger, total int64, err error)
- func (t Triggers) Search(ctx context.Context, query string, limit, offset int) (list []*Trigger, total int64, err error)
- func (t Triggers) Update(ctx context.Context, trigger *Trigger) (err error)
- type User
- type UserDevice
- type UserDevices
- func (d *UserDevices) Add(ctx context.Context, device *UserDevice) (id int64, err error)
- func (d *UserDevices) Delete(ctx context.Context, id int64) (err error)
- func (d *UserDevices) GetByUserId(ctx context.Context, id int64) (devices []*UserDevice, err error)
- func (d *UserDevices) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*UserDevice, total int64, err error)
- type UserMeta
- type UserMetas
- type Users
- func (u *Users) Add(ctx context.Context, user *User) (id int64, err error)
- func (u *Users) ClearResetPassToken(ctx context.Context, userId int64) (err error)
- func (u *Users) ClearToken(ctx context.Context, userId int64) (err error)
- func (u *Users) Delete(ctx context.Context, userId int64) (err error)
- func (u *Users) GetByAuthenticationToken(ctx context.Context, token string) (user *User, err error)
- func (u *Users) GetByEmail(ctx context.Context, email string) (user *User, err error)
- func (u *Users) GetById(ctx context.Context, userId int64) (user *User, err error)
- func (u *Users) GetByNickname(ctx context.Context, nickname string) (user *User, err error)
- func (u *Users) GetByResetPassToken(ctx context.Context, token string) (user *User, err error)
- func (n *Users) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*User, total int64, err error)
- func (u *Users) NewResetPassToken(ctx context.Context, userId int64, token string) (err error)
- func (u *Users) Update(ctx context.Context, user *User) (err error)
- func (u *Users) UpdateAuthenticationToken(ctx context.Context, userId int64, token string) (err error)
- type Variable
- type VariableTag
- type VariableTags
- type Variables
- func (n *Variables) CreateOrUpdate(ctx context.Context, v Variable) (err error)
- func (n Variables) Delete(ctx context.Context, name string) (err error)
- func (n Variables) DeleteTags(ctx context.Context, name string) (err error)
- func (n Variables) GetAllSystem(ctx context.Context) (list []Variable, err error)
- func (n Variables) GetByName(ctx context.Context, name string) (variable Variable, err error)
- func (n *Variables) List(ctx context.Context, options *adaptors.ListVariableOptions) (list []Variable, total int64, err error)
- func (s *Variables) Search(ctx context.Context, query string, limit, offset int) (list []Variable, total int64, err error)
- type Zigbee2mqtt
- type Zigbee2mqttDevice
- type Zigbee2mqttDevices
- func (z Zigbee2mqttDevices) Add(ctx context.Context, v *Zigbee2mqttDevice) (err error)
- func (z Zigbee2mqttDevices) Delete(ctx context.Context, id string) (err error)
- func (z Zigbee2mqttDevices) GetById(ctx context.Context, id string) (v *Zigbee2mqttDevice, err error)
- func (z *Zigbee2mqttDevices) List(ctx context.Context, limit, offset int) (list []*Zigbee2mqttDevice, total int64, err error)
- func (z *Zigbee2mqttDevices) ListByBridgeId(ctx context.Context, bridgeId int64, limit, offset int, orderBy, sort string) (list []*Zigbee2mqttDevice, total int64, err error)
- func (z *Zigbee2mqttDevices) Search(ctx context.Context, query string, limit, offset int) (list []*Zigbee2mqttDevice, total int64, err error)
- func (z Zigbee2mqttDevices) Update(ctx context.Context, m *Zigbee2mqttDevice) (err error)
- type Zigbee2mqtts
- func (z Zigbee2mqtts) Add(ctx context.Context, v *Zigbee2mqtt) (id int64, err error)
- func (z Zigbee2mqtts) Delete(ctx context.Context, id int64) (err error)
- func (z Zigbee2mqtts) GetById(ctx context.Context, id int64) (v *Zigbee2mqtt, err error)
- func (z *Zigbee2mqtts) GetByLogin(ctx context.Context, login string) (bridge *Zigbee2mqtt, err error)
- func (z *Zigbee2mqtts) List(ctx context.Context, limit, offset int) (list []*Zigbee2mqtt, total int64, err error)
- func (z Zigbee2mqtts) Update(ctx context.Context, m *Zigbee2mqtt) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { Id int64 `gorm:"primary_key"` Name string Script *Script ScriptId *int64 Entity *Entity EntityId *common.EntityId EntityActionName *string AreaId *int64 Area *Area Description string CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Action ...
type Actions ¶
type Actions struct {
*Common
}
Actions ...
func (*Actions) List ¶
func (t *Actions) List(ctx context.Context, limit, offset int, orderBy, sort string, ids *[]uint64) (list []*Action, total int64, err error)
List ...
type AlexaIntent ¶
type AlexaIntent struct { Name string `gorm:"primary_key"` AlexaSkill *AlexaSkill AlexaSkillId int64 Script *Script ScriptId int64 Description string CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
AlexaIntent ...
type AlexaIntents ¶
type AlexaIntents struct {
*Common
}
AlexaIntents ...
func (AlexaIntents) Add ¶
func (n AlexaIntents) Add(ctx context.Context, v *AlexaIntent) (err error)
Add ...
func (AlexaIntents) Delete ¶
func (n AlexaIntents) Delete(ctx context.Context, v *AlexaIntent) (err error)
Delete ...
func (AlexaIntents) GetByName ¶
func (n AlexaIntents) GetByName(ctx context.Context, name string) (intent *AlexaIntent, err error)
GetByName ...
func (AlexaIntents) Update ¶
func (n AlexaIntents) Update(ctx context.Context, v *AlexaIntent) (err error)
Update ...
type AlexaSkill ¶
type AlexaSkill struct { Id int64 `gorm:"primary_key"` SkillId string Description string Intents []*AlexaIntent `gorm:"foreignkey:AlexaSkillId"` Status pkgCommon.StatusType Script *Script ScriptId *int64 CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
AlexaSkill ...
type AlexaSkills ¶
type AlexaSkills struct {
*Common
}
AlexaSkills ...
func (AlexaSkills) Add ¶
func (n AlexaSkills) Add(ctx context.Context, v *AlexaSkill) (id int64, err error)
Add ...
func (AlexaSkills) Delete ¶
func (n AlexaSkills) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (AlexaSkills) GetById ¶
func (n AlexaSkills) GetById(ctx context.Context, id int64) (v *AlexaSkill, err error)
GetById ...
func (*AlexaSkills) List ¶
func (n *AlexaSkills) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*AlexaSkill, total int64, err error)
List ...
func (*AlexaSkills) ListEnabled ¶
func (n *AlexaSkills) ListEnabled(ctx context.Context, limit, offset int) (list []*AlexaSkill, err error)
ListEnabled ...
func (AlexaSkills) Update ¶
func (n AlexaSkills) Update(ctx context.Context, v *AlexaSkill) (err error)
Update ...
type Area ¶
type Area struct { Id int64 `gorm:"primary_key"` Name string Description string Polygon *Polygon Payload json.RawMessage `gorm:"type:jsonb;not null"` CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Area ...
type Areas ¶
type Areas struct {
*Common
}
Areas ...
func (*Areas) DeleteByName ¶
DeleteByName ...
func (*Areas) List ¶
func (n *Areas) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Area, total int64, err error)
List ...
type Automation ¶
type Automation struct {
*Common
}
Automation ...
func (*Automation) Statistic ¶
func (n *Automation) Statistic(ctx context.Context) (statistic *AutomationStatistic, err error)
Statistic ...
type AutomationStatistic ¶
type Condition ¶
type Condition struct { Id int64 `gorm:"primary_key"` Name string Script *Script ScriptId *int64 AreaId *int64 Area *Area Description string CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Condition ...
type Conditions ¶
type Conditions struct {
*Common
}
Conditions ...
func (Conditions) Delete ¶
func (t Conditions) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*Conditions) List ¶
func (t *Conditions) List(ctx context.Context, limit, offset int, orderBy, sort string, ids *[]uint64) (list []*Condition, total int64, err error)
List ...
type Dashboard ¶
type Dashboard struct { Id int64 `gorm:"primary_key"` Name string Description string Enabled bool AreaId *int64 Area *Area Tabs []*DashboardTab CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Dashboard ...
type DashboardCard ¶
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"` EntityId *pkgCommon.EntityId Hidden bool CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
DashboardCard ...
type DashboardCardItem ¶
type DashboardCardItem struct { Id int64 `gorm:"primary_key"` Title string Type string Weight int Enabled bool DashboardCardId int64 DashboardCard *DashboardCard EntityId *pkgCommon.EntityId Payload json.RawMessage `gorm:"type:jsonb;not null"` Hidden bool Frozen bool CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
DashboardCardItem ...
type DashboardCardItems ¶
type DashboardCardItems struct {
*Common
}
DashboardCardItems ...
func (DashboardCardItems) Add ¶
func (n DashboardCardItems) Add(ctx context.Context, item *DashboardCardItem) (id int64, err error)
Add ...
func (DashboardCardItems) Delete ¶
func (n DashboardCardItems) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (DashboardCardItems) GetById ¶
func (n DashboardCardItems) GetById(ctx context.Context, id int64) (item *DashboardCardItem, err error)
GetById ...
func (*DashboardCardItems) List ¶
func (n *DashboardCardItems) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*DashboardCardItem, total int64, err error)
List ...
func (DashboardCardItems) Update ¶
func (n DashboardCardItems) Update(ctx context.Context, m *DashboardCardItem) (err error)
Update ...
type DashboardCards ¶
type DashboardCards struct {
*Common
}
DashboardCards ...
func (DashboardCards) Add ¶
func (n DashboardCards) Add(ctx context.Context, card *DashboardCard) (id int64, err error)
Add ...
func (DashboardCards) Delete ¶
func (n DashboardCards) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (DashboardCards) GetById ¶
func (n DashboardCards) GetById(ctx context.Context, id int64) (card *DashboardCard, err error)
GetById ...
func (*DashboardCards) List ¶
func (n *DashboardCards) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*DashboardCard, total int64, err error)
List ...
func (DashboardCards) Update ¶
func (n DashboardCards) Update(ctx context.Context, m *DashboardCard) (err error)
Update ...
type DashboardTab ¶
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 Payload json.RawMessage `gorm:"type:jsonb;not null"` CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
DashboardTab ...
type DashboardTabs ¶
type DashboardTabs struct {
*Common
}
DashboardTabs ...
func (DashboardTabs) Add ¶
func (n DashboardTabs) Add(ctx context.Context, tab *DashboardTab) (id int64, err error)
Add ...
func (DashboardTabs) Delete ¶
func (n DashboardTabs) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (DashboardTabs) GetById ¶
func (n DashboardTabs) GetById(ctx context.Context, id int64) (tab *DashboardTab, err error)
GetById ...
func (*DashboardTabs) List ¶
func (n *DashboardTabs) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*DashboardTab, total int64, err error)
List ...
func (DashboardTabs) Update ¶
func (n DashboardTabs) Update(ctx context.Context, tab *DashboardTab) (err error)
Update ...
type Dashboards ¶
type Dashboards struct {
*Common
}
Dashboards ...
func (Dashboards) Delete ¶
func (n Dashboards) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*Dashboards) List ¶
func (n *Dashboards) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Dashboard, total int64, err error)
List ...
type Entities ¶
type Entities struct {
*Common
}
Entities ...
func (Entities) DeleteScripts ¶
DeleteScripts ...
func (Entities) DeleteTags ¶
DeleteTags ...
func (Entities) GetByIds ¶
func (n Entities) GetByIds(ctx context.Context, ids []pkgCommon.EntityId) (list []*Entity, err error)
GetByIds ...
func (Entities) GetByIdsSimple ¶
func (n Entities) GetByIdsSimple(ctx context.Context, ids []pkgCommon.EntityId) (list []*Entity, err error)
GetByIdsSimple ...
func (*Entities) GetByType ¶
func (n *Entities) GetByType(ctx context.Context, t string, limit, offset int) (list []*Entity, err error)
GetByType ...
func (*Entities) List ¶
func (n *Entities) List(ctx context.Context, limit, offset int, orderBy, sort string, autoLoad bool, query, plugin *string, areaId *int64) (list []*Entity, total int64, err error)
List ...
func (*Entities) ListPlain ¶
func (n *Entities) ListPlain(ctx context.Context, limit, offset int, orderBy, sort string, autoLoad bool, query, plugin *string, areaId *int64, tags *[]string) (list []*Entity, total int64, err error)
ListPlain ...
func (Entities) PreloadStorage ¶
PreloadStorage ...
func (*Entities) Search ¶
func (n *Entities) Search(ctx context.Context, query string, limit, offset int) (list []*Entity, total int64, err error)
Search ...
func (*Entities) Statistic ¶
func (n *Entities) Statistic(ctx context.Context) (statistic *EntitiesStatistic, err error)
Statistic ...
type EntitiesStatistic ¶
type Entity ¶
type Entity struct { Id pkgCommon.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;"` Tags []*Tag `gorm:"many2many:entity_tags;"` Icon *string Payload json.RawMessage `gorm:"type:jsonb;not null"` Settings json.RawMessage `gorm:"type:jsonb;not null"` Storage []*EntityStorage AutoLoad bool RestoreState bool ParentId *pkgCommon.EntityId `gorm:"column:parent_id"` CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Entity ...
type EntityAction ¶
type EntityAction struct { Id int64 `gorm:"primary_key"` Name string Description string Icon *string Entity *Entity EntityId pkgCommon.EntityId Image *Image ImageId *int64 Script *Script ScriptId *int64 Type string CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
EntityAction ...
type EntityActions ¶
type EntityActions struct {
*Common
}
EntityActions ...
func (EntityActions) Add ¶
func (n EntityActions) Add(ctx context.Context, v *EntityAction) (id int64, err error)
Add ...
func (*EntityActions) AddMultiple ¶
func (n *EntityActions) AddMultiple(ctx context.Context, actions []*EntityAction) (err error)
AddMultiple ...
func (EntityActions) DeleteByEntityId ¶
func (n EntityActions) DeleteByEntityId(ctx context.Context, deviceId pkgCommon.EntityId) (err error)
DeleteByEntityId ...
func (EntityActions) GetById ¶
func (n EntityActions) GetById(ctx context.Context, id int64) (v *EntityAction, err error)
GetById ...
func (*EntityActions) List ¶
func (n *EntityActions) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*EntityAction, total int64, err error)
List ...
func (EntityActions) Update ¶
func (n EntityActions) Update(ctx context.Context, m *EntityAction) (err error)
Update ...
type EntityMetric ¶
type EntityMetric struct { Entity *Entity EntityId string `gorm:"primary_key;auto_increment:false"` Metric *Metric MetricId int64 `gorm:"primary_key;auto_increment:false"` }
EntityMetric ...
type EntityScript ¶
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 ...
type EntityState ¶
type EntityState struct { Id int64 `gorm:"primary_key"` Name string Description string Icon *string Entity *Entity EntityId pkgCommon.EntityId Image *Image ImageId *int64 Style string CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
EntityState ...
type EntityStates ¶
type EntityStates struct {
*Common
}
EntityStates ...
func (EntityStates) Add ¶
func (n EntityStates) Add(ctx context.Context, v *EntityState) (id int64, err error)
Add ...
func (*EntityStates) AddMultiple ¶
func (n *EntityStates) AddMultiple(ctx context.Context, states []*EntityState) (err error)
AddMultiple ...
func (EntityStates) DeleteByEntityId ¶
func (n EntityStates) DeleteByEntityId(ctx context.Context, entityId pkgCommon.EntityId) (err error)
DeleteByEntityId ...
func (EntityStates) GetById ¶
func (n EntityStates) GetById(ctx context.Context, id int64) (v *EntityState, err error)
GetById ...
func (*EntityStates) List ¶
func (n *EntityStates) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*EntityState, total int64, err error)
List ...
func (EntityStates) Update ¶
func (n EntityStates) Update(ctx context.Context, m *EntityState) (err error)
Update ...
type EntityStorage ¶
type EntityStorage struct { Id int64 `gorm:"primary_key"` EntityId pkgCommon.EntityId State string Attributes json.RawMessage `gorm:"type:jsonb;not null"` CreatedAt time.Time `gorm:"<-:create"` }
EntityStorage ...
type EntityStorages ¶
type EntityStorages struct {
*Common
}
EntityStorages ...
func (*EntityStorages) Add ¶
func (n *EntityStorages) Add(ctx context.Context, v *EntityStorage) (id int64, err error)
Add ...
func (*EntityStorages) DeleteOldest ¶
func (n *EntityStorages) DeleteOldest(ctx context.Context, days int) (err error)
DeleteOldest ...
func (*EntityStorages) GetLastByEntityId ¶
func (n *EntityStorages) GetLastByEntityId(ctx context.Context, entityId pkgCommon.EntityId) (v *EntityStorage, err error)
GetLastByEntityId ...
func (*EntityStorages) GetLastThreeById ¶
func (n *EntityStorages) GetLastThreeById(ctx context.Context, entityId pkgCommon.EntityId, id int64) (list []*EntityStorage, err error)
GetLastThreeById ...
type EntityTag ¶
type EntityTag struct { EntityId string `gorm:"primary_key;auto_increment:false"` TagName string `gorm:"primary_key;auto_increment:false"` }
EntityTag ...
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 `gorm:"<-:create"` }
Image ...
type ImageFilterList ¶
ImageFilterList ...
type Images ¶
type Images struct {
*Common
}
Images ...
func (*Images) AddMultiple ¶
AddMultiple ...
func (*Images) GetAllByDate ¶
GetAllByDate ...
func (Images) GetByImageName ¶
GetByImageName ...
func (*Images) GetFilterList ¶
func (n *Images) GetFilterList(ctx context.Context) (images []*ImageFilterList, err error)
GetFilterList ...
type Log ¶
type Log struct { Id int64 `gorm:"primary_key"` Body string Level pkgCommon.LogLevel Owner string CreatedAt time.Time `gorm:"<-:create"` }
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 ¶
type Logs struct {
*Common
}
Logs ...
func (*Logs) AddMultiple ¶
AddMultiple ...
func (*Logs) DeleteOldest ¶
DeleteOldest ...
type Message ¶
type Message struct { Id int64 `gorm:"primary_key"` Type string Payload json.RawMessage `gorm:"type:jsonb;not null"` Statuses []*MessageDelivery CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Message ...
type MessageDeliveries ¶
type MessageDeliveries struct {
*Common
}
MessageDeliveries ...
func (*MessageDeliveries) Add ¶
func (n *MessageDeliveries) Add(ctx context.Context, msg *MessageDelivery) (id int64, err error)
Add ...
func (*MessageDeliveries) Delete ¶
func (n *MessageDeliveries) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*MessageDeliveries) GetAllUncompleted ¶
func (n *MessageDeliveries) GetAllUncompleted(ctx context.Context, limit, offset int) (list []*MessageDelivery, total int64, err error)
GetAllUncompleted ...
func (*MessageDeliveries) GetById ¶
func (n *MessageDeliveries) GetById(ctx context.Context, id int64) (msg *MessageDelivery, err error)
GetById ...
func (*MessageDeliveries) List ¶
func (n *MessageDeliveries) List(ctx context.Context, limit, offset int, orderBy, sort string, queryObj *MessageDeliveryQuery) (list []*MessageDelivery, total int64, err error)
func (*MessageDeliveries) SetStatus ¶
func (n *MessageDeliveries) SetStatus(ctx context.Context, msg *MessageDelivery) (err error)
SetStatus ...
type MessageDelivery ¶
type MessageDelivery struct { Id int64 `gorm:"primary_key"` Message *Message MessageId int64 Address string EntityId *pkgCommon.EntityId Status string ErrorMessageStatus *string `gorm:"column:error_system_code"` ErrorMessageBody *string `gorm:"column:error_system_message"` CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
MessageDelivery ...
type MessageDeliveryQuery ¶
type MessageDeliveryQuery struct { StartDate *time.Time `json:"start_date"` EndDate *time.Time `json:"end_date"` Types []string `json:"triggers"` }
MessageDeliveryQuery ...
type Metric ¶
type Metric struct { Id int64 `gorm:"primary_key"` Data []*MetricBucket Name string Description string Options json.RawMessage `gorm:"type:jsonb;not null"` Type pkgCommon.MetricType UpdatedAt time.Time CreatedAt time.Time `gorm:"<-:create"` }
Metric ...
type MetricBucket ¶
type MetricBucket struct { Value json.RawMessage `gorm:"type:jsonb;not null"` Metric *Metric Mins time.Time `gorm:"->"` MetricId int64 Time time.Time }
MetricBucket ...
type MetricBuckets ¶
MetricBuckets ...
func (MetricBuckets) Add ¶
func (n MetricBuckets) Add(ctx context.Context, metric *MetricBucket) (err error)
Add ...
func (*MetricBuckets) AddMultiple ¶
func (n *MetricBuckets) AddMultiple(ctx context.Context, buckets []*MetricBucket) (err error)
AddMultiple ...
func (MetricBuckets) DeleteById ¶
func (n MetricBuckets) DeleteById(ctx context.Context, id int64) (err error)
DeleteById ...
func (MetricBuckets) DeleteByMetricId ¶
func (n MetricBuckets) DeleteByMetricId(ctx context.Context, metricId int64) (err error)
DeleteByMetricId ...
func (*MetricBuckets) DeleteOldest ¶
func (n *MetricBuckets) DeleteOldest(ctx context.Context, days int) (err error)
DeleteOldest ...
func (*MetricBuckets) List ¶
func (n *MetricBuckets) List(ctx context.Context, metricId int64, optionItems []string, rFrom, rTo *time.Time, metricRange *pkgCommon.MetricRange) (list []*MetricBucket, err error)
List ...
type Metrics ¶
type Metrics struct {
*Common
}
Metrics ...
func (*Metrics) AddMultiple ¶
AddMultiple ...
func (*Metrics) List ¶
func (n *Metrics) List(ctx context.Context, limit, offset int, 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 ¶
type Permissions struct {
*Common
}
Permissions ...
func (Permissions) Add ¶
func (n Permissions) Add(ctx context.Context, permission *Permission) (id int64, err error)
Add ...
func (Permissions) Delete ¶
func (n Permissions) Delete(ctx context.Context, roleName, packageName string, levelName []string) (err error)
Delete ...
func (Permissions) GetAllPermissions ¶
func (n Permissions) GetAllPermissions(ctx context.Context, name string) (permissions []*Permission, err error)
GetAllPermissions ...
type Plugin ¶
type Plugin struct { Name string `gorm:"primary_key"` Version string Enabled bool System bool Actor bool Triggers bool External bool Settings json.RawMessage `gorm:"type:jsonb;not null"` }
Plugin ...
type Plugins ¶
type Plugins struct {
*Common
}
Plugins ...
func (Plugins) CreateOrUpdate ¶
CreateOrUpdate ...
func (Plugins) List ¶
func (n Plugins) List(ctx context.Context, limit, offset int, orderBy, sort string, enabled, triggers *bool) (list []*Plugin, total int64, err error)
List ...
type Polygon ¶
type Polygon struct {
Points []Point
}
func (Polygon) GormDataType ¶
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 `gorm:"<-:create"` UpdatedAt time.Time }
Role ...
type Roles ¶
type Roles struct {
*Common
}
Roles ...
func (*Roles) List ¶
func (n *Roles) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*Role, total int64, err error)
List ...
type RunHistory ¶
type RunHistory struct {
*Common
}
RunHistory ...
func (*RunHistory) DeleteOldest ¶
func (n *RunHistory) DeleteOldest(ctx context.Context, days int) (err error)
DeleteOldest ...
type Script ¶
type Script struct { ScriptInfo Id int64 `gorm:"primary_key"` Lang ScriptLang Name string Source string Description string Compiled string Versions []*ScriptVersion CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Script ...
type ScriptInfo ¶
type ScriptVersion ¶
type ScriptVersion struct { Id int64 `gorm:"primary_key"` Lang ScriptLang Source string ScriptId int64 Sum []byte CreatedAt time.Time `gorm:"<-:create"` }
ScriptVersion ...
type Scripts ¶
type Scripts struct {
*Common
}
Scripts ...
func (*Scripts) List ¶
func (n *Scripts) List(ctx context.Context, limit, offset int, orderBy, sort string, query *string, ids *[]uint64) (list []*Script, total int64, err error)
List ...
func (*Scripts) Search ¶
func (n *Scripts) Search(ctx context.Context, query string, limit, offset int) (list []*Script, total int64, err error)
Search ...
type ScriptsStatistic ¶
type Tags ¶
type Tags struct {
*Common
}
Tags ...
func (*Tags) List ¶
func (n *Tags) List(ctx context.Context, limit, offset int, orderBy, sort string, query *string, names *[]string) (list []*Tag, total int64, err error)
List ...
type Task ¶
type Task struct { Id int64 `gorm:"primary_key"` Name string Description string Enabled bool Condition pkgCommon.ConditionType Conditions []*Condition `gorm:"many2many:task_conditions;"` Actions []*Action `gorm:"many2many:task_actions;"` Triggers []*Trigger `gorm:"many2many:task_triggers;"` AreaId *int64 Area *Area CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Task ...
type TaskAction ¶
type TaskAction struct { Task *Task TaskId string `gorm:"primary_key;auto_increment:false"` Action *Action ActionId int64 `gorm:"primary_key;auto_increment:false"` }
TaskAction ...
type TaskCondition ¶
type TaskCondition struct { Task *Task TaskId string `gorm:"primary_key;auto_increment:false"` Condition *Condition ConditionId int64 `gorm:"primary_key;auto_increment:false"` }
TaskCondition ...
type TaskTrigger ¶
type TaskTrigger struct { Task *Task TaskId string `gorm:"primary_key;auto_increment:false"` Trigger *Trigger TriggerId int64 `gorm:"primary_key;auto_increment:false"` }
TaskTrigger ...
type Tasks ¶
type Tasks struct {
*Common
}
Tasks ...
func (Tasks) DeleteAction ¶
DeleteAction ...
func (Tasks) DeleteCondition ¶
DeleteCondition ...
func (Tasks) DeleteTrigger ¶
DeleteTrigger ...
func (Tasks) List ¶
func (n Tasks) List(ctx context.Context, limit, offset int, orderBy, sort string, onlyEnabled bool) (list []*Task, total int64, err error)
List ...
type TelegramChat ¶
type TelegramChat struct { EntityId pkgCommon.EntityId ChatId int64 Username string CreatedAt time.Time `gorm:"<-:create"` }
TelegramChat ...
type TelegramChats ¶
type TelegramChats struct {
*Common
}
TelegramChats ...
func (TelegramChats) Add ¶
func (n TelegramChats) Add(ctx context.Context, ch TelegramChat) (err error)
Add ...
type Template ¶
type Template struct { Name string `gorm:"primary_key"` Description string Content string Status string Type string ParentName *string `gorm:"column:parent"` CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Template ...
type TemplateTree ¶
type TemplateTree struct { Name string `json:"name"` Description string `json:"description"` Status string `json:"status"` Nodes []*TemplateTree `json:"nodes"` }
TemplateTree ...
type Templates ¶
type Templates struct {
*Common
}
Templates ...
func (Templates) GetItemsSortedList ¶
func (n Templates) GetItemsSortedList(ctx context.Context) (count int64, newItems []string, err error)
GetItemsSortedList ...
func (Templates) GetItemsTree ¶
func (n Templates) GetItemsTree(ctx context.Context) (tree []*TemplateTree, err error)
GetItemsTree ...
func (*Templates) Search ¶
func (n *Templates) Search(ctx context.Context, query string, limit, offset int) (items []*Template, total int64, err error)
Search ...
func (Templates) UpdateItemsTree ¶
UpdateItemsTree ...
func (Templates) UpdateOrCreate ¶
UpdateOrCreate ...
type TransactionKey ¶
type TransactionKey string
const GormTransaction TransactionKey = "gorm_transaction"
type Trigger ¶
type Trigger struct { Id int64 `gorm:"primary_key"` Name string Entities []*Entity `gorm:"many2many:trigger_entities;"` Script *Script ScriptId *int64 PluginName string Payload string Enabled bool AreaId *int64 Area *Area Description string CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Trigger ...
type TriggerEntity ¶
type TriggerEntity struct { Trigger *Trigger TriggerId int64 `gorm:"primary_key;auto_increment:false"` Entity *Entity EntityId string `gorm:"primary_key;auto_increment:false"` }
TriggerEntity ...
type Triggers ¶
type Triggers struct {
*Common
}
Triggers ...
func (Triggers) DeleteEntity ¶
DeleteEntity ...
func (Triggers) List ¶
func (t Triggers) List(ctx context.Context, limit, offset int, orderBy, sort string, onlyEnabled bool) (list []*Trigger, total int64, err error)
List ...
func (Triggers) ListPlain ¶
func (t Triggers) ListPlain(ctx context.Context, limit, offset int, orderBy, sort string, onlyEnabled bool, ids *[]uint64) (list []*Trigger, total int64, err error)
ListPlain ...
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 `gorm:"foreignKey:UserId;constraint:OnUpdate:CASCADE;"` Devices []*UserDevice ResetPasswordSentAt *time.Time CurrentSignInAt *time.Time LastSignInAt *time.Time CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time DeletedAt *time.Time History json.RawMessage `gorm:"type:jsonb;not null"` }
User ...
type UserDevice ¶
type UserDevice struct { Id int64 `gorm:"primary_key"` UserId int64 PushRegistration json.RawMessage `gorm:"type:jsonb;not null"` CreatedAt time.Time `gorm:"<-:create"` }
UserDevice ...
type UserDevices ¶
type UserDevices struct {
*Common
}
UserDevices ...
func (*UserDevices) Add ¶
func (d *UserDevices) Add(ctx context.Context, device *UserDevice) (id int64, err error)
Add ...
func (*UserDevices) Delete ¶
func (d *UserDevices) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (*UserDevices) GetByUserId ¶
func (d *UserDevices) GetByUserId(ctx context.Context, id int64) (devices []*UserDevice, err error)
GetByUserId ...
func (*UserDevices) List ¶
func (d *UserDevices) List(ctx context.Context, limit, offset int, orderBy, sort string) (list []*UserDevice, total int64, err error)
List ...
type Users ¶
type Users struct {
*Common
}
Users ...
func (*Users) ClearResetPassToken ¶
ClearResetPassToken ...
func (*Users) ClearToken ¶
ClearToken ...
func (*Users) GetByAuthenticationToken ¶
GetByAuthenticationToken ...
func (*Users) GetByEmail ¶
GetByEmail ...
func (*Users) GetByNickname ¶
GetByNickname ...
func (*Users) GetByResetPassToken ¶
GetByResetPassToken ...
func (*Users) List ¶
func (n *Users) List(ctx context.Context, limit, offset int, 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 *pkgCommon.EntityId Tags []*Tag `gorm:"many2many:variable_tags;"` CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Variable ...
type VariableTag ¶
type VariableTag struct { VariableName string `gorm:"primary_key;auto_increment:false"` TagName string `gorm:"primary_key;auto_increment:false"` }
VariableTag ...
type Variables ¶
type Variables struct {
*Common
}
Variables ...
func (*Variables) CreateOrUpdate ¶
CreateOrUpdate ...
func (Variables) DeleteTags ¶
DeleteTags ...
func (Variables) GetAllSystem ¶
GetAllSystem ...
type Zigbee2mqtt ¶
type Zigbee2mqtt struct { Id int64 `gorm:"primary_key"` Name string Login string Devices []*Zigbee2mqttDevice EncryptedPassword string PermitJoin bool BaseTopic string CreatedAt time.Time `gorm:"<-:create"` UpdatedAt time.Time }
Zigbee2mqtt ...
type Zigbee2mqttDevice ¶
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 `gorm:"<-:create"` UpdatedAt time.Time }
Zigbee2mqttDevice ...
type Zigbee2mqttDevices ¶
type Zigbee2mqttDevices struct {
*Common
}
Zigbee2mqttDevices ...
func (Zigbee2mqttDevices) Add ¶
func (z Zigbee2mqttDevices) Add(ctx context.Context, v *Zigbee2mqttDevice) (err error)
Add ...
func (Zigbee2mqttDevices) Delete ¶
func (z Zigbee2mqttDevices) Delete(ctx context.Context, id string) (err error)
Delete ...
func (Zigbee2mqttDevices) GetById ¶
func (z Zigbee2mqttDevices) GetById(ctx context.Context, id string) (v *Zigbee2mqttDevice, err error)
GetById ...
func (*Zigbee2mqttDevices) List ¶
func (z *Zigbee2mqttDevices) List(ctx context.Context, limit, offset int) (list []*Zigbee2mqttDevice, total int64, err error)
List ...
func (*Zigbee2mqttDevices) ListByBridgeId ¶
func (z *Zigbee2mqttDevices) ListByBridgeId(ctx context.Context, bridgeId int64, limit, offset int, orderBy, sort string) (list []*Zigbee2mqttDevice, total int64, err error)
ListByBridgeId ...
func (*Zigbee2mqttDevices) Search ¶
func (z *Zigbee2mqttDevices) Search(ctx context.Context, query string, limit, offset int) (list []*Zigbee2mqttDevice, total int64, err error)
Search ...
func (Zigbee2mqttDevices) Update ¶
func (z Zigbee2mqttDevices) Update(ctx context.Context, m *Zigbee2mqttDevice) (err error)
Update ...
type Zigbee2mqtts ¶
type Zigbee2mqtts struct {
*Common
}
Zigbee2mqtts ...
func (Zigbee2mqtts) Add ¶
func (z Zigbee2mqtts) Add(ctx context.Context, v *Zigbee2mqtt) (id int64, err error)
Add ...
func (Zigbee2mqtts) Delete ¶
func (z Zigbee2mqtts) Delete(ctx context.Context, id int64) (err error)
Delete ...
func (Zigbee2mqtts) GetById ¶
func (z Zigbee2mqtts) GetById(ctx context.Context, id int64) (v *Zigbee2mqtt, err error)
GetById ...
func (*Zigbee2mqtts) GetByLogin ¶
func (z *Zigbee2mqtts) GetByLogin(ctx context.Context, login string) (bridge *Zigbee2mqtt, err error)
GetByLogin ...
func (*Zigbee2mqtts) List ¶
func (z *Zigbee2mqtts) List(ctx context.Context, limit, offset int) (list []*Zigbee2mqtt, total int64, err error)
List ...
func (Zigbee2mqtts) Update ¶
func (z Zigbee2mqtts) Update(ctx context.Context, m *Zigbee2mqtt) (err error)
Update ...
Source Files ¶
- action.go
- alexa_intent.go
- alexa_skill.go
- area.go
- automation.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
- entity_tag.go
- image.go
- log.go
- message.go
- message_delivery.go
- metric.go
- metric_bucket.go
- permission.go
- plugin.go
- polygon.go
- role.go
- run_history.go
- script.go
- script_version.go
- tag.go
- task.go
- task_action.go
- task_condition.go
- task_trigger.go
- telegram_chat.go
- template.go
- trigger.go
- trigger_entity.go
- user.go
- user_device.go
- usermeta.go
- variable.go
- variable_tag.go
- zigbee2mqtt.go
- zigbee2mqtt_device.go