summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-15 19:24:48 -0600
committerJeff Carr <[email protected]>2024-01-15 19:24:48 -0600
commitfdac7e7b8944d51b8207c1797edd0be9450de7b8 (patch)
tree9e762c05ea6f716dc9434dae1e852630bd6c0ec5 /structs.go
parent94aa368cff322e667156571638a45bd3117a2739 (diff)
restore the files after garbage collectionv0.5.5
hopefully this actually is a valid git repo
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go61
1 files changed, 61 insertions, 0 deletions
diff --git a/structs.go b/structs.go
new file mode 100644
index 0000000..42fd420
--- /dev/null
+++ b/structs.go
@@ -0,0 +1,61 @@
+/*
+ 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 {
+ ready bool
+ hidden bool
+ changed bool
+
+ parent *gui.Node
+
+ ifmap map[int]*IFtype // the current interfaces
+ ipmap map[string]*IPtype // the current ip addresses
+
+ window *gadgets.BasicWindow
+ group *gui.Node
+ grid *gui.Node
+
+ hostnameStatus *gadgets.OneLiner
+ hostname *gadgets.OneLiner
+ hostshort *gadgets.OneLiner
+ domainname *gadgets.OneLiner
+ resolver *gadgets.OneLiner
+ uid *gadgets.OneLiner
+ IPv4 *gadgets.OneLiner
+ IPv6 *gadgets.OneLiner
+ workingIPv4 *gadgets.OneLiner
+ workingIPv6 *gadgets.OneLiner
+ Interfaces *gui.Node
+ speed *gadgets.OneLiner
+ 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
+}