Documentation
¶
Index ¶
- Constants
- Variables
- func AddGenesisGuardianCmd(ctx *server.Context, cdc *codec.Codec, defaultNodeHome string) *cobra.Command
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- func NewQuerier(k Keeper) sdk.Querier
- type AppModule
- func (a AppModule) BeginBlock(sdk.Context, types.RequestBeginBlock)
- func (a AppModule) EndBlock(ctx sdk.Context, b types.RequestEndBlock) []types.ValidatorUpdate
- func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (a AppModule) InitGenesis(ctx sdk.Context, d json.RawMessage) []types.ValidatorUpdate
- func (a AppModule) NewHandler() sdk.Handler
- func (a AppModule) NewQuerierHandler() sdk.Querier
- func (a AppModule) QuerierRoute() string
- func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)
- func (a AppModule) Route() string
- type AppModuleBasic
- func (a AppModuleBasic) DefaultGenesis() json.RawMessage
- func (a AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (a AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (a AppModuleBasic) Name() string
- func (a AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (a AppModuleBasic) RegisterRESTRoutes(context.CLIContext, *mux.Router)
- func (a AppModuleBasic) ValidateGenesis(d json.RawMessage) error
- type GenesisState
- type Guardian
- type Keeper
- func (k Keeper) AddProfiler(ctx sdk.Context, guardian Guardian) error
- func (k Keeper) DeleteProfiler(ctx sdk.Context, address sdk.AccAddress) error
- func (k Keeper) GetProfiler(ctx sdk.Context, addr sdk.AccAddress) (guardian Guardian, found bool)
- func (k Keeper) ProfilersIterator(ctx sdk.Context) sdk.Iterator
- type MsgAddProfiler
- type MsgDeleteProfiler
- type Profilers
Constants ¶
const ( Genesis = types.Genesis Ordinary = types.Ordinary ModuleName = types.ModuleName RouterKey = types.RouterKey QuerierRoute = types.QuerierRoute QueryProfilers = types.QueryProfilers StoreKey = types.StoreKey )
Variables ¶
var ( NewMsgAddProfiler = types.NewMsgAddProfiler NewMsgDeleteProfiler = types.NewMsgDeleteProfiler NewGuardian = types.NewGuardian GetProfilerKey = types.GetProfilerKey GetProfilersSubspaceKey = types.GetProfilersSubspaceKey ErrInvalidOperator = types.ErrInvalidOperator ErrProfilerNotExists = types.ErrProfilerNotExists ErrDeleteGenesisProfiler = types.ErrDeleteGenesisProfiler ErrProfilerExists = types.ErrProfilerExists ErrInvalidDescription = types.ErrInvalidDescription ErrAddressEmpty = types.ErrAddressEmpty ErrAddedByEmpty = types.ErrAddedByEmpty ErrDeletedByEmpty = types.ErrDeletedByEmpty )
Functions ¶
func AddGenesisGuardianCmd ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
func NewHandler ¶
func NewQuerier ¶
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements an application module for the guardian module.
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (a AppModule) BeginBlock(sdk.Context, types.RequestBeginBlock)
BeginBlock returns the begin blocker for the guardian module.
func (AppModule) EndBlock ¶
func (a AppModule) EndBlock(ctx sdk.Context, b types.RequestEndBlock) []types.ValidatorUpdate
EndBlock returns the end blocker for the guardian module. It returns no validator updates.
func (AppModule) ExportGenesis ¶
func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
ExportGenesis returns the exported genesis state as raw bytes for the guardian module.
func (AppModule) InitGenesis ¶
func (a AppModule) InitGenesis(ctx sdk.Context, d json.RawMessage) []types.ValidatorUpdate
InitGenesis performs genesis initialization for the guardian module. It returns no validator updates.
func (AppModule) NewHandler ¶
NewHandler returns an sdk.Handler for the guardian module.
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns no sdk.Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute returns the guardian module's querier route name.
func (AppModule) RegisterInvariants ¶
func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)
RegisterInvariants registers module invariants
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic defines the basic application module used by the guardian module.
func (AppModuleBasic) DefaultGenesis ¶
func (a AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the guardian module.
func (AppModuleBasic) GetQueryCmd ¶
func (a AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
GetQueryCmd returns the root query command for the guardian module.
func (AppModuleBasic) GetTxCmd ¶
func (a AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command
func (AppModuleBasic) Name ¶
func (a AppModuleBasic) Name() string
Name returns the guardian module's name.
func (AppModuleBasic) RegisterCodec ¶
func (a AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec registers the guardian module's types for the given codec.
func (AppModuleBasic) RegisterRESTRoutes ¶
func (a AppModuleBasic) RegisterRESTRoutes(context.CLIContext, *mux.Router)
RegisterRESTRoutes registers the REST routes
func (AppModuleBasic) ValidateGenesis ¶
func (a AppModuleBasic) ValidateGenesis(d json.RawMessage) error
ValidateGenesis performs genesis state validation
type GenesisState ¶
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
func NewGenesisState ¶
func NewGenesisState(profilers []types.Guardian) GenesisState
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the guardian store
func (Keeper) DeleteProfiler ¶
func (Keeper) GetProfiler ¶
type MsgAddProfiler ¶
type MsgAddProfiler = types.MsgAddProfiler
type MsgDeleteProfiler ¶
type MsgDeleteProfiler = types.MsgDeleteProfiler