types

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventType = "runner"

	AttributeKeyHash     = "hash"
	AttributeKeyAddress  = "address"
	AttributeKeyInstance = "instance"

	AttributeActionCreated = "created"
	AttributeActionDeleted = "deleted"
)

module event types and attributes

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 (
	QueryGet   = "get"
	QueryList  = "list"
	QueryExist = "exist"
)

Query endpoints supported by the runner querier

Variables

View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec

Functions

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 {
	Runners []*runner.Runner `json:"runners" yaml:"runners" validate:"dive"`
}

GenesisState - all instance state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState is the default GenesisState

func NewGenesisState

func NewGenesisState(execs []*runner.Runner) 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 MsgCreate added in v0.21.0

type MsgCreate struct {
	// The Runner's owner.
	Owner github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 149-byte string literal not displayed */
	// Service's hash to start the runner with.
	ServiceHash github_com_mesg_foundation_engine_hash.Hash `` /* 153-byte string literal not displayed */
	// Hash of the customized environmental variables (not the ones in the service configuration).
	EnvHash              github_com_mesg_foundation_engine_hash.Hash `` /* 146-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                                    `json:"-"`
	XXX_unrecognized     []byte                                      `json:"-"`
	XXX_sizecache        int32                                       `json:"-"`
}

The message to create a Runner.

func (*MsgCreate) Descriptor added in v0.21.0

func (*MsgCreate) Descriptor() ([]byte, []int)

func (*MsgCreate) GetEnvHash added in v0.21.0

func (*MsgCreate) GetOwner added in v0.21.0

func (*MsgCreate) GetServiceHash added in v0.21.0

func (MsgCreate) GetSignBytes added in v0.21.0

func (msg MsgCreate) GetSignBytes() []byte

GetSignBytes encodes the message for signing.

func (MsgCreate) GetSigners added in v0.21.0

func (msg MsgCreate) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required.

func (*MsgCreate) ProtoMessage added in v0.21.0

func (*MsgCreate) ProtoMessage()

func (*MsgCreate) Reset added in v0.21.0

func (m *MsgCreate) Reset()

func (MsgCreate) Route added in v0.21.0

func (msg MsgCreate) Route() string

Route should return the name of the module route.

func (*MsgCreate) String added in v0.21.0

func (m *MsgCreate) String() string

func (MsgCreate) Type added in v0.21.0

func (msg MsgCreate) Type() string

Type returns the action.

func (MsgCreate) ValidateBasic added in v0.21.0

func (msg MsgCreate) ValidateBasic() error

ValidateBasic runs stateless checks on the message.

func (*MsgCreate) XXX_DiscardUnknown added in v0.21.0

func (m *MsgCreate) XXX_DiscardUnknown()

func (*MsgCreate) XXX_Marshal added in v0.21.0

func (m *MsgCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreate) XXX_Merge added in v0.21.0

func (m *MsgCreate) XXX_Merge(src proto.Message)

func (*MsgCreate) XXX_Size added in v0.21.0

func (m *MsgCreate) XXX_Size() int

func (*MsgCreate) XXX_Unmarshal added in v0.21.0

func (m *MsgCreate) XXX_Unmarshal(b []byte) error

type MsgDelete added in v0.21.0

type MsgDelete struct {
	// The Runner's owner.
	Owner github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 149-byte string literal not displayed */
	// Runner's hash
	Hash                 github_com_mesg_foundation_engine_hash.Hash `` /* 139-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                                    `json:"-"`
	XXX_unrecognized     []byte                                      `json:"-"`
	XXX_sizecache        int32                                       `json:"-"`
}

The message to delete a Runner.

func (*MsgDelete) Descriptor added in v0.21.0

func (*MsgDelete) Descriptor() ([]byte, []int)

func (*MsgDelete) GetHash added in v0.21.0

func (*MsgDelete) GetOwner added in v0.21.0

func (MsgDelete) GetSignBytes added in v0.21.0

func (msg MsgDelete) GetSignBytes() []byte

GetSignBytes encodes the message for signing.

func (MsgDelete) GetSigners added in v0.21.0

func (msg MsgDelete) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required.

func (*MsgDelete) ProtoMessage added in v0.21.0

func (*MsgDelete) ProtoMessage()

func (*MsgDelete) Reset added in v0.21.0

func (m *MsgDelete) Reset()

func (MsgDelete) Route added in v0.21.0

func (msg MsgDelete) Route() string

Route should return the name of the module.

func (*MsgDelete) String added in v0.21.0

func (m *MsgDelete) String() string

func (MsgDelete) Type added in v0.21.0

func (msg MsgDelete) Type() string

Type returns the action.

func (MsgDelete) ValidateBasic added in v0.21.0

func (msg MsgDelete) ValidateBasic() error

ValidateBasic runs stateless checks on the message.

func (*MsgDelete) XXX_DiscardUnknown added in v0.21.0

func (m *MsgDelete) XXX_DiscardUnknown()

func (*MsgDelete) XXX_Marshal added in v0.21.0

func (m *MsgDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgDelete) XXX_Merge added in v0.21.0

func (m *MsgDelete) XXX_Merge(src proto.Message)

func (*MsgDelete) XXX_Size added in v0.21.0

func (m *MsgDelete) XXX_Size() int

func (*MsgDelete) XXX_Unmarshal added in v0.21.0

func (m *MsgDelete) XXX_Unmarshal(b []byte) error

type OwnershipKeeper added in v0.20.0

type OwnershipKeeper interface {
	Set(ctx sdk.Context, owner sdk.AccAddress, resourceHash hash.Hash, resource ownershippb.Ownership_Resource, resourceAddress sdk.AccAddress) (*ownershippb.Ownership, error)
	Delete(ctx sdk.Context, owner sdk.AccAddress, resourceHash hash.Hash) error
}

OwnershipKeeper module interface.

Jump to

Keyboard shortcuts

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