Documentation
¶
Index ¶
- Constants
- type Database
- func (d *Database) AddFilename(db string, fileName string)
- func (d *Database) LoadDeviceBase() error
- func (d *Database) LoadProfileBase() error
- func (d *Database) LoadRelayBase() error
- func (d *Database) SaveDeviceBase() error
- func (d *Database) SaveProfileBase() error
- func (d *Database) SaveRelayBase(name string, status bool) error
- func (d *Database) SetDBType(typ string)
- type DeviceDB
- type ProfileDB
- type ProfileDeivceDB
- type RelaysDB
- type SingleDeviceDb
- type SingleProfileDB
- type SingleRelayDB
Constants ¶
View Source
const (
DbTextType = iota
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) AddFilename ¶
func (*Database) LoadDeviceBase ¶
func (*Database) LoadProfileBase ¶
func (*Database) LoadRelayBase ¶
func (*Database) SaveDeviceBase ¶
func (*Database) SaveProfileBase ¶
type DeviceDB ¶
type DeviceDB struct {
Devices []SingleDeviceDb `json:"devices"`
}
type ProfileDB ¶
type ProfileDB struct {
Profiles []SingleProfileDB `json:"profiles"`
}
type ProfileDeivceDB ¶
type RelaysDB ¶
type RelaysDB struct {
Relays []SingleRelayDB `json:"relays"`
}
type SingleDeviceDb ¶
type SingleProfileDB ¶
type SingleProfileDB struct { Name string `json:"name"` Key string `json:"key"` Admin bool `json:"admin"` Groups []string `json:"groups"` Devices []ProfileDeivceDB `json:"devices"` }
type SingleRelayDB ¶
Click to show internal directories.
Click to hide internal directories.