types

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventType = "execution"

	AttributeKeyHash     = "hash"
	AttributeKeyAddress  = "address"
	AttributeKeyExecutor = "executor"
	AttributeKeyProcess  = "process"
	AttributeKeyInstance = "instance"

	AttributeActionProposed  = "proposed"
	AttributeActionCreated   = "created"
	AttributeActionCompleted = "completed"
	AttributeActionFailed    = "failed"
)

module event types and attributes

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "execution"

	// 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 (
	DefaultParamspace = ModuleName
	DefaultMinPrice   = "10000atto"
)

Default parameter namespace

View Source
const (
	QueryGet        = "get"
	QueryList       = "list"
	QueryParameters = "parameters"
)

Querier names

Variables

View Source
var (
	// KeyMinPrice key for the parameter MinPrice
	KeyMinPrice = []byte("MinPrice")
)
View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec

Functions

func ParamKeyTable

func ParamKeyTable() subspace.KeyTable

ParamKeyTable for auth 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 BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	InputOutputCoins(ctx sdk.Context, inputs []bank.Input, outputs []bank.Output) error
}

BankKeeper module interface.

type GenesisState

type GenesisState struct {
	Params Params `json:"params" yaml:"params"`
}

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(params Params) 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 ListFilter added in v0.25.0

type ListFilter struct {
	ParentHash   hash.Hash        `json:"parentHash"`
	EventHash    hash.Hash        `json:"eventHash"`
	InstanceHash hash.Hash        `json:"instanceHash"`
	ProcessHash  hash.Hash        `json:"processHash"`
	Status       execution.Status `json:"status"`
	NodeKey      string           `json:"nodeKey"`
}

ListFilter available for the List

func (ListFilter) Match added in v0.25.0

func (f ListFilter) Match(exec *execution.Execution) bool

Match returns true if an execution matches a specific filter

type MsgCreate added in v0.21.0

type MsgCreate struct {
	// The msg's signer.
	Signer github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 151-byte string literal not displayed */
	// taskKey to filter executions.
	TaskKey string        `protobuf:"bytes,2,opt,name=taskKey,proto3" json:"taskKey,omitempty" validate:"required,printascii"`
	Inputs  *types.Struct `protobuf:"bytes,3,opt,name=inputs,proto3" json:"inputs,omitempty"`
	// tags the execution.
	Tags         []string                                    `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" validate:"dive,printascii"`
	ParentHash   github_com_mesg_foundation_engine_hash.Hash `` /* 179-byte string literal not displayed */
	EventHash    github_com_mesg_foundation_engine_hash.Hash `` /* 178-byte string literal not displayed */
	ProcessHash  github_com_mesg_foundation_engine_hash.Hash `` /* 154-byte string literal not displayed */
	NodeKey      string                                      `protobuf:"bytes,8,opt,name=nodeKey,proto3" json:"nodeKey,omitempty"`
	ExecutorHash github_com_mesg_foundation_engine_hash.Hash `` /* 155-byte string literal not displayed */
	// price of running the execution.
	Price                string   `protobuf:"bytes,10,opt,name=price,proto3" json:"price,omitempty" validate:"coinsPositiveZero"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The message to create an Execution.

func (*MsgCreate) Descriptor added in v0.21.0

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

func (*MsgCreate) GetEventHash added in v0.21.0

func (*MsgCreate) GetExecutorHash added in v0.21.0

func (*MsgCreate) GetInputs added in v0.21.0

func (m *MsgCreate) GetInputs() *types.Struct

func (*MsgCreate) GetNodeKey added in v0.21.0

func (m *MsgCreate) GetNodeKey() string

func (*MsgCreate) GetParentHash added in v0.21.0

func (*MsgCreate) GetPrice added in v0.21.0

func (m *MsgCreate) GetPrice() string

func (*MsgCreate) GetProcessHash 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) GetSigner added in v0.21.0

func (MsgCreate) GetSigners added in v0.21.0

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

GetSigners defines whose signature is required.

func (*MsgCreate) GetTags added in v0.21.0

func (m *MsgCreate) GetTags() []string

func (*MsgCreate) GetTaskKey added in v0.21.0

func (m *MsgCreate) GetTaskKey() string

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.

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 MsgUpdate added in v0.21.0

type MsgUpdate struct {
	// The execution's executor.
	Executor github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 155-byte string literal not displayed */
	// Hash represents execution.
	Hash github_com_mesg_foundation_engine_hash.Hash `` /* 139-byte string literal not displayed */
	// result pass to execution
	//
	// Types that are valid to be assigned to Result:
	//	*MsgUpdate_Outputs
	//	*MsgUpdate_Error
	Result               isMsgUpdate_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

The message to update an Execution.

func (*MsgUpdate) Descriptor added in v0.21.0

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

func (*MsgUpdate) GetError added in v0.21.0

func (m *MsgUpdate) GetError() string

func (*MsgUpdate) GetExecutor added in v0.21.0

func (*MsgUpdate) GetHash added in v0.21.0

func (*MsgUpdate) GetOutputs added in v0.21.0

func (m *MsgUpdate) GetOutputs() *types.Struct

func (*MsgUpdate) GetResult added in v0.21.0

func (m *MsgUpdate) GetResult() isMsgUpdate_Result

func (MsgUpdate) GetSignBytes added in v0.21.0

func (msg MsgUpdate) GetSignBytes() []byte

GetSignBytes encodes the message for signing.

func (MsgUpdate) GetSigners added in v0.21.0

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

GetSigners defines whose signature is required.

func (*MsgUpdate) ProtoMessage added in v0.21.0

func (*MsgUpdate) ProtoMessage()

func (*MsgUpdate) Reset added in v0.21.0

func (m *MsgUpdate) Reset()

func (MsgUpdate) Route added in v0.21.0

func (msg MsgUpdate) Route() string

Route should return the name of the module.

func (*MsgUpdate) String added in v0.21.0

func (m *MsgUpdate) String() string

func (MsgUpdate) Type added in v0.21.0

func (msg MsgUpdate) Type() string

Type returns the action.

func (MsgUpdate) ValidateBasic added in v0.21.0

func (msg MsgUpdate) ValidateBasic() error

ValidateBasic runs stateless checks on the message.

func (*MsgUpdate) XXX_DiscardUnknown added in v0.21.0

func (m *MsgUpdate) XXX_DiscardUnknown()

func (*MsgUpdate) XXX_Marshal added in v0.21.0

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

func (*MsgUpdate) XXX_Merge added in v0.21.0

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

func (*MsgUpdate) XXX_OneofWrappers added in v0.21.0

func (*MsgUpdate) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*MsgUpdate) XXX_Size added in v0.21.0

func (m *MsgUpdate) XXX_Size() int

func (*MsgUpdate) XXX_Unmarshal added in v0.21.0

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

type MsgUpdate_Error added in v0.21.0

type MsgUpdate_Error struct {
	Error string `protobuf:"bytes,4,opt,name=error,proto3,oneof" json:"error,omitempty"`
}

type MsgUpdate_Outputs added in v0.21.0

type MsgUpdate_Outputs struct {
	Outputs *types.Struct `protobuf:"bytes,3,opt,name=outputs,proto3,oneof" json:"outputs,omitempty"`
}

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 {
	MinPrice string `json:"minPrice" yaml:"minPrice"` // min price to pay for an execution
}

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(minPrice string) 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

type ProcessKeeper

type ProcessKeeper interface {
	Get(ctx sdk.Context, hash hash.Hash) (*processpb.Process, error)
}

ProcessKeeper module interface.

type RunnerKeeper

type RunnerKeeper interface {
	Get(ctx sdk.Context, hash hash.Hash) (*runnerpb.Runner, error)
	List(ctx sdk.Context) ([]*runnerpb.Runner, error)
}

RunnerKeeper module interface.

type ServiceKeeper

type ServiceKeeper interface {
	Get(ctx sdk.Context, hash hash.Hash) (*servicepb.Service, error)
}

ServiceKeeper module interface.

Jump to

Keyboard shortcuts

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