types

package
v0.0.0-...-007922e Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodespace sdk.CodespaceType = ModuleName

	CodeNameDoesNotExist sdk.CodeType = 101
)

DefaultCodespace is the Module Name

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "smartcity"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName
)
View Source
const RouterKey = ModuleName // this was defined in your key.go file

RouterKey is the module name router key

Variables

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

func RegisterCodec(cdc *codec.Codec)

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

func (GiveInfo) String

func (w GiveInfo) String() string

implement fmt.Stringer

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

func (msg MsgDeleteInfo) Type() string

Type should return the action

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

func (msg MsgGetInfo) Type() string

Type should return the action

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

func (QueryResNames) String

func (n QueryResNames) String() string

implement fmt.Stringer

Jump to

Keyboard shortcuts

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