keeper

package
v0.0.2-0...-13a971e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeyDelimiter    = ":"
	KeyNextRecordID = []byte("newRecordID")
)

Key for getting next available recordID from the store

View Source
var (
	ParamsStoreKeyRecordParams = []byte("recordparams")
)

Functions

func KeyAddress

func KeyAddress(addr string) []byte

Key for getting records by a specific address from the store

func KeyAddressRecord

func KeyAddressRecord(addr string, id string) []byte

Key for saving a record by a specific address:id

func KeyRecord

func KeyRecord(recordHash string) []byte

Key for getting a specific record content hash from the store

func KeyRecordId

func KeyRecordId(id string) []byte

func KeyRecordIdStr

func KeyRecordIdStr(seq uint64) string

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier Instance

func ParamKeyTable

func ParamKeyTable() params.KeyTable

func QueryRecord

func QueryRecord(ctx sdk.Context, hash string, keeper Keeper) ([]byte, sdk.Error)

func QueryRecords

func QueryRecords(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, sdk.Error)

Types

type Keeper

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

Issue Keeper

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey,
	paramSpace params.Subspace, codespace sdk.CodespaceType) Keeper

NewKeeper keeper Instance

func (Keeper) AddRecord

func (keeper Keeper) AddRecord(ctx sdk.Context, recordInfo *types.RecordInfo)

add a record

func (Keeper) CreateRecord

func (keeper Keeper) CreateRecord(ctx sdk.Context, recordInfo *types.RecordInfo) sdk.Error

Create a record

func (Keeper) GetLastRecordID

func (keeper Keeper) GetLastRecordID(ctx sdk.Context) (recordID uint64)

Get the last used recordID

func (Keeper) GetRecord

func (keeper Keeper) GetRecord(ctx sdk.Context, record string) *types.RecordInfo

Returns record by Hash

func (Keeper) Getcdc

func (keeper Keeper) Getcdc() *codec.Codec

Get issue codec

func (Keeper) List

func (keeper Keeper) List(ctx sdk.Context, params types.RecordQueryParams) []*types.RecordInfo

func (Keeper) PeekCurrentRecordID

func (keeper Keeper) PeekCurrentRecordID(ctx sdk.Context) (recordID uint64, err sdk.Error)

Peeks the next available recordID without increasing it

func (Keeper) SetInitialRecordStartingRecordId

func (keeper Keeper) SetInitialRecordStartingRecordId(ctx sdk.Context, recordID uint64) sdk.Error

Set the initial record id

Jump to

Keyboard shortcuts

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