Documentation
¶
Index ¶
Constants ¶
const ( EventTypeCreateProcess = "CreateProcess" EventTypeDeleteProcess = "DeleteProcess" AttributeHash = "hash" AttributeValueCategory = ModuleName )
module event types
const ( // ModuleName is the name of the module ModuleName = "process" // 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 ( QueryGetProcess = "get" QueryListProcesses = "list" )
Query endpoints supported by the process 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 BankKeeper ¶ added in v0.20.0
type BankKeeper interface {
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
}
BankKeeper module interface.
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 {
Get(ctx sdk.Context, instanceHash hash.Hash) (*instancepb.Instance, error)
}
InstanceKeeper module interface.
type MsgCreateProcess ¶
type MsgCreateProcess struct {
Owner sdk.AccAddress `json:"address" validate:"required,accaddress"`
Request *api.CreateProcessRequest `json:"request" validate:"required"`
}
MsgCreateProcess defines a state transition to create a process.
func NewMsgCreateProcess ¶
func NewMsgCreateProcess(owner sdk.AccAddress, request *api.CreateProcessRequest) *MsgCreateProcess
NewMsgCreateProcess is a constructor function for MsgCreateProcess.
func (MsgCreateProcess) GetSignBytes ¶
func (msg MsgCreateProcess) GetSignBytes() []byte
GetSignBytes encodes the message for signing.
func (MsgCreateProcess) GetSigners ¶
func (msg MsgCreateProcess) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (MsgCreateProcess) Route ¶
func (msg MsgCreateProcess) Route() string
Route should return the name of the module route.
func (MsgCreateProcess) ValidateBasic ¶
func (msg MsgCreateProcess) ValidateBasic() error
ValidateBasic runs stateless checks on the message.
type MsgDeleteProcess ¶
type MsgDeleteProcess struct {
Owner sdk.AccAddress `json:"address" validate:"required,accaddress"`
Request *api.DeleteProcessRequest `json:"request" validate:"required"`
}
MsgDeleteProcess defines a state transition to delete a process.
func NewMsgDeleteProcess ¶
func NewMsgDeleteProcess(owner sdk.AccAddress, request *api.DeleteProcessRequest) *MsgDeleteProcess
NewMsgDeleteProcess is a constructor function for MsgDeleteProcess.
func (MsgDeleteProcess) GetSignBytes ¶
func (msg MsgDeleteProcess) GetSignBytes() []byte
GetSignBytes encodes the message for signing.
func (MsgDeleteProcess) GetSigners ¶
func (msg MsgDeleteProcess) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (MsgDeleteProcess) Route ¶
func (msg MsgDeleteProcess) Route() string
Route should return the name of the module.
func (MsgDeleteProcess) ValidateBasic ¶
func (msg MsgDeleteProcess) ValidateBasic() error
ValidateBasic runs stateless checks on the message.
type OwnershipKeeper ¶
type OwnershipKeeper interface {
Delete(ctx sdk.Context, owner sdk.AccAddress, resourceHash hash.Hash) error
Set(ctx sdk.Context, owner sdk.AccAddress, resourceHash hash.Hash, resource ownershippb.Ownership_Resource, resourceAddress sdk.AccAddress) (*ownershippb.Ownership, error)
}
OwnershipKeeper module interface.
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