loglist: add some helper functions
This commit is contained in:
parent
4b280bdcd2
commit
1a7622bfa6
|
@ -71,6 +71,14 @@ type State struct {
|
||||||
} `json:"rejected"`
|
} `json:"rejected"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (state *State) IsApproved() bool {
|
||||||
|
return state.Qualified != nil || state.Usable != nil || state.Readonly != nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (state *State) WasApprovedAt(t time.Time) bool {
|
||||||
|
return state.Retired != nil && t.Before(state.Retired.Timestamp)
|
||||||
|
}
|
||||||
|
|
||||||
type LogType string
|
type LogType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in New Issue