Documentation ¶
Index ¶
- func GetMsgs(anys []*types.Any) ([]sdk.Msg, error)
- func SetMsgs(msgs []sdk.Msg) ([]*types.Any, error)
- func TypeURL(req proto.Message) string
- func UnpackInterfaces(unpacker types.AnyUnpacker, anys []*types.Any) error
- type AuthorizationMiddleware
- type BeginBlockerModule
- type CallInfo
- type Configurator
- type DerivedModuleKey
- func (d DerivedModuleKey) Address() sdk.AccAddress
- func (d DerivedModuleKey) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, ...) error
- func (d DerivedModuleKey) Invoker(methodName string) (types.Invoker, error)
- func (d DerivedModuleKey) ModuleID() types.ModuleID
- func (d DerivedModuleKey) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error)
- type EndBlockerModule
- type FixtureFactory
- type InvokerFactory
- type Manager
- func (mm *Manager) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) []abci.Event
- func (mm *Manager) CompleteInitialization() error
- func (mm *Manager) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) ([]abci.Event, []abci.ValidatorUpdate)
- func (mm *Manager) ExportGenesis(ctx sdk.Context) map[string]json.RawMessage
- func (mm *Manager) GetWeightedOperationsHandlers() []WeightedOperationsHandler
- func (mm *Manager) InitGenesis(ctx sdk.Context, genesisData map[string]json.RawMessage, ...) abci.ResponseInitChain
- func (mm *Manager) RegisterInvariants(ir sdk.InvariantRegistry)
- func (mm *Manager) RegisterModules(modules []module.Module) error
- func (mm *Manager) RunMigrations(ctx sdk.Context, cdc codec.Codec) error
- func (mm *Manager) SetAuthorizationMiddleware(authzFunc AuthorizationMiddleware)
- func (mm *Manager) WeightedOperations(state sdkmodule.SimulationState, modules []sdkmodule.AppModuleSimulation) []simulation.WeightedOperation
- type MigrationHandler
- type Module
- type ModuleKey
- type RegisterInvariantsHandler
- type RootModuleKey
- type WeightedOperationsHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMsgs ¶
GetMsgs takes a slice of Any's and turn them into sdk.Msg's. This is similar to what is in the cosmos-sdk sdk.Tx and could eventually be merged in.
func SetMsgs ¶
SetMsgs takes a slice of sdk.Msg's and turn them into Any's. This is similar to what is in the cosmos-sdk tx builder and could eventually be merged in.
func UnpackInterfaces ¶
func UnpackInterfaces(unpacker types.AnyUnpacker, anys []*types.Any) error
Types ¶
type AuthorizationMiddleware ¶
type AuthorizationMiddleware func(ctx sdk.Context, methodName string, req sdk.Msg, signer sdk.AccAddress) bool
AuthorizationMiddleware is a function that allows for more complex authorization than the default authorization scheme, such as delegated permissions. It will be called only if the default authorization fails.
type BeginBlockerModule ¶ added in v1.1.0
type BeginBlockerModule interface {
BeginBlock(sdk.Context, abci.RequestBeginBlock)
}
BeginBlockerModule is a module exposing begin blocker for server module manager
type Configurator ¶
type Configurator interface { sdkmodule.Configurator ModuleKey() RootModuleKey Marshaler() codec.Codec RequireServer(interface{}) RegisterInvariantsHandler(registry RegisterInvariantsHandler) RegisterGenesisHandlers(module.InitGenesisHandler, module.ExportGenesisHandler) RegisterWeightedOperationsHandler(WeightedOperationsHandler) RegisterMigrationHandler(MigrationHandler) }
type DerivedModuleKey ¶
type DerivedModuleKey struct {
// contains filtered or unexported fields
}
func (DerivedModuleKey) Address ¶
func (d DerivedModuleKey) Address() sdk.AccAddress
func (DerivedModuleKey) Invoke ¶
func (d DerivedModuleKey) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, _ ...grpc.CallOption) error
func (DerivedModuleKey) Invoker ¶
func (d DerivedModuleKey) Invoker(methodName string) (types.Invoker, error)
func (DerivedModuleKey) ModuleID ¶
func (d DerivedModuleKey) ModuleID() types.ModuleID
func (DerivedModuleKey) NewStream ¶
func (d DerivedModuleKey) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error)
type EndBlockerModule ¶ added in v1.1.0
type EndBlockerModule interface {
EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
}
EndBlockerModule is a module exposing end blocker for server module manager
type FixtureFactory ¶
type FixtureFactory struct {
// contains filtered or unexported fields
}
func NewFixtureFactory ¶
func NewFixtureFactory(t gocuke.TestingT, numSigners int) *FixtureFactory
func (*FixtureFactory) BaseApp ¶
func (ff *FixtureFactory) BaseApp() *baseapp.BaseApp
BaseApp is exposed just for compatibility of these test suites with legacy modules and can be removed when everything has been migrated to ADR 033
func (*FixtureFactory) Codec ¶
func (ff *FixtureFactory) Codec() *codec.ProtoCodec
Codec is exposed just for compatibility of these test suites with legacy modules and can be removed when everything has been migrated to ADR 033
func (*FixtureFactory) SetModules ¶
func (ff *FixtureFactory) SetModules(modules []module.Module)
func (FixtureFactory) Setup ¶
func (ff FixtureFactory) Setup() testutil.Fixture
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the server module manager It supports registration for begin and end blockers
func NewManager ¶
func NewManager(baseApp *baseapp.BaseApp, cdc *codec.ProtoCodec) *Manager
NewManager creates a new Manager
func (*Manager) BeginBlock ¶ added in v1.1.0
func (*Manager) CompleteInitialization ¶
CompleteInitialization should be the last function on the Manager called before the application starts to perform any necessary validation and initialization.
func (*Manager) EndBlock ¶ added in v1.1.0
func (mm *Manager) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) ([]abci.Event, []abci.ValidatorUpdate)
func (*Manager) ExportGenesis ¶
ExportGenesis performs export genesis functionality for modules.
func (*Manager) GetWeightedOperationsHandlers ¶
func (mm *Manager) GetWeightedOperationsHandlers() []WeightedOperationsHandler
func (*Manager) InitGenesis ¶
func (mm *Manager) InitGenesis(ctx sdk.Context, genesisData map[string]json.RawMessage, validatorUpdates []abci.ValidatorUpdate) abci.ResponseInitChain
InitGenesis performs init genesis functionality for modules. We pass in existing validatorUpdates from the sdk module Manager.InitGenesis.
func (*Manager) RegisterInvariants ¶
func (mm *Manager) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants registers all module routes and module querier routes
func (*Manager) RegisterModules ¶
RegisterModules registers modules with the Manager and registers their services.
func (*Manager) RunMigrations ¶ added in v1.1.0
RunMigrations performs state migrations for registered modules.
func (*Manager) SetAuthorizationMiddleware ¶
func (mm *Manager) SetAuthorizationMiddleware(authzFunc AuthorizationMiddleware)
SetAuthorizationMiddleware sets AuthorizationMiddleware for the Manager.
func (*Manager) WeightedOperations ¶
func (mm *Manager) WeightedOperations(state sdkmodule.SimulationState, modules []sdkmodule.AppModuleSimulation) []simulation.WeightedOperation
WeightedOperations returns all the modules' weighted operations of an application
type MigrationHandler ¶ added in v1.1.0
type Module ¶
type Module interface { module.TypeModule RegisterServices(Configurator) }
Module is the module type that all server modules must satisfy
type ModuleKey ¶
type ModuleKey interface { types.InvokerConn ModuleID() types.ModuleID Address() sdk.AccAddress }
type RegisterInvariantsHandler ¶
type RegisterInvariantsHandler func(ir sdk.InvariantRegistry)
type RootModuleKey ¶
type RootModuleKey interface { ModuleKey sdk.StoreKey Derive(path []byte) DerivedModuleKey }
type WeightedOperationsHandler ¶
type WeightedOperationsHandler func(simstate sdkmodule.SimulationState) []simulation.WeightedOperation