Define constants for sign and revoke actions

This commit is contained in:
Jan Dittberner 2021-01-04 08:15:02 +01:00
parent cee1430913
commit 72e921ec1b

View file

@ -4,12 +4,20 @@ import "encoding/binary"
type Action uint8
const ActionNul = Action(0)
const (
ActionNul = Action(0)
ActionSign = Action(1)
ActionRevoke = Action(2)
)
func (a Action) String() string {
switch a {
case ActionNul:
return "NUL"
case ActionSign:
return "SIGN"
case ActionRevoke:
return "REVOKE"
default:
return "unknown"
}