Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type GenesisState
- type MsgCreate
- func (*MsgCreate) Descriptor() ([]byte, []int)
- func (m *MsgCreate) GetConfiguration() service.Service_Configuration
- func (m *MsgCreate) GetDependencies() []*service.Service_Dependency
- func (m *MsgCreate) GetDescription() string
- func (m *MsgCreate) GetEvents() []*service.Service_Event
- func (m *MsgCreate) GetName() string
- func (m *MsgCreate) GetOwner() github_com_cosmos_cosmos_sdk_types.AccAddress
- func (m *MsgCreate) GetRepository() string
- func (m *MsgCreate) GetSid() string
- func (msg MsgCreate) GetSignBytes() []byte
- func (msg MsgCreate) GetSigners() []sdk.AccAddress
- func (m *MsgCreate) GetSource() string
- func (m *MsgCreate) GetTasks() []*service.Service_Task
- func (*MsgCreate) ProtoMessage()
- func (m *MsgCreate) Reset()
- func (msg MsgCreate) Route() string
- func (m *MsgCreate) String() string
- func (msg MsgCreate) Type() string
- func (msg MsgCreate) ValidateBasic() error
- func (m *MsgCreate) XXX_DiscardUnknown()
- func (m *MsgCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreate) XXX_Merge(src proto.Message)
- func (m *MsgCreate) XXX_Size() int
- func (m *MsgCreate) XXX_Unmarshal(b []byte) error
- type OwnershipKeeper
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
Variables ¶
View Source
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
Functions ¶
func RegisterCodec ¶
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 {
Services []*service.Service `json:"services" yaml:"services" 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(services []*service.Service) 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) 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 (*MsgCreate) GetEvents ¶ added in v0.21.0
func (m *MsgCreate) GetEvents() []*service.Service_Event
func (*MsgCreate) GetOwner ¶ added in v0.21.0
func (m *MsgCreate) GetOwner() github_com_cosmos_cosmos_sdk_types.AccAddress
func (*MsgCreate) GetRepository ¶ added in v0.21.0
func (MsgCreate) GetSignBytes ¶ added in v0.21.0
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) 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) ValidateBasic ¶ added in v0.21.0
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 (*MsgCreate) XXX_Unmarshal ¶ added in v0.21.0
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.
Click to show internal directories.
Click to hide internal directories.