history_i

package
v0.0.0-...-aeb4a1d Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package history_i handles transaction history logging.

Index

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.

Jump to

Keyboard shortcuts

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