adaptors

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

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 {
	IAction
	// contains filtered or unexported fields
}

Action ...

func (*Action) AddMultiple added in v0.5.0

func (n *Action) AddMultiple(items []*m.Action) (err error)

AddMultiple ...

func (*Action) DeleteByTaskId added in v0.5.0

func (n *Action) DeleteByTaskId(id int64) (err error)

DeleteByTaskId ...

type Adaptors

type Adaptors struct {
	Script            IScript
	Role              IRole
	Permission        IPermission
	User              IUser
	UserMeta          IUserMeta
	Image             IImage
	Variable          IVariable
	Entity            IEntity
	EntityState       IEntityState
	EntityAction      IEntityAction
	EntityStorage     IEntityStorage
	Log               ILog
	Template          ITemplate
	Message           IMessage
	MessageDelivery   IMessageDelivery
	Zigbee2mqtt       IZigbee2mqtt
	Zigbee2mqttDevice IZigbee2mqttDevice
	AlexaSkill        IAlexaSkill
	AlexaIntent       IAlexaIntent
	Metric            IMetric
	MetricBucket      IMetricBucket
	Area              IArea
	Action            IAction
	Condition         ICondition
	Trigger           ITrigger
	Task              ITask
	RunHistory        IRunHistory
	Plugin            IPlugin
	TelegramChat      ITelegramChat
	Dashboard         IDashboard
	DashboardTab      IDashboardTab
	DashboardCard     IDashboardCard
	DashboardCardItem IDashboardCardItem
	// contains filtered or unexported fields
}

Adaptors ...

func NewAdaptors

func NewAdaptors(lc fx.Lifecycle,
	db *gorm.DB,
	cfg *models.AppConfig,
	migrations *migrations.Migrations,
	orm *orm.Orm) (adaptors *Adaptors)

NewAdaptors ...

func (Adaptors) Begin added in v0.1.0

func (a Adaptors) Begin() (adaptors *Adaptors)

Begin ...

func (*Adaptors) Commit added in v0.1.0

func (a *Adaptors) Commit() error

Commit ...

func (*Adaptors) Rollback added in v0.1.0

func (a *Adaptors) Rollback() error

Rollback ...

type AlexaIntent added in v0.3.0

type AlexaIntent struct {
	IAlexaIntent
	// contains filtered or unexported fields
}

AlexaIntent ...

func (*AlexaIntent) Add added in v0.3.0

func (n *AlexaIntent) Add(ver *m.AlexaIntent) error

Add ...

func (*AlexaIntent) Delete added in v0.3.0

func (n *AlexaIntent) Delete(ver *m.AlexaIntent) (err error)

Delete ...

func (*AlexaIntent) GetByName added in v0.3.0

func (n *AlexaIntent) GetByName(name string) (ver *m.AlexaIntent, err error)

GetByName ...

func (*AlexaIntent) Update added in v0.3.0

func (n *AlexaIntent) Update(ver *m.AlexaIntent) (err error)

Update ...

type AlexaSkill added in v0.3.0

type AlexaSkill struct {
	IAlexaSkill
	// contains filtered or unexported fields
}

AlexaSkill ...

func (*AlexaSkill) Add added in v0.3.0

func (n *AlexaSkill) Add(app *m.AlexaSkill) (id int64, err error)

Add ...

func (*AlexaSkill) Delete added in v0.3.0

func (n *AlexaSkill) Delete(appId int64) (err error)

Delete ...

func (*AlexaSkill) GetById added in v0.3.0

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

GetById ...

func (*AlexaSkill) List added in v0.3.0

func (n *AlexaSkill) List(limit, offset int64, orderBy, sort string) (list []*m.AlexaSkill, total int64, err error)

List ...

func (*AlexaSkill) ListEnabled added in v0.3.0

func (n *AlexaSkill) ListEnabled(limit, offset int64) (list []*m.AlexaSkill, err error)

ListEnabled ...

func (*AlexaSkill) Update added in v0.3.0

func (n *AlexaSkill) Update(params *m.AlexaSkill) (err error)

Update ...

type Area added in v0.5.0

type Area struct {
	IArea
	// contains filtered or unexported fields
}

Area ...

func (*Area) Add added in v0.5.0

func (n *Area) Add(ver *m.Area) (id int64, err error)

Add ...

func (*Area) DeleteByName added in v0.5.0

func (n *Area) DeleteByName(name string) (err error)

DeleteByName ...

func (*Area) GetById added in v0.5.0

func (n *Area) GetById(verId int64) (ver *m.Area, err error)

GetById ...

func (*Area) GetByName added in v0.5.0

func (a *Area) GetByName(name string) (ver *m.Area, err error)

GetByName ...

func (*Area) List added in v0.5.0

func (n *Area) List(limit, offset int64, orderBy, sort string) (list []*m.Area, total int64, err error)

List ...

func (*Area) Search added in v0.5.0

func (n *Area) Search(query string, limit, offset int64) (list []*m.Area, total int64, err error)

Search ...

func (*Area) Update added in v0.5.0

func (n *Area) Update(ver *m.Area) (err error)

Update ...

type Condition added in v0.5.0

type Condition struct {
	ICondition
	// contains filtered or unexported fields
}

Condition ...

func (*Condition) AddMultiple added in v0.5.0

func (n *Condition) AddMultiple(items []*m.Condition) (err error)

AddMultiple ...

func (*Condition) DeleteByTaskId added in v0.5.0

func (n *Condition) DeleteByTaskId(id int64) (err error)

DeleteByTaskId ...

type Dashboard added in v0.6.0

type Dashboard struct {
	IDashboard
	// contains filtered or unexported fields
}

Dashboard ...

func (*Dashboard) Add added in v0.6.0

func (n *Dashboard) Add(ver *m.Dashboard) (id int64, err error)

Add ...

func (*Dashboard) Delete added in v0.6.0

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

Delete ...

func (*Dashboard) GetById added in v0.6.0

func (n *Dashboard) GetById(mapId int64) (ver *m.Dashboard, err error)

GetById ...

func (*Dashboard) Import added in v0.6.0

func (n *Dashboard) Import(ver *m.Dashboard) (boardId int64, err error)

Import ...

func (*Dashboard) List added in v0.6.0

func (n *Dashboard) List(limit, offset int64, orderBy, sort string) (list []*m.Dashboard, total int64, err error)

List ...

func (*Dashboard) Search added in v0.7.0

func (n *Dashboard) Search(query string, limit, offset int64) (list []*m.Dashboard, total int64, err error)

Search ...

func (*Dashboard) Update added in v0.6.0

func (n *Dashboard) Update(ver *m.Dashboard) (err error)

Update ...

type DashboardCard added in v0.6.0

type DashboardCard struct {
	IDashboardCard
	// contains filtered or unexported fields
}

DashboardCard ...

func (*DashboardCard) Add added in v0.6.0

func (n *DashboardCard) Add(ver *m.DashboardCard) (id int64, err error)

Add ...

func (*DashboardCard) Delete added in v0.6.0

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

Delete ...

func (*DashboardCard) GetById added in v0.6.0

func (n *DashboardCard) GetById(mapId int64) (ver *m.DashboardCard, err error)

GetById ...

func (*DashboardCard) Import added in v0.6.0

func (n *DashboardCard) Import(card *m.DashboardCard) (cardId int64, err error)

Import ...

func (*DashboardCard) List added in v0.6.0

func (n *DashboardCard) List(limit, offset int64, orderBy, sort string) (list []*m.DashboardCard, total int64, err error)

List ...

func (*DashboardCard) Update added in v0.6.0

func (n *DashboardCard) Update(ver *m.DashboardCard) (err error)

Update ...

type DashboardCardItem added in v0.6.0

type DashboardCardItem struct {
	IDashboardCardItem
	// contains filtered or unexported fields
}

DashboardCardItem ...

func (*DashboardCardItem) Add added in v0.6.0

func (n *DashboardCardItem) Add(ver *m.DashboardCardItem) (id int64, err error)

Add ...

func (*DashboardCardItem) Delete added in v0.6.0

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

Delete ...

func (*DashboardCardItem) GetById added in v0.6.0

func (n *DashboardCardItem) GetById(mapId int64) (ver *m.DashboardCardItem, err error)

GetById ...

func (*DashboardCardItem) List added in v0.6.0

func (n *DashboardCardItem) List(limit, offset int64, orderBy, sort string) (list []*m.DashboardCardItem, total int64, err error)

List ...

func (*DashboardCardItem) Update added in v0.6.0

func (n *DashboardCardItem) Update(ver *m.DashboardCardItem) (err error)

Update ...

type DashboardTab added in v0.6.0

type DashboardTab struct {
	IDashboardTab
	// contains filtered or unexported fields
}

DashboardTab ...

func (*DashboardTab) Add added in v0.6.0

func (n *DashboardTab) Add(ver *m.DashboardTab) (id int64, err error)

Add ...

func (*DashboardTab) Delete added in v0.6.0

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

Delete ...

func (*DashboardTab) GetById added in v0.6.0

func (n *DashboardTab) GetById(mapId int64) (ver *m.DashboardTab, err error)

GetById ...

func (*DashboardTab) List added in v0.6.0

func (n *DashboardTab) List(limit, offset int64, orderBy, sort string) (list []*m.DashboardTab, total int64, err error)

List ...

func (*DashboardTab) Update added in v0.6.0

func (n *DashboardTab) Update(ver *m.DashboardTab) (err error)

Update ...

type Entity added in v0.5.0

type Entity struct {
	IEntity
	// contains filtered or unexported fields
}

Entity ...

func (*Entity) Add added in v0.5.0

func (n *Entity) Add(ver *m.Entity) (err error)

Add ...

func (*Entity) AppendMetric added in v0.5.0

func (n *Entity) AppendMetric(entityId common.EntityId, metric *m.Metric) (err error)

AppendMetric ...

func (*Entity) Delete added in v0.5.0

func (n *Entity) Delete(id common.EntityId) (err error)

Delete ...

func (*Entity) DeleteMetric added in v0.5.0

func (n *Entity) DeleteMetric(entityId common.EntityId, metric *m.Metric) (err error)

DeleteMetric ...

func (*Entity) GetById added in v0.5.0

func (n *Entity) GetById(id common.EntityId) (ver *m.Entity, err error)

GetById ...

func (*Entity) GetByIds added in v0.6.0

func (n *Entity) GetByIds(ids []common.EntityId) (list []*m.Entity, err error)

GetByIds ...

func (*Entity) GetByType added in v0.5.0

func (n *Entity) GetByType(t string, limit, offset int64) (list []*m.Entity, err error)

GetByType ...

func (*Entity) Import added in v0.7.2

func (n *Entity) Import(ver *m.Entity) (err error)

Import ...

func (*Entity) List added in v0.5.0

func (n *Entity) List(limit, offset int64, orderBy, sort string, autoLoad bool) (list []*m.Entity, total int64, err error)

List ...

func (*Entity) Search added in v0.5.0

func (n *Entity) Search(query string, limit, offset int64) (list []*m.Entity, total int64, err error)

Search ...

func (*Entity) Update added in v0.5.0

func (n *Entity) Update(ver *m.Entity) (err error)

Update ...

func (*Entity) UpdateSettings added in v0.5.0

func (n *Entity) UpdateSettings(entity common.EntityId, settings m.Attributes) (err error)

UpdateSettings ...

type EntityAction added in v0.5.0

type EntityAction struct {
	IEntityAction
	// contains filtered or unexported fields
}

EntityAction ...

func (*EntityAction) Add added in v0.5.0

func (n *EntityAction) Add(ver *m.EntityAction) (id int64, err error)

Add ...

func (*EntityAction) AddMultiple added in v0.5.0

func (n *EntityAction) AddMultiple(items []*m.EntityAction) (err error)

AddMultiple ...

func (*EntityAction) DeleteByEntityId added in v0.5.0

func (n *EntityAction) DeleteByEntityId(id common.EntityId) (err error)

DeleteByEntityId ...

type EntityState added in v0.5.0

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

EntityState ...

func (*EntityState) Add added in v0.5.0

func (n *EntityState) Add(ver *m.EntityState) (id int64, err error)

Add ...

func (*EntityState) AddMultiple added in v0.5.0

func (n *EntityState) AddMultiple(items []*m.EntityState) (err error)

AddMultiple ...

func (*EntityState) DeleteByEntityId added in v0.5.0

func (n *EntityState) DeleteByEntityId(entityId common.EntityId) (err error)

DeleteByEntityId ...

type EntityStorage added in v0.5.0

type EntityStorage struct {
	IEntityStorage
	// contains filtered or unexported fields
}

EntityStorage ...

func (*EntityStorage) Add added in v0.5.0

func (n *EntityStorage) Add(ver *m.EntityStorage) (id int64, err error)

Add ...

func (*EntityStorage) DeleteOldest added in v0.9.4

func (n *EntityStorage) DeleteOldest(days int) (err error)

DeleteOldest ...

func (*EntityStorage) GetLastByEntityId added in v0.5.0

func (n *EntityStorage) GetLastByEntityId(entityId common.EntityId) (ver *m.EntityStorage, err error)

GetLastByEntityId ...

func (*EntityStorage) List added in v0.5.0

func (n *EntityStorage) List(limit, offset int64, orderBy, sort string) (list []*m.EntityStorage, total int64, err error)

List ...

func (*EntityStorage) ListByEntityId added in v0.6.0

func (n *EntityStorage) ListByEntityId(limit, offset int64, orderBy, sort string, entityId common.EntityId, startDate, endDate *time.Time) (list []*m.EntityStorage, total int64, err error)

ListByEntityId ...

type IAction added in v0.5.0

type IAction interface {
	DeleteByTaskId(id int64) (err error)
	AddMultiple(items []*m.Action) (err error)
	// contains filtered or unexported methods
}

IAction ...

func GetActionAdaptor added in v0.5.0

func GetActionAdaptor(d *gorm.DB) IAction

GetActionAdaptor ...

type IAlexaIntent added in v0.5.0

type IAlexaIntent interface {
	Add(ver *m.AlexaIntent) (err error)
	GetByName(name string) (ver *m.AlexaIntent, err error)
	Update(ver *m.AlexaIntent) (err error)
	Delete(ver *m.AlexaIntent) (err error)
	// contains filtered or unexported methods
}

IAlexaIntent ...

func GetAlexaIntentAdaptor added in v0.3.0

func GetAlexaIntentAdaptor(d *gorm.DB) IAlexaIntent

GetAlexaIntentAdaptor ...

type IAlexaSkill added in v0.5.0

type IAlexaSkill interface {
	Add(app *m.AlexaSkill) (id int64, err error)
	GetById(appId int64) (app *m.AlexaSkill, err error)
	Update(params *m.AlexaSkill) (err error)
	Delete(appId int64) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.AlexaSkill, total int64, err error)
	ListEnabled(limit, offset int64) (list []*m.AlexaSkill, err error)
	// contains filtered or unexported methods
}

IAlexaSkill ...

func GetAlexaSkillAdaptor added in v0.3.0

func GetAlexaSkillAdaptor(d *gorm.DB) IAlexaSkill

GetAlexaSkillAdaptor ...

type IArea added in v0.5.0

type IArea interface {
	Add(ver *m.Area) (id int64, err error)
	GetById(verId int64) (ver *m.Area, err error)
	GetByName(name string) (ver *m.Area, err error)
	Update(ver *m.Area) (err error)
	DeleteByName(name string) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.Area, total int64, err error)
	Search(query string, limit, offset int64) (list []*m.Area, total int64, err error)
	// contains filtered or unexported methods
}

IArea ...

func GetAreaAdaptor added in v0.5.0

func GetAreaAdaptor(d *gorm.DB) IArea

GetAreaAdaptor ...

type ICondition added in v0.5.0

type ICondition interface {
	DeleteByTaskId(id int64) (err error)
	AddMultiple(items []*m.Condition) (err error)
	// contains filtered or unexported methods
}

ICondition ...

func GetConditionAdaptor added in v0.5.0

func GetConditionAdaptor(d *gorm.DB) ICondition

GetConditionAdaptor ...

type IDashboard added in v0.6.0

type IDashboard interface {
	Add(ver *m.Dashboard) (id int64, err error)
	GetById(mapId int64) (ver *m.Dashboard, err error)
	Update(ver *m.Dashboard) (err error)
	Import(*m.Dashboard) (int64, error)
	Delete(id int64) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.Dashboard, total int64, err error)
	Search(query string, limit, offset int64) (list []*m.Dashboard, total int64, err error)
}

func GetDashboardAdaptor added in v0.6.0

func GetDashboardAdaptor(d *gorm.DB) IDashboard

GetDashboardAdaptor ...

type IDashboardCard added in v0.6.0

type IDashboardCard interface {
	Add(ver *m.DashboardCard) (id int64, err error)
	GetById(mapId int64) (ver *m.DashboardCard, err error)
	Update(ver *m.DashboardCard) (err error)
	Delete(id int64) (err error)
	Import(card *m.DashboardCard) (cardId int64, err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.DashboardCard, total int64, err error)
	// contains filtered or unexported methods
}

func GetDashboardCardAdaptor added in v0.6.0

func GetDashboardCardAdaptor(d *gorm.DB) IDashboardCard

GetDashboardCardAdaptor ...

type IDashboardCardItem added in v0.6.0

type IDashboardCardItem interface {
	Add(ver *m.DashboardCardItem) (id int64, err error)
	GetById(mapId int64) (ver *m.DashboardCardItem, err error)
	Update(ver *m.DashboardCardItem) (err error)
	Delete(id int64) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.DashboardCardItem, total int64, err error)
	// contains filtered or unexported methods
}

func GetDashboardCardItemAdaptor added in v0.6.0

func GetDashboardCardItemAdaptor(d *gorm.DB) IDashboardCardItem

GetDashboardCardItemAdaptor ...

type IDashboardTab added in v0.6.0

type IDashboardTab interface {
	Add(ver *m.DashboardTab) (id int64, err error)
	GetById(mapId int64) (ver *m.DashboardTab, err error)
	Update(ver *m.DashboardTab) (err error)
	Delete(id int64) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.DashboardTab, total int64, err error)
	// contains filtered or unexported methods
}

func GetDashboardTabAdaptor added in v0.6.0

func GetDashboardTabAdaptor(d *gorm.DB) IDashboardTab

GetDashboardTabAdaptor ...

type IEntity added in v0.5.0

type IEntity interface {
	Add(ver *m.Entity) (err error)
	GetById(id common.EntityId) (ver *m.Entity, err error)
	GetByIds(ids []common.EntityId) (ver []*m.Entity, err error)
	Delete(id common.EntityId) (err error)
	List(limit, offset int64, orderBy, sort string, autoLoad bool) (list []*m.Entity, total int64, err error)
	GetByType(t string, limit, offset int64) (list []*m.Entity, err error)
	Update(ver *m.Entity) (err error)
	UpdateSettings(entityId common.EntityId, settings m.Attributes) (err error)
	Search(query string, limit, offset int64) (list []*m.Entity, total int64, err error)
	AppendMetric(entityId common.EntityId, metric *m.Metric) (err error)
	DeleteMetric(entityId common.EntityId, metric *m.Metric) (err error)
	Import(entity *m.Entity) (err error)
	// contains filtered or unexported methods
}

IEntity ...

func GetEntityAdaptor added in v0.5.0

func GetEntityAdaptor(d *gorm.DB) IEntity

GetEntityAdaptor ...

type IEntityAction added in v0.5.0

type IEntityAction interface {
	Add(ver *m.EntityAction) (id int64, err error)
	DeleteByEntityId(id common.EntityId) (err error)
	AddMultiple(items []*m.EntityAction) (err error)
	// contains filtered or unexported methods
}

IEntityAction ...

func GetEntityActionAdaptor added in v0.5.0

func GetEntityActionAdaptor(d *gorm.DB) IEntityAction

GetEntityActionAdaptor ...

type IEntityState added in v0.5.0

type IEntityState interface {
	Add(ver *m.EntityState) (id int64, err error)
	DeleteByEntityId(entityId common.EntityId) (err error)
	AddMultiple(items []*m.EntityState) (err error)
	// contains filtered or unexported methods
}

IEntityState ...

func GetEntityStateAdaptor added in v0.5.0

func GetEntityStateAdaptor(d *gorm.DB) IEntityState

GetEntityStateAdaptor ...

type IEntityStorage added in v0.5.0

type IEntityStorage interface {
	Add(ver *m.EntityStorage) (id int64, err error)
	GetLastByEntityId(entityId common.EntityId) (ver *m.EntityStorage, err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.EntityStorage, total int64, err error)
	ListByEntityId(limit, offset int64, orderBy, sort string, entityId common.EntityId, startDate, endDate *time.Time) (list []*m.EntityStorage, total int64, err error)
	DeleteOldest(days int) (err error)
	// contains filtered or unexported methods
}

IEntityStorage ...

func GetEntityStorageAdaptor added in v0.5.0

func GetEntityStorageAdaptor(d *gorm.DB) IEntityStorage

GetEntityStorageAdaptor ...

type IImage added in v0.5.0

type IImage interface {
	Add(ver *m.Image) (id int64, err error)
	GetByImageName(imageName string) (ver *m.Image, err error)
	GetById(mapId int64) (ver *m.Image, err error)
	Update(ver *m.Image) (err error)
	Delete(mapId int64) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.Image, total int64, err error)
	UploadImage(reader *bufio.Reader, fileName string) (file *m.Image, err error)
	AddMultiple(items []*m.Image) (err error)
	GetAllByDate(filter string) (images []*m.Image, err error)
	GetFilterList() (filterList []*m.ImageFilterList, err error)
	// contains filtered or unexported methods
}

IImage ...

func GetImageAdaptor

func GetImageAdaptor(d *gorm.DB) IImage

GetImageAdaptor ...

type ILog added in v0.5.0

type ILog interface {
	Add(ver *m.Log) (id int64, err error)
	AddMultiple(items []*m.Log) (err error)
	GetById(verId int64) (ver *m.Log, err error)
	Delete(verId int64) (err error)
	List(limit, offset int64, orderBy, sort string, queryObj *m.LogQuery) (list []*m.Log, total int64, err error)
	Search(query string, limit, offset int) (list []*m.Log, total int64, err error)
	DeleteOldest(days int) (err error)
	// contains filtered or unexported methods
}

ILog ...

func GetLogAdaptor

func GetLogAdaptor(d *gorm.DB) ILog

GetLogAdaptor ...

type IMessage added in v0.5.0

type IMessage interface {
	Add(msg m.Message) (id int64, err error)
	// contains filtered or unexported methods
}

IMessage ...

func GetMessageAdaptor added in v0.0.17

func GetMessageAdaptor(d *gorm.DB) IMessage

GetMessageAdaptor ...

type IMessageDelivery added in v0.5.0

type IMessageDelivery interface {
	Add(msg m.MessageDelivery) (id int64, err error)
	SetStatus(msg m.MessageDelivery) (err error)
	List(limit, offset int64, orderBy, sort string) (list []m.MessageDelivery, total int64, err error)
	GetAllUncompleted(limit, offset int64) (list []m.MessageDelivery, total int64, err error)
	Delete(id int64) (err error)
	GetById(id int64) (ver m.MessageDelivery, err error)
	// contains filtered or unexported methods
}

IMessageDelivery ...

func GetMessageDeliveryAdaptor added in v0.0.17

func GetMessageDeliveryAdaptor(d *gorm.DB) IMessageDelivery

GetMessageDeliveryAdaptor ...

type IMetric added in v0.5.0

type IMetric interface {
	Add(ver *m.Metric) (id int64, err error)
	GetById(id int64) (metric *m.Metric, err error)
	GetByIdWithData(id int64, from, to *time.Time, metricRange *string) (metric *m.Metric, err error)
	Update(ver *m.Metric) error
	Delete(deviceId int64) (err error)
	AddMultiple(items []*m.Metric) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.Metric, total int64, err error)
	Search(query string, limit, offset int) (list []*m.Metric, total int64, err error)
	// contains filtered or unexported methods
}

IMetric ...

func GetMetricAdaptor added in v0.5.0

func GetMetricAdaptor(d *gorm.DB, orm *orm.Orm) IMetric

GetMetricAdaptor ...

type IMetricBucket added in v0.5.0

type IMetricBucket interface {
	Add(ver m.MetricDataItem) error
	AddMultiple(items []m.MetricDataItem) (err error)
	SimpleListWithSoftRange(_from, _to *time.Time, metricId int64, _metricRange *string, optionItems []string) (list []m.MetricDataItem, err error)
	Simple24HPreview(metricId int64, optionItems []string) (list []m.MetricDataItem, err error)
	DeleteOldest(days int) (err error)
	DeleteById(id int64) (err error)
	DeleteByMetricId(metricId int64) (err error)
	CreateHypertable() (err error)
	// contains filtered or unexported methods
}

IMetricBucket ...

func GetMetricBucketAdaptor added in v0.5.0

func GetMetricBucketAdaptor(d *gorm.DB, orm *orm.Orm) IMetricBucket

GetMetricBucketAdaptor ...

type IPermission added in v0.5.0

type IPermission interface {
	Add(permission *m.Permission) (id int64, err error)
	Delete(roleName, packageName string, levelName []string) (err error)
	GetAllPermissions(roleName string) (permissions []*m.Permission, err error)
	// contains filtered or unexported methods
}

IPermission ...

func GetPermissionAdaptor

func GetPermissionAdaptor(d *gorm.DB) IPermission

GetPermissionAdaptor ...

type IPlugin added in v0.5.0

type IPlugin interface {
	Add(plugin m.Plugin) error
	CreateOrUpdate(ver m.Plugin) error
	Update(plugin m.Plugin) error
	Delete(pluginId string) error
	List(limit, offset int64, orderBy, sort string) (list []m.Plugin, total int64, err error)
	Search(query string, limit, offset int64) (list []m.Plugin, total int64, err error)
	GetByName(name string) (ver m.Plugin, err error)
	// contains filtered or unexported methods
}

IPlugin ...

func GetPluginAdaptor added in v0.5.0

func GetPluginAdaptor(d *gorm.DB) IPlugin

GetPluginAdaptor ...

type IRole added in v0.5.0

type IRole interface {
	Add(role *m.Role) (err error)
	GetByName(name string) (role *m.Role, err error)
	Update(role *m.Role) (err error)
	Delete(name string) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.Role, total int64, err error)
	Search(query string, limit, offset int64) (list []*m.Role, total int64, err error)
	GetAccessList(role *m.Role) (err error)
	// contains filtered or unexported methods
}

IRole ...

func GetRoleAdaptor

func GetRoleAdaptor(d *gorm.DB) IRole

GetRoleAdaptor ...

type IRunHistory added in v0.5.0

type IRunHistory interface {
	Add(story *m.RunStory) (id int64, err error)
	Update(story *m.RunStory) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.RunStory, total int64, err error)
	// contains filtered or unexported methods
}

IRunHistory ...

func GetRunHistoryAdaptor added in v0.5.0

func GetRunHistoryAdaptor(d *gorm.DB) IRunHistory

GetRunHistoryAdaptor ...

type IScript added in v0.5.0

type IScript interface {
	Add(script *m.Script) (id int64, err error)
	GetById(scriptId int64) (script *m.Script, err error)
	GetByName(name string) (script *m.Script, err error)
	Update(script *m.Script) (err error)
	Delete(scriptId int64) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.Script, total int64, err error)
	Search(query string, limit, offset int64) (list []*m.Script, total int64, err error)
	// contains filtered or unexported methods
}

IScript ...

func GetScriptAdaptor

func GetScriptAdaptor(d *gorm.DB) IScript

GetScriptAdaptor ...

type ITask added in v0.5.0

type ITask interface {
	Add(ver *m.Task) (err error)
	Update(ver *m.Task) (err error)
	Delete(id int64) (err error)
	GetById(id int64) (task *m.Task, err error)
	List(limit, offset int64, orderBy, sort string, onlyEnabled bool) (list []*m.Task, total int64, err error)
	Enable(id int64) (err error)
	Disable(id int64) (err error)
	// contains filtered or unexported methods
}

ITask ...

func GetTaskAdaptor added in v0.5.0

func GetTaskAdaptor(d *gorm.DB) ITask

GetTaskAdaptor ...

type ITelegramChat added in v0.5.0

type ITelegramChat interface {
	Add(plugin m.TelegramChat) (err error)
	Delete(entityId common.EntityId, channelId int64) (err error)
	List(limit, offset int64, orderBy, sort string, entityId common.EntityId) (list []m.TelegramChat, total int64, err error)
	// contains filtered or unexported methods
}

ITelegramChat ...

func GetTelegramChannelAdaptor added in v0.5.0

func GetTelegramChannelAdaptor(d *gorm.DB) ITelegramChat

GetTelegramChannelAdaptor ...

type ITemplate added in v0.5.0

type ITemplate interface {
	UpdateOrCreate(ver *m.Template) (err error)
	Create(ver *m.Template) (err error)
	UpdateStatus(ver *m.Template) (err error)
	GetList(templateType m.TemplateType) (items []*m.Template, err error)
	GetByName(name string) (ver *m.Template, err error)
	GetItemByName(name string) (ver *m.Template, err error)
	GetItemsSortedList() (count int64, items []string, err error)
	Delete(name string) (err error)
	GetItemsTree() (tree []*m.TemplateTree, err error)
	UpdateItemsTree(tree []*m.TemplateTree) (err error)
	Search(query string, limit, offset int) (list []*m.Template, total int64, err error)
	GetMarkers(template *m.Template) (err error)
	Render(name string, params map[string]interface{}) (render *m.TemplateRender, err error)
	// contains filtered or unexported methods
}

ITemplate ...

func GetTemplateAdaptor added in v0.0.17

func GetTemplateAdaptor(d *gorm.DB) ITemplate

GetTemplateAdaptor ...

type ITrigger added in v0.5.0

type ITrigger interface {
	DeleteByTaskId(id int64) (err error)
	AddMultiple(items []*m.Trigger) (err error)
	// contains filtered or unexported methods
}

ITrigger ...

func GetTriggerAdaptor added in v0.5.0

func GetTriggerAdaptor(d *gorm.DB) ITrigger

GetTriggerAdaptor ...

type IUser added in v0.5.0

type IUser interface {
	Add(user *m.User) (id int64, err error)
	GetById(userId int64) (user *m.User, err error)
	GetByNickname(nick string) (user *m.User, err error)
	GetByEmail(email string) (user *m.User, err error)
	GetByAuthenticationToken(token string) (user *m.User, err error)
	GetByResetPassToken(token string) (user *m.User, err error)
	Update(user *m.User) (err error)
	Delete(userId int64) (err error)
	List(limit, offset int64, orderBy, sort string) (list []*m.User, total int64, err error)
	SignIn(u *m.User, ipv4 string) (err error)
	GenResetPassToken(u *m.User) (token string, err error)
	ClearResetPassToken(u *m.User) (err error)
	ClearToken(u *m.User) (err error)
	// contains filtered or unexported methods
}

IUser ...

func GetUserAdaptor

func GetUserAdaptor(d *gorm.DB) IUser

GetUserAdaptor ...

type IUserMeta added in v0.5.0

type IUserMeta interface {
	UpdateOrCreate(meta *m.UserMeta) (id int64, err error)
	// contains filtered or unexported methods
}

IUserMeta ...

type IVariable added in v0.5.0

type IVariable interface {
	Add(ver m.Variable) (err error)
	CreateOrUpdate(ver m.Variable) (err error)
	GetByName(name string) (ver m.Variable, err error)
	Update(variable m.Variable) (err error)
	Delete(name string) (err error)
	List(limit, offset int64, orderBy, sort string, system bool) (list []m.Variable, total int64, err error)
	Search(query string, limit, offset int) (list []m.Variable, total int64, err error)
	// contains filtered or unexported methods
}

IVariable ...

func GetVariableAdaptor

func GetVariableAdaptor(d *gorm.DB) IVariable

GetVariableAdaptor ...

type IZigbee2mqtt added in v0.5.0

type IZigbee2mqtt interface {
	Add(ver *m.Zigbee2mqtt) (id int64, err error)
	GetById(id int64) (ver *m.Zigbee2mqtt, err error)
	Update(ver *m.Zigbee2mqtt) (err error)
	Delete(id int64) (err error)
	List(limit, offset int64) (list []*m.Zigbee2mqtt, total int64, err error)
	GetByLogin(login string) (ver *m.Zigbee2mqtt, err error)
	// contains filtered or unexported methods
}

IZigbee2mqtt ...

func GetZigbee2mqttAdaptor added in v0.1.0

func GetZigbee2mqttAdaptor(d *gorm.DB) IZigbee2mqtt

GetZigbee2mqttAdaptor ...

type IZigbee2mqttDevice added in v0.5.0

type IZigbee2mqttDevice interface {
	Add(ver *m.Zigbee2mqttDevice) (err error)
	GetById(id string) (ver *m.Zigbee2mqttDevice, err error)
	Update(ver *m.Zigbee2mqttDevice) (err error)
	Delete(id string) (err error)
	List(limit, offset int64) (list []*m.Zigbee2mqttDevice, total int64, err error)
	ListByBridgeId(bridgeId, limit, offset int64) (list []*m.Zigbee2mqttDevice, total int64, err error)
	Search(query string, limit, offset int64) (list []*m.Zigbee2mqttDevice, total int64, err error)
	// contains filtered or unexported methods
}

IZigbee2mqttDevice ...

func GetZigbee2mqttDeviceAdaptor added in v0.1.0

func GetZigbee2mqttDeviceAdaptor(d *gorm.DB) IZigbee2mqttDevice

GetZigbee2mqttDeviceAdaptor ...

type Image

type Image struct {
	IImage
	// contains filtered or unexported fields
}

Image ...

func (*Image) Add

func (n *Image) Add(ver *m.Image) (id int64, err error)

Add ...

func (*Image) AddMultiple

func (n *Image) AddMultiple(items []*m.Image) (err error)

AddMultiple ...

func (*Image) Delete

func (n *Image) Delete(mapId int64) (err error)

Delete ...

func (*Image) GetAllByDate

func (n *Image) GetAllByDate(filter string) (images []*m.Image, err error)

GetAllByDate ...

func (*Image) GetById

func (n *Image) GetById(mapId int64) (ver *m.Image, err error)

GetById ...

func (*Image) GetByImageName added in v0.2.0

func (n *Image) GetByImageName(imageName string) (ver *m.Image, err error)

GetByImageName ...

func (*Image) GetFilterList

func (n *Image) GetFilterList() (filterList []*m.ImageFilterList, err error)

GetFilterList ...

func (*Image) List

func (n *Image) List(limit, offset int64, orderBy, sort string) (list []*m.Image, total int64, err error)

List ...

func (*Image) Update

func (n *Image) Update(ver *m.Image) (err error)

Update ...

func (*Image) UploadImage

func (n *Image) UploadImage(reader *bufio.Reader, fileName string) (newFile *m.Image, err error)

UploadImage ...

type Log

type Log struct {
	ILog
	// contains filtered or unexported fields
}

Log ...

func (*Log) Add

func (n *Log) Add(ver *m.Log) (id int64, err error)

Add ...

func (*Log) AddMultiple added in v0.0.19

func (n *Log) AddMultiple(items []*m.Log) (err error)

AddMultiple ...

func (*Log) Delete

func (n *Log) Delete(verId int64) (err error)

Delete ...

func (*Log) DeleteOldest added in v0.9.3

func (n *Log) DeleteOldest(days int) (err error)

DeleteOldest ...

func (*Log) GetById

func (n *Log) GetById(verId int64) (ver *m.Log, err error)

GetById ...

func (*Log) List

func (n *Log) List(limit, offset int64, orderBy, sort string, queryObj *m.LogQuery) (list []*m.Log, total int64, err error)

List ...

func (*Log) Search

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

Search ...

type Message added in v0.0.17

type Message struct {
	IMessage
	// contains filtered or unexported fields
}

Message ...

func (*Message) Add added in v0.0.17

func (n *Message) Add(msg m.Message) (id int64, err error)

Add ...

type MessageDelivery added in v0.0.17

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

MessageDelivery ...

func (*MessageDelivery) Add added in v0.0.17

func (n *MessageDelivery) Add(msg m.MessageDelivery) (id int64, err error)

Add ...

func (*MessageDelivery) Delete added in v0.0.17

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

Delete ...

func (*MessageDelivery) GetAllUncompleted added in v0.0.17

func (n *MessageDelivery) GetAllUncompleted(limit, offset int64) (list []m.MessageDelivery, total int64, err error)

GetAllUncompleted ...

func (*MessageDelivery) GetById added in v0.0.17

func (n *MessageDelivery) GetById(id int64) (ver m.MessageDelivery, err error)

GetById ...

func (*MessageDelivery) List added in v0.0.17

func (n *MessageDelivery) List(limit, offset int64, orderBy, sort string) (list []m.MessageDelivery, total int64, err error)

List ...

func (*MessageDelivery) SetStatus added in v0.0.17

func (n *MessageDelivery) SetStatus(msg m.MessageDelivery) (err error)

SetStatus ...

type Metric added in v0.5.0

type Metric struct {
	IMetric
	// contains filtered or unexported fields
}

Metric ...

func (*Metric) Add added in v0.5.0

func (n *Metric) Add(ver *m.Metric) (id int64, err error)

Add ...

func (*Metric) AddMultiple added in v0.5.0

func (n *Metric) AddMultiple(items []*m.Metric) (err error)

AddMultiple ...

func (*Metric) Delete added in v0.5.0

func (n *Metric) Delete(deviceId int64) (err error)

Delete ...

func (*Metric) GetById added in v0.5.0

func (n *Metric) GetById(id int64) (metric *m.Metric, err error)

GetById ...

func (*Metric) GetByIdWithData added in v0.5.0

func (n *Metric) GetByIdWithData(id int64, from, to *time.Time, metricRange *string) (metric *m.Metric, err error)

GetByIdWithData ...

func (*Metric) List added in v0.5.0

func (n *Metric) List(limit, offset int64, orderBy, sort string) (list []*m.Metric, total int64, err error)

List ...

func (*Metric) Search added in v0.5.0

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

Search ...

func (*Metric) Update added in v0.5.0

func (n *Metric) Update(ver *m.Metric) error

Update ...

type MetricBucket added in v0.5.0

type MetricBucket struct {
	IMetricBucket
	// contains filtered or unexported fields
}

MetricBucket ...

func (*MetricBucket) Add added in v0.5.0

func (n *MetricBucket) Add(ver m.MetricDataItem) error

Add ...

func (*MetricBucket) AddMultiple added in v0.5.0

func (n *MetricBucket) AddMultiple(items []m.MetricDataItem) (err error)

AddMultiple ...

func (*MetricBucket) CreateHypertable added in v0.5.0

func (n *MetricBucket) CreateHypertable() (err error)

CreateHypertable ...

func (*MetricBucket) DeleteById added in v0.5.0

func (n *MetricBucket) DeleteById(id int64) (err error)

DeleteById ...

func (*MetricBucket) DeleteByMetricId added in v0.5.0

func (n *MetricBucket) DeleteByMetricId(metricId int64) (err error)

DeleteByMetricId ...

func (*MetricBucket) DeleteOldest added in v0.5.0

func (n *MetricBucket) DeleteOldest(days int) (err error)

DeleteOldest ...

func (*MetricBucket) Simple24HPreview added in v0.5.0

func (n *MetricBucket) Simple24HPreview(metricId int64, optionItems []string) (list []m.MetricDataItem, err error)

Simple24HPreview ...

func (*MetricBucket) SimpleListWithSoftRange added in v0.5.0

func (n *MetricBucket) SimpleListWithSoftRange(_from, _to *time.Time, metricId int64, _metricRange *string, optionItems []string) (list []m.MetricDataItem, err error)

SimpleListWithSoftRange ...

type Permission

type Permission struct {
	IPermission
	// contains filtered or unexported fields
}

Permission ...

func (*Permission) Add

func (n *Permission) Add(permission *m.Permission) (id int64, err error)

Add ...

func (*Permission) Delete

func (n *Permission) Delete(roleName, packageName string, levelName []string) (err error)

Delete ...

func (*Permission) GetAllPermissions

func (n *Permission) GetAllPermissions(roleName string) (permissions []*m.Permission, err error)

GetAllPermissions ...

type Plugin added in v0.5.0

type Plugin struct {
	IPlugin
	// contains filtered or unexported fields
}

Plugin ...

func (*Plugin) Add added in v0.5.0

func (p *Plugin) Add(plugin m.Plugin) (err error)

Add ...

func (*Plugin) CreateOrUpdate added in v0.5.0

func (p *Plugin) CreateOrUpdate(plugin m.Plugin) (err error)

CreateOrUpdate ...

func (*Plugin) Delete added in v0.5.0

func (p *Plugin) Delete(name string) (err error)

Delete ...

func (*Plugin) GetByName added in v0.5.0

func (p *Plugin) GetByName(name string) (ver m.Plugin, err error)

GetByName ...

func (*Plugin) List added in v0.5.0

func (p *Plugin) List(limit, offset int64, orderBy, sort string) (list []m.Plugin, total int64, err error)

List ...

func (*Plugin) Search added in v0.5.0

func (p *Plugin) Search(query string, limit, offset int64) (list []m.Plugin, total int64, err error)

Search ...

func (*Plugin) Update added in v0.5.0

func (p *Plugin) Update(plugin m.Plugin) (err error)

Update ...

type Role

type Role struct {
	IRole
	// contains filtered or unexported fields
}

RoleName ...

func (*Role) Add

func (n *Role) Add(role *m.Role) (err error)

Add ...

func (*Role) Delete

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

Delete ...

func (*Role) GetAccessList

func (n *Role) GetAccessList(role *m.Role) (err error)

GetAccessList ...

func (*Role) GetByName

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

GetByName ...

func (*Role) List

func (n *Role) List(limit, offset int64, orderBy, sort string) (list []*m.Role, total int64, err error)

List ...

func (*Role) Search

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

Search ...

func (*Role) Update

func (n *Role) Update(role *m.Role) (err error)

Update ...

type RunHistory added in v0.5.0

type RunHistory struct {
	IRunHistory
	// contains filtered or unexported fields
}

RunStory ...

func (*RunHistory) Add added in v0.5.0

func (n *RunHistory) Add(story *m.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 []*m.RunStory, total int64, err error)

List ...

func (*RunHistory) Update added in v0.5.0

func (n *RunHistory) Update(story *m.RunStory) (err error)

Update ...

type Script

type Script struct {
	IScript
	// contains filtered or unexported fields
}

Script ...

func (*Script) Add

func (n *Script) Add(script *m.Script) (id int64, err error)

Add ...

func (*Script) Delete

func (n *Script) Delete(scriptId int64) (err error)

Delete ...

func (*Script) GetById

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

GetById ...

func (*Script) GetByName added in v0.5.0

func (n *Script) GetByName(name string) (script *m.Script, err error)

GetByName ...

func (*Script) List

func (n *Script) List(limit, offset int64, orderBy, sort string) (list []*m.Script, total int64, err error)

List ...

func (*Script) Search

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

Search ...

func (*Script) Update

func (n *Script) Update(script *m.Script) (err error)

Update ...

type Task added in v0.5.0

type Task struct {
	ITask
	// contains filtered or unexported fields
}

Task ...

func (*Task) Add added in v0.5.0

func (n *Task) Add(ver *m.Task) (err error)

Add ...

func (*Task) Delete added in v0.5.0

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

Delete ...

func (*Task) Disable added in v0.5.3

func (n *Task) Disable(id int64) (err error)

Disable ...

func (*Task) Enable added in v0.5.3

func (n *Task) Enable(id int64) (err error)

Enable ...

func (*Task) GetById added in v0.5.2

func (n *Task) GetById(id int64) (task *m.Task, err error)

GetById ...

func (*Task) List added in v0.5.0

func (n *Task) List(limit, offset int64, orderBy, sort string, onlyEnabled bool) (list []*m.Task, total int64, err error)

List ...

func (*Task) Update added in v0.5.1

func (n *Task) Update(ver *m.Task) (err error)

Update ...

type TelegramChat added in v0.5.0

type TelegramChat struct {
	ITelegramChat
	// contains filtered or unexported fields
}

TelegramChat ...

func (*TelegramChat) Add added in v0.5.0

func (p *TelegramChat) Add(plugin m.TelegramChat) (err error)

Add ...

func (*TelegramChat) Delete added in v0.5.0

func (p *TelegramChat) Delete(entityId common.EntityId, channelId int64) (err error)

Delete ...

func (*TelegramChat) List added in v0.5.0

func (p *TelegramChat) List(limit, offset int64, orderBy, sort string, entityId common.EntityId) (list []m.TelegramChat, total int64, err error)

List ...

type Template added in v0.0.17

type Template struct {
	ITemplate
	// contains filtered or unexported fields
}

Template ...

func (*Template) Create added in v0.0.17

func (n *Template) Create(ver *m.Template) (err error)

Create ...

func (*Template) Delete added in v0.0.17

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

Delete ...

func (*Template) GetByName added in v0.0.17

func (n *Template) GetByName(name string) (ver *m.Template, err error)

GetByName ...

func (*Template) GetItemByName added in v0.0.17

func (n *Template) GetItemByName(name string) (ver *m.Template, err error)

GetItemByName ...

func (*Template) GetItemsSortedList added in v0.0.17

func (n *Template) GetItemsSortedList() (count int64, items []string, err error)

GetItemsSortedList ...

func (*Template) GetItemsTree added in v0.0.17

func (n *Template) GetItemsTree() (tree []*m.TemplateTree, err error)

GetItemsTree ...

func (*Template) GetList added in v0.0.17

func (n *Template) GetList(templateType m.TemplateType) (items []*m.Template, err error)

GetList ...

func (*Template) GetMarkers added in v0.0.17

func (n *Template) GetMarkers(template *m.Template) (err error)

GetMarkers ...

func (*Template) Render added in v0.0.17

func (n *Template) Render(name string, params map[string]interface{}) (render *m.TemplateRender, err error)

Render ...

func (*Template) Search added in v0.0.17

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

Search ...

func (*Template) UpdateItemsTree added in v0.0.17

func (n *Template) UpdateItemsTree(tree []*m.TemplateTree) (err error)

UpdateItemsTree ...

func (*Template) UpdateOrCreate added in v0.0.17

func (n *Template) UpdateOrCreate(ver *m.Template) (err error)

UpdateOrCreate ...

func (*Template) UpdateStatus added in v0.0.17

func (n *Template) UpdateStatus(ver *m.Template) (err error)

UpdateStatus ...

type Trigger added in v0.5.0

type Trigger struct {
	ITrigger
	// contains filtered or unexported fields
}

Trigger ...

func (*Trigger) AddMultiple added in v0.5.0

func (n *Trigger) AddMultiple(items []*m.Trigger) (err error)

AddMultiple ...

func (*Trigger) DeleteByTaskId added in v0.5.0

func (n *Trigger) DeleteByTaskId(id int64) (err error)

DeleteByTaskId ...

type User

type User struct {
	IUser
	// contains filtered or unexported fields
}

User ...

func (*User) Add

func (n *User) Add(user *m.User) (id int64, err error)

Add ...

func (*User) ClearResetPassToken

func (n *User) ClearResetPassToken(u *m.User) (err error)

ClearResetPassToken ...

func (*User) ClearToken

func (n *User) ClearToken(u *m.User) (err error)

ClearToken ...

func (*User) Delete

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

Delete ...

func (*User) GenResetPassToken

func (n *User) GenResetPassToken(u *m.User) (token string, err error)

GenResetPassToken ...

func (*User) GetByAuthenticationToken

func (n *User) GetByAuthenticationToken(token string) (user *m.User, err error)

GetByAuthenticationToken ...

func (*User) GetByEmail

func (n *User) GetByEmail(email string) (user *m.User, err error)

GetByEmail ...

func (*User) GetById

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

GetById ...

func (*User) GetByNickname added in v0.2.0

func (n *User) GetByNickname(nick string) (user *m.User, err error)

GetByNickname ...

func (*User) GetByResetPassToken

func (n *User) GetByResetPassToken(token string) (user *m.User, err error)

GetByResetPassToken ...

func (*User) List

func (n *User) List(limit, offset int64, orderBy, sort string) (list []*m.User, total int64, err error)

List ...

func (*User) SignIn

func (n *User) SignIn(u *m.User, ipv4 string) (err error)

SignIn ...

func (*User) Update

func (n *User) Update(user *m.User) (err error)

Update ...

type UserMeta

type UserMeta struct {
	IUserMeta
	// contains filtered or unexported fields
}

UserMeta ...

func GetUserMetaAdaptor

func GetUserMetaAdaptor(d *gorm.DB) *UserMeta

GetUserMetaAdaptor ...

func (*UserMeta) UpdateOrCreate

func (n *UserMeta) UpdateOrCreate(meta *m.UserMeta) (id int64, err error)

UpdateOrCreate ...

type Variable

type Variable struct {
	IVariable
	// contains filtered or unexported fields
}

Variable ...

func (*Variable) Add

func (n *Variable) Add(ver m.Variable) (err error)

Add ...

func (*Variable) CreateOrUpdate added in v0.5.0

func (n *Variable) CreateOrUpdate(ver m.Variable) (err error)

CreateOrUpdate ...

func (*Variable) Delete

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

Delete ...

func (*Variable) GetByName

func (n *Variable) GetByName(name string) (ver m.Variable, err error)

GetByName ...

func (*Variable) List

func (n *Variable) List(limit, offset int64, orderBy, sort string, system bool) (list []m.Variable, total int64, err error)

List ...

func (*Variable) Search added in v0.9.4

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

Search ...

func (*Variable) Update

func (n *Variable) Update(variable m.Variable) (err error)

Update ...

type Zigbee2mqtt added in v0.1.0

type Zigbee2mqtt struct {
	IZigbee2mqtt
	// contains filtered or unexported fields
}

Zigbee2mqtt ...

func (*Zigbee2mqtt) Add added in v0.1.0

func (n *Zigbee2mqtt) Add(ver *m.Zigbee2mqtt) (id int64, err error)

Add ...

func (*Zigbee2mqtt) Delete added in v0.1.0

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

Delete ...

func (*Zigbee2mqtt) GetById added in v0.1.0

func (n *Zigbee2mqtt) GetById(id int64) (ver *m.Zigbee2mqtt, err error)

GetById ...

func (*Zigbee2mqtt) GetByLogin added in v0.1.0

func (a *Zigbee2mqtt) GetByLogin(login string) (ver *m.Zigbee2mqtt, err error)

GetByLogin ...

func (*Zigbee2mqtt) List added in v0.1.0

func (n *Zigbee2mqtt) List(limit, offset int64) (list []*m.Zigbee2mqtt, total int64, err error)

List ...

func (*Zigbee2mqtt) Update added in v0.1.0

func (n *Zigbee2mqtt) Update(ver *m.Zigbee2mqtt) (err error)

Update ...

type Zigbee2mqttDevice added in v0.1.0

type Zigbee2mqttDevice struct {
	IZigbee2mqttDevice
	// contains filtered or unexported fields
}

Zigbee2mqttDevice ...

func (*Zigbee2mqttDevice) Add added in v0.1.0

func (n *Zigbee2mqttDevice) Add(ver *m.Zigbee2mqttDevice) (err error)

Add ...

func (*Zigbee2mqttDevice) Delete added in v0.1.0

func (n *Zigbee2mqttDevice) Delete(id string) (err error)

Delete ...

func (*Zigbee2mqttDevice) GetById added in v0.1.0

func (n *Zigbee2mqttDevice) GetById(id string) (ver *m.Zigbee2mqttDevice, err error)

GetById ...

func (*Zigbee2mqttDevice) List added in v0.1.0

func (n *Zigbee2mqttDevice) List(limit, offset int64) (list []*m.Zigbee2mqttDevice, total int64, err error)

List ...

func (*Zigbee2mqttDevice) ListByBridgeId added in v0.5.2

func (n *Zigbee2mqttDevice) ListByBridgeId(bridgeId, limit, offset int64) (list []*m.Zigbee2mqttDevice, total int64, err error)

ListByBridgeId ...

func (*Zigbee2mqttDevice) Search added in v0.1.0

func (n *Zigbee2mqttDevice) Search(query string, limit, offset int64) (list []*m.Zigbee2mqttDevice, total int64, err error)

Search ...

func (*Zigbee2mqttDevice) Update added in v0.1.0

func (n *Zigbee2mqttDevice) Update(ver *m.Zigbee2mqttDevice) (err error)

Update ...

Jump to

Keyboard shortcuts

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