keeper

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryMailbox = "mailbox"
	QueryStorage = "storage"
	QueryKeys    = "keys"
)

query endpoints supported by the swingset 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 data 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 swingset Keeper

func (Keeper) GetKeys

func (k Keeper) GetKeys(ctx sdk.Context, path string) types.Keys

func (Keeper) GetMailbox

func (k Keeper) GetMailbox(ctx sdk.Context, peer string) types.Storage

Gets the entire mailbox struct for a peer

func (Keeper) GetPeersIterator

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

Get an iterator over all peers in which the keys are the peers and the values are the mailbox

func (Keeper) GetStorage

func (k Keeper) GetStorage(ctx sdk.Context, path string) types.Storage

Gets generic storage

func (Keeper) SetMailbox

func (k Keeper) SetMailbox(ctx sdk.Context, peer string, mailbox types.Storage)

Sets the entire mailbox struct for a peer

func (Keeper) SetStorage

func (k Keeper) SetStorage(ctx sdk.Context, path string, storage types.Storage)

Sets the entire generic storage for a path

Jump to

Keyboard shortcuts

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