summaryrefslogtreecommitdiff
path: root/linuxstatus/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 05:24:11 -0600
committerJeff Carr <[email protected]>2024-01-06 05:24:11 -0600
commit4529b473dc12d8a4d1b49c9ee1ba89897f86d616 (patch)
tree20cdc5bd7c644e3fb8d7afa8e7b872b1f2082684 /linuxstatus/structs.go
parenta808bb55189a44d0c3b2965805c14644f8102cca (diff)
add LinuxStatus()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'linuxstatus/structs.go')
-rw-r--r--linuxstatus/structs.go57
1 files changed, 57 insertions, 0 deletions
diff --git a/linuxstatus/structs.go b/linuxstatus/structs.go
new file mode 100644
index 0000000..185f0d7
--- /dev/null
+++ b/linuxstatus/structs.go
@@ -0,0 +1,57 @@
+/*
+ figures out if your hostname is valid
+ then checks if your DNS is setup correctly
+*/
+
+package linuxstatus
+
+import (
+ "net"
+ "go.wit.com/gui/gui"
+ "go.wit.com/gui/gadgets"
+)
+
+var me *LinuxStatus
+
+type LinuxStatus struct {
+ init bool
+ ready bool
+ hidden bool
+ changed bool
+
+ ifmap map[int]*IFtype // the current interfaces
+ ipmap map[string]*IPtype // the current ip addresses
+
+ window *gadgets.BasicWindow
+ group *gui.Node
+ grid *gui.Node
+
+ hostshort *gadgets.OneLiner
+ domainname *gadgets.OneLiner
+ fqdn *gadgets.OneLiner
+ NSrr *gadgets.OneLiner
+ uid *gadgets.OneLiner
+ IPv4 *gadgets.OneLiner
+ IPv6 *gadgets.OneLiner
+ workingIPv6 *gadgets.OneLiner
+ Interfaces *gui.Node
+ speedActual *gadgets.OneLiner
+
+}
+
+type IPtype struct {
+ gone bool // used to track if the ip exists
+ ipv6 bool // the future
+ ipv4 bool // the past
+ LinkLocal bool
+ iface *net.Interface
+ ip net.IP
+ ipnet *net.IPNet
+}
+
+type IFtype struct {
+ gone bool // used to track if the interface exists
+ name string // just a shortcut to the name. maybe this is dumb
+ // up bool // could be used to track ifup/ifdown
+ iface *net.Interface
+}