mirror of
https://github.com/ProtonMail/go-proton-api.git
synced 2025-12-23 23:57:50 -05:00
24 lines
260 B
Go
24 lines
260 B
Go
package proton
|
|
|
|
type Status int
|
|
|
|
const (
|
|
StatusUp Status = iota
|
|
StatusDown
|
|
)
|
|
|
|
func (s Status) String() string {
|
|
switch s {
|
|
case StatusUp:
|
|
return "up"
|
|
|
|
case StatusDown:
|
|
return "down"
|
|
|
|
default:
|
|
return "unknown"
|
|
}
|
|
}
|
|
|
|
type StatusObserver func(Status)
|