23 lines
256 B
Go
23 lines
256 B
Go
|
package voter
|
||
|
|
||
|
type Decision int
|
||
|
|
||
|
const (
|
||
|
Allow Decision = iota
|
||
|
Deny
|
||
|
Abstain
|
||
|
)
|
||
|
|
||
|
func AsString(d Decision) string {
|
||
|
switch d {
|
||
|
case Allow:
|
||
|
return "allow"
|
||
|
case Deny:
|
||
|
return "deny"
|
||
|
case Abstain:
|
||
|
return "abstain"
|
||
|
default:
|
||
|
return "unknown"
|
||
|
}
|
||
|
}
|