Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type AuthDecorator
- type Keeper
- func (k Keeper) Access(ctx sdk.Context, signer sdk.AccAddress, auth types.Auth) error
- func (k Keeper) AccountBlockList(c context.Context, req *types.QueryBlockListRequest) (*types.QueryBlockListResponse, error)
- func (k *Keeper) Authorize(ctx sdk.Context, address, operator sdk.AccAddress, rs ...types.Role) error
- func (k Keeper) Block(ctx sdk.Context, address sdk.AccAddress) error
- func (k Keeper) BlockContract(ctx sdk.Context, contractAddress string) error
- func (k Keeper) ContractDenyList(c context.Context, req *types.QueryContractDenyList) (*types.QueryContractDenyListResponse, error)
- func (k Keeper) DeleteAuth(ctx sdk.Context, address sdk.AccAddress)
- func (k Keeper) GetAllBlockAccounts(ctx sdk.Context) (accounts []string)
- func (k Keeper) GetAuth(ctx sdk.Context, address sdk.AccAddress) types.Auth
- func (k Keeper) GetBlockAccount(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) GetBlockContract(ctx sdk.Context, address []byte) bool
- func (k Keeper) GetContractDenyList(ctx sdk.Context) (accounts []string)
- func (k Keeper) GetRoles(ctx sdk.Context) (roleAccounts []types.RoleAccount)
- func (k Keeper) IsAdmin(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IsAdminPerm(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IsBaseM1Admin(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IsPermAdmin(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IsPlatformUser(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IsPowerAdminPerm(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IsPowerUserAdmin(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IsRootAdmin(ctx sdk.Context, address sdk.AccAddress) bool
- func (k *Keeper) RegisterModuleAuth(module string, roles ...types.Role)
- func (k Keeper) RegisterMsgAuth(msg sdk.Msg, roles ...types.Role)
- func (k Keeper) Roles(c context.Context, req *types.QueryRolesRequest) (*types.QueryRolesResponse, error)
- func (k Keeper) SetAuth(ctx sdk.Context, address sdk.AccAddress, auth types.Auth)
- func (k Keeper) Unauthorize(ctx sdk.Context, address, operator sdk.AccAddress, roles ...types.Role) error
- func (k Keeper) Unblock(ctx sdk.Context, address sdk.AccAddress) error
- func (k Keeper) UnblockContract(ctx sdk.Context, contractAddress string) error
Constants ¶
const DefaultLimit = 100
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the perm MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a querier for perm REST endpoints
Types ¶
type AuthDecorator ¶
type AuthDecorator struct {
// contains filtered or unexported fields
}
func NewAuthDecorator ¶
func NewAuthDecorator(k Keeper) AuthDecorator
func (AuthDecorator) AnteHandle ¶
func (ad AuthDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle returns an AnteHandler that checks the auth to send msg
type Keeper ¶
keeper of the perm store
func (Keeper) AccountBlockList ¶
func (k Keeper) AccountBlockList(c context.Context, req *types.QueryBlockListRequest) (*types.QueryBlockListResponse, error)
AccountBlockList queries all blocked accounts
func (*Keeper) Authorize ¶
func (k *Keeper) Authorize(ctx sdk.Context, address, operator sdk.AccAddress, rs ...types.Role) error
Authorize assigns the specified roles to an address
func (Keeper) BlockContract ¶
BlockContract blocks a contract
func (Keeper) ContractDenyList ¶
func (k Keeper) ContractDenyList(c context.Context, req *types.QueryContractDenyList) (*types.QueryContractDenyListResponse, error)
ContractDenyList queries all blocked contract
func (Keeper) DeleteAuth ¶
func (k Keeper) DeleteAuth(ctx sdk.Context, address sdk.AccAddress)
DeleteAuth deletes the auth for an address
func (Keeper) GetAllBlockAccounts ¶
GetAllBlockAccounts gets the set of all accounts with no limits, used durng genesis dump
func (Keeper) GetBlockAccount ¶
GetBlockAccount return an account blocked
func (Keeper) GetBlockContract ¶
GetBlockContract return a contract blocked
func (Keeper) GetContractDenyList ¶
GetContractDenyList gets the set of all contract with no limits, used durng genesis dump
func (Keeper) GetRoles ¶
func (k Keeper) GetRoles(ctx sdk.Context) (roleAccounts []types.RoleAccount)
GetRoles gets the role set for all accounts
func (Keeper) IsAdminPerm ¶
func (Keeper) IsBaseM1Admin ¶
func (Keeper) IsPermAdmin ¶
func (Keeper) IsPlatformUser ¶
func (Keeper) IsPowerAdminPerm ¶
func (Keeper) IsPowerUserAdmin ¶
func (Keeper) IsRootAdmin ¶
func (*Keeper) RegisterModuleAuth ¶
RegisterModuleAuth registers the auth to send the module related msgs. Each role gets the access control
func (Keeper) RegisterMsgAuth ¶
RegisterMsgAuth registers the auth to send the msg. Each role gets the access control
func (Keeper) Roles ¶
func (k Keeper) Roles(c context.Context, req *types.QueryRolesRequest) (*types.QueryRolesResponse, error)
Roles queries roles of a given address
func (Keeper) Unauthorize ¶
func (k Keeper) Unauthorize(ctx sdk.Context, address, operator sdk.AccAddress, roles ...types.Role) error
Unauthorize unassigns the specified roles from an address