commands

package
v0.0.0-...-8401909 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package commands contains the functionality for the set of commands currently supported by the CLI tooling.

Index

Constants

This section is empty.

Variables

View Source
var ErrHelp = errors.New("provided help")

ErrHelp provides context that help was given.

Functions

func AddCurrentRoundCmd

func AddCurrentRoundCmd(traceID string, log *zap.SugaredLogger, cfg algod.Config, couchCfg couchdb.Config, dbName string) error

AddCurrentRoundCmd retrieves information about the block for the latest round and prints it out.

func AddRoundCmd

func AddRoundCmd(traceID string, log *zap.SugaredLogger, cfg algod.Config, couchCfg couchdb.Config, dbName string, blockNum uint64) error

AddRoundCmd retrieves a block based on block number and inserts it into CouchDB.

func CompareBlockBetweenAlgodAndIndexer

func CompareBlockBetweenAlgodAndIndexer(traceID string, log *zap.SugaredLogger, algodCfg algod.Config, indexerCfg indexer.Config, blockNum uint64) error

CompareBlockBetweenAlgodAndIndexer retrieves information about the block for the specified round and prints it out in JSON format.

func GetAndInsertBlockCmd

func GetAndInsertBlockCmd(log *zap.SugaredLogger, cfg algod.Config, couchCfg couchdb.Config, dbName string, fromBlock uint64, toBlock uint64) error

func GetBlocksCountFromDBCmd

func GetBlocksCountFromDBCmd(log *zap.SugaredLogger, couchCfg couchdb.Config, dbName string) error

func GetCurrentRoundCmd

func GetCurrentRoundCmd(log *zap.SugaredLogger, cfg algod.Config) error

GetCurrentRoundCmd retrieves information about the block for the latest round and prints it out.

func GetLastSyncedRoundCmd

func GetLastSyncedRoundCmd(traceID string, log *zap.SugaredLogger, couchCfg couchdb.Config, dbName string) error

GetLastSyncedRoundCmd retrieves information about the block for the latest round and prints it out.

func GetRoundCmd

func GetRoundCmd(log *zap.SugaredLogger, cfg algod.Config, blockNum uint64) error

GetRoundCmd retrieves information about the block for the specified round and prints it out.

func GetRoundInDBCmd

func GetRoundInDBCmd(traceID string, log *zap.SugaredLogger, couchCfg couchdb.Config, dbName, blockHash string) error

GetRoundInDBCmd retrieves information about the block for the latest round and prints it out.

func GetRoundNumInDBCmd

func GetRoundNumInDBCmd(traceID string, log *zap.SugaredLogger, couchCfg couchdb.Config, dbName string, blockNum uint64) error

GetRoundNumInDBCmd retrieves information about the block for the latest round and prints it out.

func GetRoundsPaginationCmd

func GetRoundsPaginationCmd(traceID string, log *zap.SugaredLogger, couchCfg couchdb.Config, dbName string, latestBlockNum, noOfItems, pageNo int64, order string) error

func GetTransactionInfoFromDBCmd

func GetTransactionInfoFromDBCmd(log *zap.SugaredLogger, couchCfg couchdb.Config, dbName string) error

GetTransactionInfoFromDBCmd gets general transaction info from database, inc. earliest and latest transaction IDs and number of transactions

func GetTransactionsByAcctFromDBCmd

func GetTransactionsByAcctFromDBCmd(log *zap.SugaredLogger, couchCfg couchdb.Config, dbName, acctID string) error

GetTransactionsByAcctFromDBCmd gets all transactions by an account from database.

func GetTransactionsByAcctFromDBWithPaginationCmd

func GetTransactionsByAcctFromDBWithPaginationCmd(
	log *zap.SugaredLogger,
	couchCfg couchdb.Config,
	dbName,
	acctID string,
	pageNo, limit int64, order string) error

func GetTransactionsFromDBWithPaginationCmd

func GetTransactionsFromDBWithPaginationCmd(
	log *zap.SugaredLogger,
	couchCfg couchdb.Config,
	dbName string,
	pageNo, limit int64, order string) error

func GetTransactionsPaginationCmd

func GetTransactionsPaginationCmd(traceID string, log *zap.SugaredLogger, couchCfg couchdb.Config, dbName, latestTxnID string, noOfItems, pageNo int64, order string) error

func Migrate

func Migrate(cfg couchdb.Config, dbName string) error

Migrate creates the schema in the database.

func PrettyPrintBlockFromAlgodCmd

func PrettyPrintBlockFromAlgodCmd(traceID string, log *zap.SugaredLogger, cfg algod.Config, blockNum uint64) error

PrettyPrintBlockFromAlgodCmd retrieves information about the block for the specified round and prints it out in JSON format.

func PrettyPrintBlockFromIndexerCmd

func PrettyPrintBlockFromIndexerCmd(traceID string, log *zap.SugaredLogger, cfg indexer.Config, blockNum uint64) error

PrettyPrintBlockFromIndexerCmd retrieves information about the block for the specified round and prints it out in JSON format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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