summaryrefslogtreecommitdiff
path: root/problems.go
blob: f315d8b1e3284032bba74483b705d0d0e3f89cb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
}