keeper

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryPublic  = "public"
	QueryPrivate = "private"
)

query endpoints supported by the profile Querier

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier creates a new querier for profile clients.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

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

func NewKeeper

func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, tokens TokenKeeper) Keeper

NewKeeper creates new instances of the PDV Keeper

func (Keeper) GetProfile

func (k Keeper) GetProfile(ctx sdk.Context, owner sdk.AccAddress) types.Profile

Gets the entire Profile metadata struct for an owner

func (Keeper) GetProfileIterator

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

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

func (Keeper) IsNamePresent

func (k Keeper) IsNamePresent(ctx sdk.Context, owner sdk.AccAddress) bool

Check if the name is present in the store or not

func (Keeper) SetProfile

func (k Keeper) SetProfile(ctx sdk.Context, owner sdk.AccAddress, new types.Profile)

Sets the entire Profile metadata struct for a name

type TokenKeeper added in v0.5.0

type TokenKeeper interface {
	AddTokens(ctx sdk.Context, owner sdk.AccAddress, amount sdk.Int, description []byte)
}

Jump to

Keyboard shortcuts

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