keeper

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//QueryResolve = "resolve"
	QueryGiveInfo = "GiveInfo"
	QueryNames    = "names"
)

query endpoints supported by the smartcity Querier

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Keeper

type Keeper struct {
	CoinKeeper bank.Keeper
	// contains filtered or unexported fields
}

Keeper maintains the link to storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, storeKey sdk.StoreKey, cdc *codec.Codec) Keeper

NewKeeper creates new instances of the smartcity Keeper

func (Keeper) DeleteGiveInfo

func (k Keeper) DeleteGiveInfo(ctx sdk.Context, name string)

Deletes the entire GiveInfo metadata struct for a name

func (Keeper) GetGiveInfo

func (k Keeper) GetGiveInfo(ctx sdk.Context, name string) types.GiveInfo

Gets the entire GiveInfo metadata struct for a name

func (Keeper) GetInfo

func (k Keeper) GetInfo(ctx sdk.Context, timestamp string, co2 string, co string, ph string, turbi string, pays string, region string)

SetInfo - sets the value string that a name resolves to

func (Keeper) GetNamesIterator

func (k Keeper) GetNamesIterator(ctx sdk.Context) sdk.Iterator

Get an iterator over all names in which the keys are the names and the values are the GiveInfo

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, name string) sdk.AccAddress

GetOwner - get the current owner of a name

func (Keeper) HasOwner

func (k Keeper) HasOwner(ctx sdk.Context, name string) bool

HasOwner - returns whether or not the name already has an owner

func (Keeper) IsNamePresent

func (k Keeper) IsNamePresent(ctx sdk.Context, name string) bool

Check if the name is present in the store or not

func (Keeper) SetGiveInfo

func (k Keeper) SetGiveInfo(ctx sdk.Context, name string, GiveInfo types.GiveInfo)

Sets the entire GiveInfo metadata struct for a name

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, timestamp string, co2 string, co string, ph string, turbi string, pays string, region string, owner sdk.AccAddress)

SetOwner - sets the current owner of a name

Jump to

Keyboard shortcuts

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