2024-01-01 15:27:59 -06:00
|
|
|
package main
|
|
|
|
|
2024-01-18 01:33:07 -06:00
|
|
|
import (
|
2024-01-21 02:42:00 -06:00
|
|
|
"go.wit.com/gui"
|
|
|
|
"go.wit.com/lib/debugger"
|
|
|
|
"go.wit.com/lib/gui/cloudflare"
|
2024-01-01 15:27:59 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
var title string = "Cloudflare DNS Control Panel"
|
|
|
|
|
|
|
|
var myGui *gui.Node
|
|
|
|
|
|
|
|
// var cloudflareURL string = "https://api.cloudflare.com/client/v4/zones/"
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
// parse the config file
|
|
|
|
readConfig()
|
|
|
|
|
|
|
|
// initialize a new GO GUI instance
|
2024-01-21 02:42:00 -06:00
|
|
|
myGui = gui.New()
|
|
|
|
myGui.Default()
|
2024-01-01 15:27:59 -06:00
|
|
|
|
|
|
|
// draw the cloudflare control panel window
|
|
|
|
win := cloudflare.MakeCloudflareWindow(myGui)
|
2024-01-21 02:42:00 -06:00
|
|
|
win.SetTitle(title)
|
2024-01-03 14:41:03 -06:00
|
|
|
win.Show()
|
2024-01-27 14:36:41 -06:00
|
|
|
win.Draw()
|
2024-01-01 15:27:59 -06:00
|
|
|
|
|
|
|
// This is just a optional goroutine to watch that things are alive
|
|
|
|
gui.Watchdog()
|
|
|
|
gui.StandardExit()
|
2024-01-21 02:42:00 -06:00
|
|
|
debugger.DebugWindow()
|
2024-01-01 15:27:59 -06:00
|
|
|
|
|
|
|
// update the config file
|
|
|
|
saveConfig()
|
|
|
|
}
|