keeper

package
v0.1.2-0...-bccb0d0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k DataNodeKeeper) sdk.Querier

NewQuerier creates a new querier for datanode clients.

Types

type DataNodeKeeper

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

DataNodeKeeper - keeper of the datanode store

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey) DataNodeKeeper

NewKeeper - creates a datanode keeper

func (DataNodeKeeper) AddChannel

func (k DataNodeKeeper) AddChannel(ctx sdk.Context, address sdk.AccAddress, channel types.NodeChannel) error

AddChannel - add a new channel to the datanode

func (DataNodeKeeper) AddRecord

func (k DataNodeKeeper) AddRecord(ctx sdk.Context, address sdk.AccAddress, channelID string, date int64, record types.Record) error

AddRecord - add a new record to the time frame

func (DataNodeKeeper) AddRecordAtTimestamp

func (k DataNodeKeeper) AddRecordAtTimestamp(ctx sdk.Context, address sdk.AccAddress, channelID string, record types.Record) error

AddRecordAtTimestamp - add a new record to the time frame using timestamp data

func (DataNodeKeeper) AddRecordHash

func (k DataNodeKeeper) AddRecordHash(ctx sdk.Context, address sdk.AccAddress, hash types.DataRecordHash) error

AddRecordHash - add a recordhash to the datanode

func (DataNodeKeeper) ChangeChannel

func (k DataNodeKeeper) ChangeChannel(ctx sdk.Context, address sdk.AccAddress, channel types.NodeChannel) error

ChangeChannel - change a channel on the datanode

func (DataNodeKeeper) DeleteChannel

func (k DataNodeKeeper) DeleteChannel(ctx sdk.Context, address sdk.AccAddress, channelID string) error

DeleteChannel - removes a channel from the datanode

func (DataNodeKeeper) DeleteDataNode

func (k DataNodeKeeper) DeleteDataNode(ctx sdk.Context, address sdk.AccAddress)

DeleteDataNode - Deletes the entire metadata struct for an address and all related datarecords

func (DataNodeKeeper) GetChannel

func (k DataNodeKeeper) GetChannel(ctx sdk.Context, address sdk.AccAddress, id string) (*types.NodeChannel, error)

GetChannel - get a channel from the datanode

func (DataNodeKeeper) GetChannels

func (k DataNodeKeeper) GetChannels(ctx sdk.Context, address sdk.AccAddress) (*[]types.NodeChannel, error)

GetChannels - get the channels of the datanode

func (DataNodeKeeper) GetDataNode

func (k DataNodeKeeper) GetDataNode(ctx sdk.Context, address sdk.AccAddress) (*types.DataNode, error)

GetDataNode - gets the entire datanode metadata struct for an address

func (DataNodeKeeper) GetDataRecord

func (k DataNodeKeeper) GetDataRecord(ctx sdk.Context, hash types.DataRecordHash) (*types.DataRecord, error)

GetDataRecord - gets the datarecord from the KVStore

func (DataNodeKeeper) GetIterator

func (k DataNodeKeeper) GetIterator(ctx sdk.Context) sdk.Iterator

GetIterator - get an iterator over all datanodes and datrecords

func (DataNodeKeeper) GetLastRecords

func (k DataNodeKeeper) GetLastRecords(ctx sdk.Context, address sdk.AccAddress, channelID string) (*[]types.Record, error)

GetLastRecords - get the latest time frame records

func (DataNodeKeeper) GetRecordHashes

func (k DataNodeKeeper) GetRecordHashes(ctx sdk.Context, address sdk.AccAddress) (*[]types.DataRecordHash, error)

GetRecordHashes - get the datarecord hashes belonging to the datanode

func (DataNodeKeeper) GetRecords

func (k DataNodeKeeper) GetRecords(ctx sdk.Context, address sdk.AccAddress, channelID string, date int64) (*[]types.Record, error)

GetRecords - get records from the date time frame

func (DataNodeKeeper) IsDataNodePresent

func (k DataNodeKeeper) IsDataNodePresent(ctx sdk.Context, address sdk.AccAddress) bool

IsDataNodePresent - check if the datanode is present in the store or not

func (DataNodeKeeper) IsDataRecordPresent

func (k DataNodeKeeper) IsDataRecordPresent(ctx sdk.Context, hash types.DataRecordHash) bool

IsDataRecordPresent - check if the datarecord is present in the store or not

func (DataNodeKeeper) SetDataNode

func (k DataNodeKeeper) SetDataNode(ctx sdk.Context, address sdk.AccAddress, dataNode *types.DataNode)

SetDataNode - sets the entire datanode metadata struct for an address

func (DataNodeKeeper) SetDataNodeOwner

func (k DataNodeKeeper) SetDataNodeOwner(ctx sdk.Context, address sdk.AccAddress, owner sdk.AccAddress)

SetDataNodeOwner - change the owner of the datanode

func (DataNodeKeeper) SetDataRecord

func (k DataNodeKeeper) SetDataRecord(ctx sdk.Context, dataRecord *types.DataRecord)

SetDataRecord - sets the datarecord on the KVStore

Jump to

Keyboard shortcuts

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