keeper

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 8 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 ParamKeyTable

func ParamKeyTable() params.KeyTable

Types

type Keeper

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

Issue Keeper

func NewKeeper

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

New record 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 recordparams.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