keeper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler ...

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

nolint

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Marshaler,
	storeKey,
	memKey sdk.StoreKey,
	bk bank.Keeper,
) *Keeper

func (Keeper) Delete

func (k Keeper) Delete(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
)

Delete Deletes a value form the store

func (Keeper) Get

func (k Keeper) Get(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
	unmarshal UnmarshalFn,
) (i interface{}, found bool)

Get gets an item from the store by bytes

func (Keeper) GetAll

func (k Keeper) GetAll(
	ctx sdk.Context,
	prefix []byte,
) sdk.Iterator

GetAll values from with a prefix from the store

func (Keeper) GetAllIssuers

func (k Keeper) GetAllIssuers(ctx sdk.Context) []types.Issuer

func (Keeper) GetAllIssuersWithCondition

func (k Keeper) GetAllIssuersWithCondition(
	ctx sdk.Context,
	key []byte,
	issuerSelector func(issuers types.Issuer) bool,
) (issuers []types.Issuer)

func (Keeper) GetIssuer

func (k Keeper) GetIssuer(ctx sdk.Context, key []byte) (types.Issuer, bool)

func (Keeper) GetIssuerByToken

func (k Keeper) GetIssuerByToken(ctx sdk.Context, key []byte) (types.Issuer, bool)

GetIssuerByToken retrieve an issuer by it's key TODO: this could be improved by only calling Get once in this file

func (Keeper) Issuers

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MarshalIssuer

func (k Keeper) MarshalIssuer(value interface{}) []byte

func (Keeper) Set

func (k Keeper) Set(ctx sdk.Context,
	key []byte,
	prefix []byte,
	i interface{},
	marshal MarshalFn,
)

Set sets a value in the db with a prefixed key

func (Keeper) SetIssuer

func (k Keeper) SetIssuer(ctx sdk.Context, issuer types.Issuer)

func (Keeper) UnmarshalIssuer

func (k Keeper) UnmarshalIssuer(value []byte) (interface{}, bool)

type MarshalFn

type MarshalFn func(value interface{}) []byte

MarshalFn is a generic function to marshal interfaces

type UnmarshalFn

type UnmarshalFn func(value []byte) (interface{}, bool)

UnmarshalFn is a generic function to unmarshal bytes

Jump to

Keyboard shortcuts

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