database

package
v0.0.0-...-417c523 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBlindLabelSetup

func CreateBlindLabelSetup(db Database, cfg dblind.BlindSetup) error

CreateBlindLabelSetup create blind config in database

func CreateHvacLabelSetup

func CreateHvacLabelSetup(db Database, cfg dhvac.HvacSetup) error

CreateHvacLabelSetup create hvac config in database

func CreateLedLabelSetup

func CreateLedLabelSetup(db Database, config dl.LedSetup) error

CreateLedLabelSetup update led setup in database

func CreateNanoLabelSetup

func CreateNanoLabelSetup(db Database, config dnanosense.NanosenseSetup) error

CreateNanoLabelSetup create nano setup in database

func CreateSensorLabelSetup

func CreateSensorLabelSetup(db Database, config ds.SensorSetup) error

CreateSensorLabelSetup sensor sensor setup in database

func CreateWagoLabelSetup

func CreateWagoLabelSetup(db Database, config dwago.WagoSetup) error

CreateWagoLabelSetup create wago setup in database

func GetBlindConfig

func GetBlindConfig(db Database, mac string) (*dblind.BlindSetup, string)

GetBlindConfig return the sensor configuration

func GetBlindLabelConfig

func GetBlindLabelConfig(db Database, label string) (*dblind.BlindSetup, string)

GetBlindLabelConfig return the sensor configuration

func GetBlindStatus

func GetBlindStatus(db Database, mac string) *dblind.Blind

GetBlindStatus return the blind status

func GetBlindSwitchSetup

func GetBlindSwitchSetup(db Database, swMac string) map[string]dblind.BlindSetup

GetBlindSwitchSetup get blind Config list

func GetBlindSwitchStatus

func GetBlindSwitchStatus(db Database, swMac string) map[string]dblind.Blind

GetBlindSwitchStatus get cluster Config list

func GetBlindsConfig

func GetBlindsConfig(db Database) map[string]dblind.BlindSetup

GetBlindsConfig return the blind config list

func GetBlindsConfigByLabel

func GetBlindsConfigByLabel(db Database) map[string]dblind.BlindSetup

GetBlindsConfigByLabel return the blind config list

func GetBlindsStatus

func GetBlindsStatus(db Database) map[string]dblind.Blind

GetBlindsStatus return the blind status list

func GetBlindsStatusByLabel

func GetBlindsStatusByLabel(db Database) map[string]dblind.Blind

GetBlindsStatusByLabel return the blind status list

func GetCluster

func GetCluster(db Database, cluster int) map[string]dserver.SwitchConfig

GetCluster get cluster Config list

func GetDrivers

func GetDrivers(db Database) map[string]core.Driver

GetDrivers return the project configuration

func GetFrame

func GetFrame(db Database, label string) (*dserver.Frame, string)

GetFrame return the project configuration

func GetFrames

func GetFrames(db Database) []dserver.Frame

GetFrames return the frame configuration

func GetFramesConfigByLabel

func GetFramesConfigByLabel(db Database) map[string]dserver.Frame

GetFramesConfigByLabel return the frame configuration

func GetFramesDumpByLabel

func GetFramesDumpByLabel(db Database) map[string]dserver.FrameStatus

GetFramesDumpByLabel return the switch status list

func GetGroupConfig

func GetGroupConfig(db Database, grID int) (*gm.GroupConfig, string)

GetGroupConfig return the group configuration

func GetGroupConfigs

func GetGroupConfigs(db Database, driversMac map[string]bool) map[int]gm.GroupConfig

GetGroupConfigs get group Config

func GetGroupStatus

func GetGroupStatus(db Database, grID int) *gm.GroupStatus

GetGroupStatus return the group status

func GetGroupSwitchs

func GetGroupSwitchs(db Database, grID int) map[string]bool

GetGroupSwitchs return the corresponding running switch list

func GetGroupsStatus

func GetGroupsStatus(db Database) map[int]gm.GroupStatus

GetGroupsStatus get groups status

func GetHvacConfig

func GetHvacConfig(db Database, mac string) (*dhvac.HvacSetup, string)

GetHvacConfig return the sensor configuration

func GetHvacLabelConfig

func GetHvacLabelConfig(db Database, label string) (*dhvac.HvacSetup, string)

GetHvacLabelConfig return the sensor configuration

func GetHvacStatus

func GetHvacStatus(db Database, mac string) *dhvac.Hvac

GetHvacStatus return the hvac status

func GetHvacSwitchSetup

func GetHvacSwitchSetup(db Database, swMac string) map[string]dhvac.HvacSetup

GetHvacSwitchSetup get hvac Config list

func GetHvacSwitchStatus

func GetHvacSwitchStatus(db Database, swMac string) map[string]dhvac.Hvac

GetHvacSwitchStatus get cluster Config list

func GetHvacsConfig

func GetHvacsConfig(db Database) map[string]dhvac.HvacSetup

GetHvacsConfig return the hvac config list

func GetHvacsConfigByLabel

func GetHvacsConfigByLabel(db Database) map[string]dhvac.HvacSetup

GetHvacsConfigByLabel return the hvac config list

func GetHvacsStatus

func GetHvacsStatus(db Database) map[string]dhvac.Hvac

GetHvacsStatus return the hvac status list

func GetHvacsStatusByLabel

func GetHvacsStatusByLabel(db Database) map[string]dhvac.Hvac

GetHvacsStatusByLabel return the hvac status list

func GetIfcs

func GetIfcs(db Database) []dserver.IfcInfo

func GetLedConfig

func GetLedConfig(db Database, mac string) (*dl.LedSetup, string)

GetLedConfig return the led configuration

func GetLedLabelConfig

func GetLedLabelConfig(db Database, label string) (*dl.LedSetup, string)

GetLedLabelConfig return the led configuration

func GetLedStatus

func GetLedStatus(db Database, mac string) *dl.Led

GetLedStatus return the led status

func GetLedSwitchSetup

func GetLedSwitchSetup(db Database, swMac string) map[string]dl.LedSetup

GetLedSwitchConfig get led Config list

func GetLedSwitchStatus

func GetLedSwitchStatus(db Database, swMac string) map[string]dl.Led

GetLedSwitchStatus get cluster Config list

func GetLedsConfig

func GetLedsConfig(db Database) map[string]dl.LedSetup

GetLedsConfig return the led config list

func GetLedsConfigByLabel

func GetLedsConfigByLabel(db Database) map[string]dl.LedSetup

GetLedsConfigByLabel return the led config list

func GetLedsStatus

func GetLedsStatus(db Database) map[string]dl.Led

GetLedsStatus return the led status list

func GetLedsStatusByLabel

func GetLedsStatusByLabel(db Database) map[string]dl.Led

GetLedsStatusByLabel return the led status list

func GetModel

func GetModel(db Database, name string) *core.Model

GetModel return the model configuration

func GetModels

func GetModels(db Database) map[string]core.Model

GetModels return the models configuration

func GetNanoConfig

func GetNanoConfig(db Database, mac string) (*dnanosense.NanosenseSetup, string)

GetNanoConfig return the nano configuration

func GetNanoLabelConfig

func GetNanoLabelConfig(db Database, label string) (*dnanosense.NanosenseSetup, string)

GetNanoLabelConfig return the nano configuration

func GetNanoStatus

func GetNanoStatus(db Database, label string) *dnanosense.Nanosense

GetNanoStatus return the nano status

func GetNanoSwitchSetup

func GetNanoSwitchSetup(db Database, swCluster int) map[string]dnanosense.NanosenseSetup

GetNanoSwitchSetup get nano Config list

func GetNanoSwitchStatus

func GetNanoSwitchStatus(db Database, cluster int) map[string]dnanosense.Nanosense

GetNanoSwitchStatus get cluster Config list

func GetNanosConfig

func GetNanosConfig(db Database) map[string]dnanosense.NanosenseSetup

GetNanosConfig return the nano config list

func GetNanosConfigByLabel

func GetNanosConfigByLabel(db Database) map[string]dnanosense.NanosenseSetup

GetNanosConfigByLabel return the sensor config list

func GetNanosStatus

func GetNanosStatus(db Database) map[string]dnanosense.Nanosense

GetNanosStatus return the nano status list

func GetNanosStatusByLabel

func GetNanosStatusByLabel(db Database) map[string]dnanosense.Nanosense

GetNanosStatusByLabel return the nano status list

func GetObjectID

func GetObjectID(db Database, dbName, tbName string, criteria map[string]interface{}) string

GetObjectID return id

func GetProject

func GetProject(db Database, label string) (*core.Project, string)

GetProject return the project configuration

func GetProjectByMac

func GetProjectByMac(db Database, mac string) *core.Project

GetProjectByMac return the project configuration

func GetProjects

func GetProjects(db Database) []core.Project

GetProjects return the project configuration

func GetSensorConfig

func GetSensorConfig(db Database, mac string) (*ds.SensorSetup, string)

GetSensorConfig return the sensor configuration

func GetSensorLabelConfig

func GetSensorLabelConfig(db Database, label string) (*ds.SensorSetup, string)

GetSensorLabelConfig return the sensor configuration

func GetSensorStatus

func GetSensorStatus(db Database, mac string) *ds.Sensor

GetSensorStatus return the led status

func GetSensorSwitchSetup

func GetSensorSwitchSetup(db Database, swMac string) map[string]ds.SensorSetup

GetSensorSwitchSetup get sensor Config list

func GetSensorSwitchStatus

func GetSensorSwitchStatus(db Database, swMac string) map[string]ds.Sensor

GetSensorSwitchStatus get cluster Config list

func GetSensorsConfig

func GetSensorsConfig(db Database) map[string]ds.SensorSetup

GetSensorsConfig return the sensor config list

func GetSensorsConfigByLabel

func GetSensorsConfigByLabel(db Database) map[string]ds.SensorSetup

GetSensorsConfigByLabel return the sensor config list

func GetSensorsStatus

func GetSensorsStatus(db Database) map[string]ds.Sensor

GetSensorsStatus return the led status list

func GetSensorsStatusByLabel

func GetSensorsStatusByLabel(db Database) map[string]ds.Sensor

GetSensorsStatusByLabel return the led status list

func GetServiceConfig

func GetServiceConfig(db Database, name string) *pkg.Service

GetServiceConfig get service Config

func GetServiceConfigs

func GetServiceConfigs(db Database) map[string]pkg.Service

GetServiceConfigs return the sensor configuration

func GetSwitchConfig

func GetSwitchConfig(db Database, mac string) (*dserver.SwitchConfig, string)

GetSwitchConfig get switch Config

func GetSwitchLabelConfig

func GetSwitchLabelConfig(db Database, label string) *dserver.SwitchConfig

GetSwitchLabelConfig return the switch configuration

func GetSwitchStatusCluster

func GetSwitchStatusCluster(db Database, cluster int) map[string]dserver.SwitchDump

GetSwitchStatusCluster get cluster Config list

func GetSwitchsConfig

func GetSwitchsConfig(db Database) map[string]dserver.SwitchConfig

GetSwitchsConfig return the switch config list

func GetSwitchsConfigByLabel

func GetSwitchsConfigByLabel(db Database) map[string]dserver.SwitchConfig

GetSwitchsConfigByLabel return the switch config list

func GetSwitchsDump

func GetSwitchsDump(db Database) map[string]dserver.SwitchDump

GetSwitchsDump return the switch status list

func GetSwitchsDumpByLabel

func GetSwitchsDumpByLabel(db Database) map[string]dserver.SwitchDump

GetSwitchsDumpByLabel return the switch status list

func GetUser

func GetUser(db Database, userHash string) *duser.UserAccess

GetUser retrive user from the database

func GetUserConfigs

func GetUserConfigs(db Database, groups map[int]bool, withPriviledge bool) map[string]duser.UserAccess

GetUserConfigs get user Config for a given group list

func GetWagoClusterSetup

func GetWagoClusterSetup(db Database, cluster int) map[string]dwago.WagoSetup

GetWagoClusterSetup get wago Config list

func GetWagoClusterStatus

func GetWagoClusterStatus(db Database, cluster int) map[string]dwago.Wago

GetWagoClusterStatus get cluster Config list

func GetWagoConfig

func GetWagoConfig(db Database, mac string) (*dwago.WagoSetup, string)

GetWagoConfig return the wago configuration

func GetWagoLabelConfig

func GetWagoLabelConfig(db Database, label string) (*dwago.WagoSetup, string)

GetWagoLabelConfig return the wago configuration

func GetWagoStatus

func GetWagoStatus(db Database, mac string) *dwago.Wago

GetWagoStatus return the wago status

func GetWagoSwitchSetup

func GetWagoSwitchSetup(db Database, swCluster int) map[string]dwago.WagoSetup

GetWagoSwitchSetup get wago Config list

func GetWagosConfig

func GetWagosConfig(db Database) map[string]dwago.WagoSetup

GetWagosConfig return the wago config list

func GetWagosConfigByLabel

func GetWagosConfigByLabel(db Database) map[string]dwago.WagoSetup

GetWagosConfigByLabel return the wago config list

func GetWagosStatus

func GetWagosStatus(db Database) map[string]dwago.Wago

GetWagosStatus return the wago status list

func GetWagosStatusByLabel

func GetWagosStatusByLabel(db Database) map[string]dwago.Wago

GetWagosStatusByLabel return the wago status list

func NewError

func NewError(text string) error

NewError raise an error

func PrepareDB

func PrepareDB(db Database, withDrop bool)

func RemoveBlindConfig

func RemoveBlindConfig(db Database, mac string) error

RemoveBlindConfig remove blind config in database

func RemoveBlindStatus

func RemoveBlindStatus(db Database, mac string) error

RemoveBlindStatus remove led status in database

func RemoveFrame

func RemoveFrame(db Database, label string) error

RemoveFrame remove project entry in database

func RemoveGroupConfig

func RemoveGroupConfig(db Database, grID int) error

RemoveGroupConfig remove group config in database

func RemoveHvacConfig

func RemoveHvacConfig(db Database, mac string) error

RemoveHvacConfig remove hvac config in database

func RemoveHvacStatus

func RemoveHvacStatus(db Database, mac string) error

RemoveHvacStatus remove hvac status in database

func RemoveLedConfig

func RemoveLedConfig(db Database, mac string) error

RemoveLedConfig remove led config in database

func RemoveLedStatus

func RemoveLedStatus(db Database, mac string) error

RemoveLedStatus remove led status in database

func RemoveModel

func RemoveModel(db Database, name string) error

RemoveModel remove ifc config in database

func RemoveNanoConfig

func RemoveNanoConfig(db Database, label string) error

RemoveNanoConfig remove nano config in database

func RemoveNanoStatus

func RemoveNanoStatus(db Database, label string) error

RemoveNanoStatus remove nano status in database

func RemoveProject

func RemoveProject(db Database, label string) error

RemoveProject remove project entry in database

func RemoveSensorConfig

func RemoveSensorConfig(db Database, mac string) error

RemoveSensorConfig remove sensor config in database

func RemoveSensorStatus

func RemoveSensorStatus(db Database, mac string) error

RemoveSensorStatus remove led status in database

func RemoveServiceConfig

func RemoveServiceConfig(db Database, mac string) error

RemoveServiceConfig remove sensor config in database

func RemoveSwitchBlindStatus

func RemoveSwitchBlindStatus(db Database, mac string) error

RemoveSwitchBlindStatus remove led status in database

func RemoveSwitchConfig

func RemoveSwitchConfig(db Database, mac string) error

RemoveSwitchConfig remove led config in database

func RemoveSwitchHvacStatus

func RemoveSwitchHvacStatus(db Database, mac string) error

RemoveSwitchHvacStatus remove led status in database

func RemoveSwitchLedStatus

func RemoveSwitchLedStatus(db Database, mac string) error

RemoveSwitchLedStatus remove led status in database

func RemoveSwitchSensorStatus

func RemoveSwitchSensorStatus(db Database, mac string) error

RemoveSwitchSensorStatus remove led status in database

func RemoveSwitchStatus

func RemoveSwitchStatus(db Database, mac string) error

RemoveSwitchStatus remove switch status in database

func RemoveUserConfig

func RemoveUserConfig(db Database, userHash string) error

RemoveUserConfig remove user config in database

func RemoveWagoConfig

func RemoveWagoConfig(db Database, mac string) error

RemoveWagoConfig remove wago config in database

func RemoveWagoStatus

func RemoveWagoStatus(db Database, mac string) error

RemoveWagoStatus remove wago status in database

func ReplaceSwitchConfig

func ReplaceSwitchConfig(db Database, old, new string) error

ReplaceSwitchConfig update sensor config in database

func SaveBlindConfig

func SaveBlindConfig(db Database, cfg dblind.BlindSetup) error

SaveBlindConfig dump blind config in database

func SaveBlindLabelConfig

func SaveBlindLabelConfig(db Database, cfg dblind.BlindSetup) error

SaveBlindLabelConfig dump blind config in database

func SaveBlindStatus

func SaveBlindStatus(db Database, status dblind.Blind) error

SaveBlindStatus dump blind status in database

func SaveFrame

func SaveFrame(db Database, cfg dserver.Frame) error

SaveFrame dump project in database

func SaveGroupConfig

func SaveGroupConfig(db Database, cfg gm.GroupConfig) error

SaveGroupConfig dump group config in database

func SaveGroupStatus

func SaveGroupStatus(db Database, status gm.GroupStatus) error

SaveGroupStatus dump group status in database

func SaveHvacConfig

func SaveHvacConfig(db Database, cfg dhvac.HvacSetup) error

SaveHvacConfig dump hvac config in database

func SaveHvacLabelConfig

func SaveHvacLabelConfig(db Database, cfg dhvac.HvacSetup) error

SaveHvacLabelConfig dump hvac config in database

func SaveHvacStatus

func SaveHvacStatus(db Database, status dhvac.Hvac) error

SaveHvacStatus dump hvac status in database

func SaveLedConfig

func SaveLedConfig(db Database, cfg dl.LedSetup) error

SaveLedConfig dump led config in database

func SaveLedLabelConfig

func SaveLedLabelConfig(db Database, cfg dl.LedSetup) error

SaveLedLabelConfig dump led config in database

func SaveLedStatus

func SaveLedStatus(db Database, status dl.Led) error

SaveLedStatus dump led status in database

func SaveModel

func SaveModel(db Database, cfg core.Model) error

SaveModel dump model in database

func SaveNanoConfig

func SaveNanoConfig(db Database, cfg dnanosense.NanosenseSetup) error

SaveNanoConfig dump nano config in database

func SaveNanoLabelConfig

func SaveNanoLabelConfig(db Database, cfg dnanosense.NanosenseSetup) error

SaveNanoConfig dump nano config in database

func SaveNanoStatus

func SaveNanoStatus(db Database, status dnanosense.Nanosense) error

SaveNanoStatus dump nano status in database

func SaveOnUpdateObject

func SaveOnUpdateObject(db Database, obj interface{}, dbName, tbName string, criteria map[string]interface{}) error

SaveOnUpdateObject in database

func SaveProject

func SaveProject(db Database, cfg core.Project) error

SaveProject dump project in database

func SaveSensorConfig

func SaveSensorConfig(db Database, cfg ds.SensorSetup) error

SaveSensorConfig dump sensor config in database

func SaveSensorLabelConfig

func SaveSensorLabelConfig(db Database, cfg ds.SensorSetup) error

SaveSensorLabelConfig dump sensor config in database

func SaveSensorStatus

func SaveSensorStatus(db Database, status ds.Sensor) error

SaveSensorStatus dump sensor status in database

func SaveServiceConfig

func SaveServiceConfig(db Database, service pkg.Service) error

SaveServiceConfig dump sensor config in database

func SaveServiceStatus

func SaveServiceStatus(db Database, status core.ServiceDump) error

SaveServiceStatus dump service status in database

func SaveSwitchConfig

func SaveSwitchConfig(db Database, sw dserver.SwitchConfig) error

SaveSwitchConfig register switch config in database

func SaveSwitchLabelConfig

func SaveSwitchLabelConfig(db Database, config dserver.SwitchConfig) error

SaveSwitchLabelConfig update server config to database

func SaveSwitchStatus

func SaveSwitchStatus(db Database, status sd.SwitchStatus) error

SaveSwitchStatus dump switch status in database

func SaveUserConfig

func SaveUserConfig(db Database, cfg duser.UserAccess) error

SaveUserConfig dump user config in database

func SaveWagoConfig

func SaveWagoConfig(db Database, cfg dwago.WagoSetup) error

SaveWagoConfig dump wago config in database

func SaveWagoLabelConfig

func SaveWagoLabelConfig(db Database, cfg dwago.WagoSetup) error

SaveWagoLabelConfig dump wago config in database

func SaveWagoStatus

func SaveWagoStatus(db Database, status dwago.Wago) error

SaveWagoStatus dump wago status in database

func SetUsersDump

func SetUsersDump(db Database, users map[string]duser.UserAccess) error

SetUsersDump drop table before adding users

func SwitchBlindConfig

func SwitchBlindConfig(db Database, old, new string) error

SwitchBlindConfig update blind config in database

func SwitchHvacConfig

func SwitchHvacConfig(db Database, old, new string) error

SwitchHvacConfig update hvac config in database

func SwitchLedConfig

func SwitchLedConfig(db Database, old, new string) error

SwitchLedConfig update led config in database

func SwitchSensorConfig

func SwitchSensorConfig(db Database, old, new string) error

SwitchSensorConfig update sensor config in database

func SwitchWagoConfig

func SwitchWagoConfig(db Database, old, new string) error

SwitchWagoConfig update wago config in database

func UpdateBlindConfig

func UpdateBlindConfig(db Database, cfg dblind.BlindConf) error

UpdateBlindConfig update blind config in database

func UpdateBlindLabelConfig

func UpdateBlindLabelConfig(db Database, cfg dblind.BlindConf) error

UpdateBlindLabelConfig update blind config in database

func UpdateBlindLabelSetup

func UpdateBlindLabelSetup(db Database, cfg dblind.BlindSetup) error

UpdateBlindLabelSetup update blind config in database

func UpdateBlindSetup

func UpdateBlindSetup(db Database, cfg dblind.BlindSetup) error

UpdateBlindSetup update blind config in database

func UpdateGroupConfig

func UpdateGroupConfig(db Database, config gm.GroupConfig) error

UpdateGroupConfig update group config in database

func UpdateHvacConfig

func UpdateHvacConfig(db Database, cfg dhvac.HvacConf) error

UpdateHvacConfig update hvac config in database

func UpdateHvacLabelConfig

func UpdateHvacLabelConfig(db Database, cfg dhvac.HvacConf) error

UpdateHvacLabelConfig update hvac config in database

func UpdateHvacLabelSetup

func UpdateHvacLabelSetup(db Database, cfg dhvac.HvacSetup) error

UpdateHvacLabelSetup update hvac config in database

func UpdateHvacSetup

func UpdateHvacSetup(db Database, cfg dhvac.HvacSetup) error

UpdateHvacSetup update hvac config in database

func UpdateLedConfig

func UpdateLedConfig(db Database, config dl.LedConf) error

UpdateLedConfig update led config in database

func UpdateLedLabelConfig

func UpdateLedLabelConfig(db Database, config dl.LedConf) error

UpdateLedLabelConfig update led config in database

func UpdateLedLabelSetup

func UpdateLedLabelSetup(db Database, config dl.LedSetup) error

UpdateLedLabelSetup update led setup in database

func UpdateLedSetup

func UpdateLedSetup(db Database, config dl.LedSetup) error

UpdateLedSetup update led setup in database

func UpdateNanoConfig

func UpdateNanoConfig(db Database, cfg dnanosense.NanosenseConf) error

UpdateNanoConfig update nano config in database

func UpdateNanoLabelConfig

func UpdateNanoLabelConfig(db Database, cfg dnanosense.NanosenseConf) error

UpdateNanoLabelConfig update nano config in database

func UpdateNanoLabelSetup

func UpdateNanoLabelSetup(db Database, config dnanosense.NanosenseSetup) error

UpdateNanoLabelSetup update nano setup in database

func UpdateNanoSetup

func UpdateNanoSetup(db Database, cfg dnanosense.NanosenseSetup) error

UpdateNanoSetup update nano config in database

func UpdateSensorConfig

func UpdateSensorConfig(db Database, cfg ds.SensorConf) error

UpdateSensorConfig update sensor config in database

func UpdateSensorLabelConfig

func UpdateSensorLabelConfig(db Database, cfg ds.SensorConf) error

UpdateSensorLabelConfig update sensor config in database

func UpdateSensorLabelSetup

func UpdateSensorLabelSetup(db Database, cfg ds.SensorSetup) error

UpdateSensorLabelSetup update sensor config in database

func UpdateSensorSetup

func UpdateSensorSetup(db Database, cfg ds.SensorSetup) error

UpdateSensorSetup update sensor config in database

func UpdateSwitchConfig

func UpdateSwitchConfig(db Database, config dserver.SwitchConfig) error

UpdateSwitchConfig update server config to database

func UpdateSwitchLabelConfig

func UpdateSwitchLabelConfig(db Database, config dserver.SwitchConfig) error

UpdateSwitchLabelConfig update server config to database

func UpdateWagoConfig

func UpdateWagoConfig(db Database, config dwago.WagoConf) error

UpdateWagoConfig update wago config in database

func UpdateWagoLabelConfig

func UpdateWagoLabelConfig(db Database, config dwago.WagoConf) error

UpdateWagoLabelConfig update wago config in database

func UpdateWagoLabelSetup

func UpdateWagoLabelSetup(db Database, config dwago.WagoSetup) error

UpdateWagoLabelSetup update wago setup in database

func UpdateWagoSetup

func UpdateWagoSetup(db Database, config dwago.WagoSetup) error

UpdateWagoSetup update wago setup in database

Types

type Database

type Database = database.DatabaseInterface

func ConnectDatabase

func ConnectDatabase(ip, port string) (*Database, error)

ConnectDatabase plug datbase

Jump to

Keyboard shortcuts

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