{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ledger\n\n## Types\n\n```go\ntype Ledger interface {\n\t// GetBlockchainInfo returns basic info about blockchain\n\tGetBlockchainInfo() (*common.BlockchainInfo, error)\n\t// GetBlockByNumber returns block at a given height\n\t// blockNumber of  math.MaxUint64 will return last block\n\tGetBlockByNumber(blockNumber uint64) (*common.Block, error)\n\t// GetBlocksIterator returns an iterator that starts from `startBlockNumber`(inclusive).\n\t// The iterator is a blocking iterator i.e., it blocks till the next block gets available in the ledger\n\t// ResultsIterator contains type BlockHolder\n\tGetBlocksIterator(startBlockNumber uint64) (ResultsIterator, error)\n\t// Close closes the ledger\n\tClose()\n}\n```\nLedger captures the methods that are common across the 'PeerLedger', 'OrdererLedger', and 'ValidatedLedger'\n\n```go\ntype PrunePolicy interface{}\n```\nPrunePolicy - a general interface for supporting different pruning policies\n\n```go\ntype QueryResult interface{}\n```\nQueryResult - a general interface for supporting different types of query results. Actual types differ for different queries\n\n```go\ntype QueryResultsIterator interface {\n\tResultsIterator\n\tGetBookmarkAndClose() string\n}\n```\nQueryResultsIterator - an iterator for query result set\n\n```go\ntype ResultsIterator interface {\n\t// Next returns the next item in the result set. The `QueryResult` is expected to be nil when\n\t// the iterator gets exhausted\n\tNext() (QueryResult, error)\n\t// Close releases resources occupied by the iterator\n\tClose()\n}\n```\nResultsIterator - an iterator for query result set\n\n","path":"github.com/eric-erki/https-hyperledger.org/common/ledger","name":"ledger","synopsis":"","isRedistributable":true}
