Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorDuplicateProvider() sdk.Error
- func ErrorInvalidField(v string) sdk.Error
- func ErrorMarshal() sdk.Error
- func ErrorProviderDoesNotExist() sdk.Error
- func ErrorUnknownMsgType(v string) sdk.Error
- func ErrorUnknownQueryType(v string) sdk.Error
- func ErrorUnmarshal() sdk.Error
- func ProviderKey(address hub.ProvAddress) []byte
- func RegisterCodec(cdc *codec.Codec)
- type GenesisState
- type MsgRegister
- type MsgUpdate
- type Provider
- type Providers
- type QueryProviderParams
- type QueryProvidersParams
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 ( EventModuleName = sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), ) )
View Source
var (
ModuleCdc *codec.Codec
)
View Source
var (
ProviderKeyPrefix = []byte{0x00}
)
Functions ¶
func ErrorDuplicateProvider ¶
func ErrorInvalidField ¶
func ErrorMarshal ¶
func ErrorUnknownMsgType ¶
func ErrorUnknownQueryType ¶
func ErrorUnmarshal ¶
func ProviderKey ¶
func ProviderKey(address hub.ProvAddress) []byte
func RegisterCodec ¶
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 (MsgUpdate) GetSigners ¶
func (m MsgUpdate) GetSigners() []sdk.AccAddress
func (MsgUpdate) ValidateBasic ¶
type 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 ¶
QueryProvidersParams is the request parameters for querying the providers.
func NewQueryProvidersParams ¶
func NewQueryProvidersParams(page, limit int) QueryProvidersParams
Click to show internal directories.
Click to hide internal directories.