Define constants for sign and revoke actions
This commit is contained in:
parent
cee1430913
commit
72e921ec1b
1 changed files with 9 additions and 1 deletions
|
@ -4,12 +4,20 @@ import "encoding/binary"
|
||||||
|
|
||||||
type Action uint8
|
type Action uint8
|
||||||
|
|
||||||
const ActionNul = Action(0)
|
const (
|
||||||
|
ActionNul = Action(0)
|
||||||
|
ActionSign = Action(1)
|
||||||
|
ActionRevoke = Action(2)
|
||||||
|
)
|
||||||
|
|
||||||
func (a Action) String() string {
|
func (a Action) String() string {
|
||||||
switch a {
|
switch a {
|
||||||
case ActionNul:
|
case ActionNul:
|
||||||
return "NUL"
|
return "NUL"
|
||||||
|
case ActionSign:
|
||||||
|
return "SIGN"
|
||||||
|
case ActionRevoke:
|
||||||
|
return "REVOKE"
|
||||||
default:
|
default:
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue