tendermint/permission/types/snatives.go

24 lines
638 B
Go
Raw Normal View History

2015-06-19 23:53:21 -07:00
package types
const (
// first 32 bits of BasePermission are for chain, second 32 are for snative
FirstSNativePermFlag PermFlag = 1 << 32
2015-06-19 23:53:21 -07:00
)
// we need to reset iota with no const block
const (
// each snative has an associated permission flag
HasBasePerm PermFlag = FirstSNativePermFlag << iota
2015-06-19 23:53:21 -07:00
SetBasePerm
UnsetBasePerm
SetGlobalPerm
ClearBasePerm
HasRole
AddRole
RmRole
NumSNativePermissions uint = 8 // NOTE adjust this too
2015-06-19 23:53:21 -07:00
TopSNativePermFlag PermFlag = FirstSNativePermFlag << (NumSNativePermissions - 1)
AllSNativePermFlags PermFlag = (TopSNativePermFlag | (TopSNativePermFlag - 1)) &^ (FirstSNativePermFlag - 1)
2015-06-19 23:53:21 -07:00
)