summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-01-16 18:43:24 +0100
committerRuben Pollan <meskio@sindominio.net>2018-01-16 18:43:24 +0100
commit7026e1fed7dbcb23a6e85c0494484e6636388006 (patch)
tree9820d72a1630daafdb51aa8f0dead4dd25938f37 /main.go
[feat] Dummy implementation of the systray
Diffstat (limited to 'main.go')
-rw-r--r--main.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..b47df4c
--- /dev/null
+++ b/main.go
@@ -0,0 +1,40 @@
+package main
+
+import (
+ "time"
+)
+
+var ch chan string
+
+func main() {
+ go notificate()
+
+ ch = make(chan string)
+ run(ch)
+}
+
+func startVPN() {
+ go func() {
+ ch <- "starting"
+ time.Sleep(time.Second * 5)
+ ch <- "on"
+ }()
+}
+
+func cancelVPN() {
+ go func() {
+ ch <- "stopping"
+ time.Sleep(time.Second * 5)
+ ch <- "off"
+ }()
+}
+
+func stopVPN() {
+ go func() {
+ ch <- "failed"
+ }()
+}
+
+func getVPNStatus() string {
+ return "off"
+}