Documentation ¶
Index ¶
Constants ¶
const ( DefaultCodespace sdk.CodespaceType = ModuleName CodeNameDoesNotExist sdk.CodeType = 101 )
DefaultCodespace is the Module Name
const ( // ModuleName is the name of the module ModuleName = "smartcity" // StoreKey to be used when creating the KVStore StoreKey = ModuleName )
const RouterKey = ModuleName // this was defined in your key.go file
RouterKey is the module name router key
Variables ¶
var ModuleCdc = codec.New()
ModuleCdc is the codec for the module
Functions ¶
func ErrNameDoesNotExist ¶
func ErrNameDoesNotExist(codespace sdk.CodespaceType) sdk.Error
ErrNameDoesNotExist is the error for name not existing
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type GiveInfo ¶
type GiveInfo struct { TIMESTAMP string //`json:"timestamp"` CO2 string //`json:"co2"` CO string //`json:"co"` PH string //`json:"ph"` TURBI string //`json:"turbi"` PAYS string //`json:"longitude"` REGION string //`json:"latitude"` Owner sdk.AccAddress `json:"owner"` }
GiveInfo is a struct that contains all the metadata of a name
type MsgDeleteInfo ¶
type MsgDeleteInfo struct { Name string `json:"name"` Owner sdk.AccAddress `json:"owner"` }
MsgDeleteInfo defines a DeleteInfo message
func NewMsgDeleteInfo ¶
func NewMsgDeleteInfo(name string, owner sdk.AccAddress) MsgDeleteInfo
NewMsgDeleteInfo is a constructor function for MsgDeleteInfo
func (MsgDeleteInfo) GetSignBytes ¶
func (msg MsgDeleteInfo) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgDeleteInfo) GetSigners ¶
func (msg MsgDeleteInfo) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgDeleteInfo) Route ¶
func (msg MsgDeleteInfo) Route() string
Route should return the name of the module
func (MsgDeleteInfo) ValidateBasic ¶
func (msg MsgDeleteInfo) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgGetInfo ¶
type MsgGetInfo struct { TIMESTAMP string `json:"timestamp"` CO2 string `json:"co2"` CO string `json:"co"` PH string `json:"ph"` TURBI string `json:"turbi"` PAYS string `json:"pays"` REGION string `json:"region"` //Bid sdk.Coins `json:"bid"` Getter sdk.AccAddress `json:"getter"` }
MsgGetInfo defines the GetInfo message
func NewMsgGetInfo ¶
func NewMsgGetInfo(timestamp string, co2 string, co string, ph string, turbi string, pays string, region string, getter sdk.AccAddress) MsgGetInfo
NewMsgGetInfo is the constructor function for MsgGetInfo
func (MsgGetInfo) GetSignBytes ¶
func (msg MsgGetInfo) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgGetInfo) GetSigners ¶
func (msg MsgGetInfo) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgGetInfo) Route ¶
func (msg MsgGetInfo) Route() string
Route should return the name of the module
func (MsgGetInfo) ValidateBasic ¶
func (msg MsgGetInfo) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type QueryResNames ¶
type QueryResNames []string
QueryResNames Queries Result Payload for a names query