Skip to content

Commit

Permalink
Address PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alandotcom authored and bitfield committed Aug 31, 2019
1 parent e52db0b commit 056da22
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pkg/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ const StatusPaused = 0
// status when calling EditMonitor.
const StatusResumed = 1

// Status corresponds to the reported status of a monitor from the uptimerobot API
type Status int

// Status codes for each possible monitor status returned by uptimerobot
const (
Up Status = 2
Down Status = 9
Expand All @@ -59,6 +61,14 @@ const (
Paused Status = 0
)

var statuses = map[Status]string{
Up: "Up",
Down: "Down",
MaybeDown: "Maybe Down",
Unknown: "Not Checked",
Paused: "Paused",
}

func (s Status) String() string {
statuses := map[Status]string{
Up: "Up",
Expand All @@ -74,4 +84,4 @@ func (s Status) String() string {
}
return statusString

}
}

0 comments on commit 056da22

Please sign in to comment.