forked from OpenPDU/openpdu
52 lines
688 B
Go
52 lines
688 B
Go
package main
|
|
|
|
// Dictionary definition
|
|
type Dictionary map[string]interface{}
|
|
|
|
func initOutlets() {
|
|
for _, o := range TheConfig.Outlets {
|
|
o.PowerInitial()
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
var err error
|
|
|
|
var c1 Configuration
|
|
|
|
c1 = createMockConfig()
|
|
|
|
err = saveConfig(c1, "t.json")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
TheConfig, err = loadConfig("t.json")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
err = saveConfig(TheConfig, "t1.json")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
startServer()
|
|
|
|
}
|
|
|
|
// https://github.com/ColorlibHQ/AdminLTE/archive/v2.4.17.tar.gz
|
|
|
|
/* TODO
|
|
|
|
- config reset gpio
|
|
- classi per board
|
|
- classi per outlet
|
|
- fai funzionare toggle
|
|
- scan i2c
|
|
- impostazioni log
|
|
- impostazioni mqtt
|
|
|
|
|
|
*/
|