types

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

View Source
const (
	EventTypeSet    = "provider:set"
	EventTypeUpdate = "provider:update"
)
View Source
const (
	ModuleName   = "provider"
	QuerierRoute = ModuleName
)
View Source
const (
	QueryProvider  = "provider"
	QueryProviders = "providers"
)
View Source
const (
	AttributeKeyAddress = "address"
)
View Source
const (
	Codespace = sdk.CodespaceType(ModuleName)
)

Variables

View Source
var (
	RouterKey = ModuleName
	StoreKey  = ModuleName
)
View Source
var (
	ModuleCdc *codec.Codec
)
View Source
var (
	ProviderKeyPrefix = []byte{0x00}
)

Functions

func ErrorDuplicateProvider

func ErrorDuplicateProvider() sdk.Error

func ErrorInvalidField

func ErrorInvalidField(v string) sdk.Error

func ErrorMarshal

func ErrorMarshal() sdk.Error

func ErrorProviderDoesNotExist

func ErrorProviderDoesNotExist() sdk.Error

func ErrorUnknownMsgType

func ErrorUnknownMsgType(v string) sdk.Error

func ErrorUnknownQueryType

func ErrorUnknownQueryType(v string) sdk.Error

func ErrorUnmarshal

func ErrorUnmarshal() sdk.Error

func ProviderKey

func ProviderKey(address hub.ProvAddress) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Types

type GenesisState

type GenesisState = Providers

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func NewGenesisState

func NewGenesisState(providers Providers) GenesisState

type MsgRegister

type MsgRegister struct {
	From        sdk.AccAddress `json:"from"`
	Name        string         `json:"name"`
	Identity    string         `json:"identity,omitempty"`
	Website     string         `json:"website,omitempty"`
	Description string         `json:"description,omitempty"`
}

MsgRegister is for registering a provider.

func NewMsgRegister

func NewMsgRegister(from sdk.AccAddress, name, identity, website, description string) MsgRegister

func (MsgRegister) GetSignBytes

func (m MsgRegister) GetSignBytes() []byte

func (MsgRegister) GetSigners

func (m MsgRegister) GetSigners() []sdk.AccAddress

func (MsgRegister) Route

func (m MsgRegister) Route() string

func (MsgRegister) Type

func (m MsgRegister) Type() string

func (MsgRegister) ValidateBasic

func (m MsgRegister) ValidateBasic() sdk.Error

type MsgUpdate

type MsgUpdate struct {
	From        hub.ProvAddress `json:"from"`
	Name        string          `json:"name,omitempty"`
	Identity    string          `json:"identity,omitempty"`
	Website     string          `json:"website,omitempty"`
	Description string          `json:"description,omitempty"`
}

MsgUpdate is for updating a provider.

func NewMsgUpdate

func NewMsgUpdate(from hub.ProvAddress, name, identity, website, description string) MsgUpdate

func (MsgUpdate) GetSignBytes

func (m MsgUpdate) GetSignBytes() []byte

func (MsgUpdate) GetSigners

func (m MsgUpdate) GetSigners() []sdk.AccAddress

func (MsgUpdate) Route

func (m MsgUpdate) Route() string

func (MsgUpdate) Type

func (m MsgUpdate) Type() string

func (MsgUpdate) ValidateBasic

func (m MsgUpdate) ValidateBasic() sdk.Error

type Provider

type Provider struct {
	Address     hub.ProvAddress `json:"address"`
	Name        string          `json:"name"`
	Identity    string          `json:"identity,omitempty"`
	Website     string          `json:"website,omitempty"`
	Description string          `json:"description,omitempty"`
}

func (Provider) String

func (p Provider) String() string

func (Provider) Validate

func (p Provider) Validate() error

type Providers

type Providers []Provider

type QueryProviderParams

type QueryProviderParams struct {
	Address hub.ProvAddress `json:"address"`
}

QueryProviderParams is the request parameters for querying a provider.

func NewQueryProviderParams

func NewQueryProviderParams(address hub.ProvAddress) QueryProviderParams

type QueryProvidersParams

type QueryProvidersParams struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

QueryProvidersParams is the request parameters for querying the providers.

func NewQueryProvidersParams

func NewQueryProvidersParams(page, limit int) QueryProvidersParams

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL