Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModuleName = "infrastructure" DefaultParamspace = ModuleName QuerierRoute = ModuleName RouteKey = "infrastructure" QueryContent = "content" )
Variables ¶
View Source
var ( ErrInvalidEndPoint = sdkerrors.Register(string(DefaultCodespace), uint32(CodeInvalidEndPoint), "invalid endpoint") ErrCdcMarshaFailed = sdkerrors.Register(string(DefaultCodespace), uint32(CodeCdcMarshalFailed), "cdc marshal failed") ErrGetContentFailed = sdkerrors.Register(string(DefaultCodespace), uint32(CodeGetContentFailed), "get content failed") )
View Source
var ( EventStoreContent string = "store_content" AttributeValueModule = "infrastructure" StoreKey = "key" )
View Source
var InfrastructureCdc *codec.Codec
Functions ¶
func RegisterCodec ¶
Types ¶
type CodeType ¶
const ( DefaultCodespace sdk.CodespaceType = "infrastructure" CodeInvalidEndPoint CodeType = 1901 CodeCdcMarshalFailed CodeType = 1902 CodeGetContentFailed CodeType = 1903 )
type GenesisState ¶
type GenesisState struct {
Data []StoredContent `json:"data"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
type MsgStoreContent ¶
type MsgStoreContent struct { FromAddress sdk.AccAddress `json:"from_address"` Key string `json:"key"` Content []byte `json:"content"` }
func NewMsgStoreContent ¶
func NewMsgStoreContent(from sdk.AccAddress, key string, content []byte) MsgStoreContent
func (MsgStoreContent) Bytes ¶
func (msg MsgStoreContent) Bytes() []byte
func (MsgStoreContent) GetFromAddress ¶
func (msg MsgStoreContent) GetFromAddress() sdk.AccAddress
func (MsgStoreContent) MsgType ¶
func (msg MsgStoreContent) MsgType() string
func (MsgStoreContent) Route ¶
func (msg MsgStoreContent) Route() string
func (MsgStoreContent) ValidateBasic ¶
func (msg MsgStoreContent) ValidateBasic() error
type QueryContentParams ¶
type QueryContentParams struct {
Key []byte `json:"key"`
}
func NewContentParams ¶
func NewContentParams(key []byte) QueryContentParams
type StoredContent ¶
func NewStoredContent ¶
func NewStoredContent(key, content string) StoredContent
Click to show internal directories.
Click to hide internal directories.