Documentation
¶
Index ¶
Constants ¶
const ( EventTypeCreateService = "CreateService" AttributeHash = "hash" AttributeValueCategory = ModuleName )
service module event types
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 )
const ( QueryGetService = "get" QueryListService = "list" QueryHashService = "hash" QueryExistService = "exist" )
Query endpoints supported by the service querier
const (
DefaultParamspace = ModuleName
)
Default parameter namespace
Variables ¶
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{}
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 MsgCreateService ¶
type MsgCreateService struct { Owner sdk.AccAddress `json:"owner" validate:"required,accaddress"` Request *api.CreateServiceRequest `json:"request" validate:"required"` }
MsgCreateService defines a state transition to create a service.
func NewMsgCreateService ¶
func NewMsgCreateService(owner sdk.AccAddress, request *api.CreateServiceRequest) *MsgCreateService
NewMsgCreateService is a constructor function for MsgCreateService.
func (MsgCreateService) GetSignBytes ¶
func (msg MsgCreateService) GetSignBytes() []byte
GetSignBytes encodes the message for signing.
func (MsgCreateService) GetSigners ¶
func (msg MsgCreateService) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (MsgCreateService) Route ¶
func (msg MsgCreateService) Route() string
Route should return the name of the module route.
func (MsgCreateService) ValidateBasic ¶
func (msg MsgCreateService) ValidateBasic() error
ValidateBasic runs stateless checks on the message.
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 (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
ParamSetPairs - Implements params.ParamSet