types

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeCreateRunner = "CreateRunner"
	EventTypeDeleteRunner = "DeleteRunner"

	AttributeHash = "hash"

	AttributeValueCategory = ModuleName
)

module event types

View Source
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
)
View Source
const (
	QueryGetRunner   = "get"
	QueryListRunners = "list"
)

Query endpoints supported by the runner querier

View Source
const (
	DefaultParamspace = ModuleName
)

Default parameter namespace

Variables

View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for instance module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

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) Type

func (msg MsgCreateRunner) Type() string

Type returns the action.

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) Type

func (msg MsgDeleteRunner) Type() string

Type returns the action.

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 NewParams

func NewParams() Params

NewParams creates a new Params object

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs - Implements params.ParamSet

func (Params) String

func (p Params) String() string

String implements the stringer interface for Params

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL