Documentation
¶
Overview ¶
Package history_i handles transaction history logging.
Index ¶
- func GenerateExportableTransactionLog(stub cached_stub.CachedStubInterface, caller data_model.User, ...) (data_model.ExportableTransactionLog, error)
- func GetHistoryManager(assetManager asset_manager.AssetManager) history_manager.HistoryManager
- func Init(stub cached_stub.CachedStubInterface, logLevel ...shim.LoggingLevel) ([]byte, error)
- func PutQueryTransactionLog(stub cached_stub.CachedStubInterface, caller data_model.User, args []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateExportableTransactionLog ¶
func GenerateExportableTransactionLog(stub cached_stub.CachedStubInterface, caller data_model.User, log data_model.TransactionLog, encryptionKey data_model.Key) (data_model.ExportableTransactionLog, error)
GenerateExportableTransactionLog returns an exportable transaction log. It is meant to be called in a query context. The ExportableTransactionLog this function returns is meant to be returned from the query and then passed back into the chaincode using the function history.PutQueryTransactionLog.
func GetHistoryManager ¶
func GetHistoryManager(assetManager asset_manager.AssetManager) history_manager.HistoryManager
GetHistoryManager constructs and returns an historyManagerImpl instance.
func Init ¶
func Init(stub cached_stub.CachedStubInterface, logLevel ...shim.LoggingLevel) ([]byte, error)
Init sets up the history package by building an index table for transaction logs.
func PutQueryTransactionLog ¶
func PutQueryTransactionLog(stub cached_stub.CachedStubInterface, caller data_model.User, args []string) error
PutQueryTransactionLog stores a log for a query transaction, encrypted with the provided encryptionKey. To log a query, first call history.GenerateExportableTransactionLog during the query to get an exportableTransactionLog. Return the exportableTransactionLog from the query. Finally create a separate transaction to invoke this function and pass in the exportableTransactionLog.
args = [exportableTransactionLog]
Types ¶
This section is empty.