Documentation
¶
Index ¶
Constants ¶
const ( EventTypeCreateRunner = "CreateRunner" EventTypeDeleteRunner = "DeleteRunner" AttributeHash = "hash" AttributeValueCategory = ModuleName )
module event types
const ( // ModuleName is the name of the module ModuleName = "runner" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierRoute to be used for routing QuerierRoute = ModuleName )
const ( QueryGetRunner = "get" QueryListRunners = "list" )
Query endpoints supported by the runner querier
const (
DefaultParamspace = ModuleName
)
Default parameter namespace
Variables ¶
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the instance genesis parameters
Types ¶
type GenesisState ¶
type GenesisState struct{}
GenesisState - all instance state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState - default GenesisState used by Cosmos Hub
func NewGenesisState ¶
func NewGenesisState() GenesisState
NewGenesisState creates a new GenesisState object
type InstanceKeeper ¶
type InstanceKeeper interface {
FetchOrCreate(ctx sdk.Context, serviceHash hash.Hash, envHash hash.Hash) (*instance.Instance, error)
}
InstanceKeeper module interface.
type MsgCreateRunner ¶
type MsgCreateRunner struct {
Address sdk.AccAddress `json:"address" validate:"required,accaddress"`
ServiceHash hash.Hash `json:"serviceHash" validate:"required,hash"`
EnvHash hash.Hash `json:"envHash" validate:"omitempty,hash"`
}
MsgCreateRunner defines a state transition to create a runner.
func NewMsgCreateRunner ¶
func NewMsgCreateRunner(address sdk.AccAddress, serviceHash hash.Hash, envHash hash.Hash) *MsgCreateRunner
NewMsgCreateRunner is a constructor function for MsgCreateRunner.
func (MsgCreateRunner) GetSignBytes ¶
func (msg MsgCreateRunner) GetSignBytes() []byte
GetSignBytes encodes the message for signing.
func (MsgCreateRunner) GetSigners ¶
func (msg MsgCreateRunner) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (MsgCreateRunner) Route ¶
func (msg MsgCreateRunner) Route() string
Route should return the name of the module route.
func (MsgCreateRunner) ValidateBasic ¶
func (msg MsgCreateRunner) ValidateBasic() error
ValidateBasic runs stateless checks on the message.
type MsgDeleteRunner ¶
type MsgDeleteRunner struct {
Address sdk.AccAddress `json:"address" validate:"required,accaddress"`
RunnerHash hash.Hash `json:"runnerHash" validate:"required,hash"`
}
MsgDeleteRunner defines a state transition to delete a runner.
func NewMsgDeleteRunner ¶
func NewMsgDeleteRunner(address sdk.AccAddress, runnerHash hash.Hash) *MsgDeleteRunner
NewMsgDeleteRunner is a constructor function for MsgDeleteRunner.
func (MsgDeleteRunner) GetSignBytes ¶
func (msg MsgDeleteRunner) GetSignBytes() []byte
GetSignBytes encodes the message for signing.
func (MsgDeleteRunner) GetSigners ¶
func (msg MsgDeleteRunner) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (MsgDeleteRunner) Route ¶
func (msg MsgDeleteRunner) Route() string
Route should return the name of the module.
func (MsgDeleteRunner) ValidateBasic ¶
func (msg MsgDeleteRunner) ValidateBasic() error
ValidateBasic runs stateless checks on the message.
type ParamSubspace ¶
type ParamSubspace interface {
WithKeyTable(table params.KeyTable) params.Subspace
Get(ctx sdk.Context, key []byte, ptr interface{})
GetParamSet(ctx sdk.Context, ps params.ParamSet)
SetParamSet(ctx sdk.Context, ps params.ParamSet)
}
ParamSubspace defines the expected Subspace interfacace
type Params ¶
type Params struct{}
Params - used for initializing default parameter for instance at genesis
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
ParamSetPairs - Implements params.ParamSet