summaryrefslogtreecommitdiff
path: root/problems.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-08 12:55:23 -0600
committerJeff Carr <[email protected]>2024-01-08 12:55:23 -0600
commitb9929490609301454eacbc4bf0358002efb680c8 (patch)
tree57891adffaa205752dafc1025988c1d6be3af841 /problems.go
parent16fe0dacddbb3f425ec43174ccd7fb347e2e310d (diff)
more debugging & smartwindow test
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'problems.go')
-rw-r--r--problems.go48
1 files changed, 48 insertions, 0 deletions
diff --git a/problems.go b/problems.go
new file mode 100644
index 0000000..f315d8b
--- /dev/null
+++ b/problems.go
@@ -0,0 +1,48 @@
+// this defines the kinds of problems that can be detected
+package main
+
+import (
+ "time"
+)
+
+type ProblemType int
+type ActionType int
+
+type Problem struct {
+ kind ProblemType
+ action ActionType
+
+ id int
+ Name string
+ value string
+ fixed bool
+ duration *time.Duration
+}
+
+/*
+var hostname Problem = (
+ kind: ProblemType.OS,
+ action: ActionType.CREATE,
+ Name: "Your /etc/hostname file is incorrect",
+ fixed: false,
+)
+*/
+
+const (
+ OS ProblemType = iota
+ ETC
+ RESOLVE
+ RR
+ PING
+ LOOKUP
+)
+
+const (
+ USER ActionType = iota
+ CREATE
+ DELETE
+)
+
+func (s Problem) String() string {
+ return s.Name
+}