Documentation ¶
Index ¶
- Variables
- func NewAppModule() types.AppModule
- type AppModule
- type AppModuleBasic
- func (amb AppModuleBasic) DefaultGenesis() json.RawMessage
- func (amb AppModuleBasic) GetMapperAndHooks() types.MapperWithHooks
- func (amb AppModuleBasic) GetQueryCmds(cdc *amino.Codec) []*cobra.Command
- func (amb AppModuleBasic) GetTxCmds(cdc *amino.Codec) []*cobra.Command
- func (amb AppModuleBasic) Name() string
- func (amb AppModuleBasic) RegisterCodec(cdc *amino.Codec)
- func (amb AppModuleBasic) RegisterRestRoutes(ctx cliContext.CLIContext, routes *mux.Router)
- func (amb AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type Mapper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModuleName = "params" RegisterCodec = types.RegisterCodec MapperName = mapper.MapperName NewMapper = mapper.NewMapper GetMapper = mapper.GetMapper BuildParamKey = mapper.BuildParamKey ErrInvalidParam = types.ErrInvalidParam )
Functions ¶
func NewAppModule ¶
Types ¶
type AppModule ¶
type AppModule struct {
AppModuleBasic
}
模块结构
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx context.Context) json.RawMessage
导出状态数据
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, data json.RawMessage) []abci.ValidatorUpdate
初始化本模块
type AppModuleBasic ¶
type AppModuleBasic struct{}
基础模块结构
func (AppModuleBasic) DefaultGenesis ¶
func (amb AppModuleBasic) DefaultGenesis() json.RawMessage
默认初始状态数据
func (AppModuleBasic) GetMapperAndHooks ¶
func (amb AppModuleBasic) GetMapperAndHooks() types.MapperWithHooks
返回数据库操作 Mapper
func (AppModuleBasic) GetQueryCmds ¶
func (amb AppModuleBasic) GetQueryCmds(cdc *amino.Codec) []*cobra.Command
返回查询命令集合
func (AppModuleBasic) GetTxCmds ¶
func (amb AppModuleBasic) GetTxCmds(cdc *amino.Codec) []*cobra.Command
返回交易命令集合
func (AppModuleBasic) RegisterCodec ¶
func (amb AppModuleBasic) RegisterCodec(cdc *amino.Codec)
amino 相关类/对象注册
func (AppModuleBasic) RegisterRestRoutes ¶ added in v0.0.8
func (amb AppModuleBasic) RegisterRestRoutes(ctx cliContext.CLIContext, routes *mux.Router)
func (AppModuleBasic) ValidateGenesis ¶
func (amb AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
校验初始状态数据
Click to show internal directories.
Click to hide internal directories.