types

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeCreateService = "CreateService"

	AttributeHash = "hash"

	AttributeValueCategory = ModuleName
)

service module event types

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 (
	QueryGetService   = "get"
	QueryListService  = "list"
	QueryHashService  = "hash"
	QueryExistService = "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 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) Type

func (msg MsgCreateService) Type() string

Type returns the action.

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