types

package
v0.24.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EventType = "service"

	AttributeKeyHash    = "hash"
	AttributeKeyAddress = "address"

	AttributeActionCreated = "created"
)

module event types and attributes

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

	// 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 service 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 MsgCreate added in v0.21.0

type MsgCreate struct {
	// Service's sid.
	Sid string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty" validate:"omitempty,printascii,max=63,domain"`
	// Service's name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" validate:"required,printascii"`
	// Service's description.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" validate:"printascii"`
	// Configurations related to the service
	Configuration service.Service_Configuration `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration" validate:"required"`
	// The list of tasks this service can execute.
	Tasks []*service.Service_Task `protobuf:"bytes,5,rep,name=tasks,proto3" json:"tasks,omitempty" validate:"dive,required"`
	// The list of events this service can emit.
	Events []*service.Service_Event `protobuf:"bytes,6,rep,name=events,proto3" json:"events,omitempty" validate:"dive,required"`
	// The container dependencies this service requires.
	Dependencies []*service.Service_Dependency `protobuf:"bytes,7,rep,name=dependencies,proto3" json:"dependencies,omitempty" validate:"dive,required"`
	// Service's repository url.
	Repository string `protobuf:"bytes,8,opt,name=repository,proto3" json:"repository,omitempty" validate:"omitempty,uri"`
	// The hash id of service's source code on IPFS.
	Source string `protobuf:"bytes,9,opt,name=source,proto3" json:"source,omitempty" validate:"required,printascii"`
	// The service's owner.
	Owner                github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 150-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                                      `json:"-"`
	XXX_unrecognized     []byte                                        `json:"-"`
	XXX_sizecache        int32                                         `json:"-"`
}

The message to create a Service.

func (*MsgCreate) Descriptor added in v0.21.0

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

func (*MsgCreate) GetConfiguration added in v0.21.0

func (m *MsgCreate) GetConfiguration() service.Service_Configuration

func (*MsgCreate) GetDependencies added in v0.21.0

func (m *MsgCreate) GetDependencies() []*service.Service_Dependency

func (*MsgCreate) GetDescription added in v0.21.0

func (m *MsgCreate) GetDescription() string

func (*MsgCreate) GetEvents added in v0.21.0

func (m *MsgCreate) GetEvents() []*service.Service_Event

func (*MsgCreate) GetName added in v0.21.0

func (m *MsgCreate) GetName() string

func (*MsgCreate) GetOwner added in v0.21.0

func (*MsgCreate) GetRepository added in v0.21.0

func (m *MsgCreate) GetRepository() string

func (*MsgCreate) GetSid added in v0.21.0

func (m *MsgCreate) GetSid() string

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

func (m *MsgCreate) GetSource() string

func (*MsgCreate) GetTasks added in v0.21.0

func (m *MsgCreate) GetTasks() []*service.Service_Task

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 OwnershipKeeper

type OwnershipKeeper interface {
	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 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