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

Querier names

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 CreditKeeper added in v0.26.0

type CreditKeeper interface {
	Sub(ctx sdk.Context, address sdk.AccAddress, amount sdk.Int) (sdk.Int, error)
}

CreditKeeper module interface.

type GenesisState

type GenesisState struct {
	Executions []*executionpb.Execution `json:"executions" yaml:"executions" 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 []*executionpb.Execution) 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 */
	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) 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"`
	// Start time in nanoseconds.
	Start int64 `protobuf:"varint,5,opt,name=start,proto3" json:"start,omitempty" validate:"required"`
	// Stop time in nanoseconds.
	Stop                 int64    `protobuf:"varint,6,opt,name=stop,proto3" json:"stop,omitempty" validate:"required,gtfield=Start"`
	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) GetStart added in v0.26.0

func (m *MsgUpdate) GetStart() int64

func (*MsgUpdate) GetStop added in v0.26.0

func (m *MsgUpdate) GetStop() int64

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