1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
2017-06-23 16:41:14 +02:00

34 lines
445 B
Go

package main
import (
"time"
)
const (
STATE_INIT = iota
STATE_READY
STATE_UPDATING
STATE_ERROR
)
type StoreStatus struct {
LastRefresh time.Time
LastError error
State int
}
// Helper: stateToString
func stateToString(state int) string {
switch state {
case STATE_INIT:
return "INIT"
case STATE_READY:
return "READY"
case STATE_UPDATING:
return "UPDATING"
case STATE_ERROR:
return "ERROR"
}
return "INVALID"
}