Documentation ¶
Overview ¶
common package contain structs and functions to be used across all bchcls packages.
In common package, only the following bchcls packages are allowed to be imported:
"common/bchcls/cached_stub" "common/bchcls/crypto" "common/bchcls/custom_errors" "common/bchcls/data_model" "common/bchcls/index" "common/bchcls/internal/common/global" "common/bchcls/internal/common/graph" "common/bchcls/internal/key_mgmt_i" "common/bchcls/internal/common/rb_tree"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAssetId ¶
GetAssetId returns the assetId given the object's type and unique identifier. assetNamespace is the type of object being saved as an asset. The convention for assetNamespace is packagename.ObjectType (e.g. "data_model.User"). id is the unique identifier for the given object type.
func GetEncryptedAssetData ¶
func GetEncryptedAssetData(stub cached_stub.CachedStubInterface, assetId string) (data_model.Asset, error)
GetEncryptedAssetData is a helper function. It returns the data_model.Asset with encrypted PrivateData given the AssetId. If the AssetId passed in does not exist, this function returns empty data_model.Asset.
func IsValidAssetId ¶
IsValidAssetId checks whether the given assetId has the correct asset id prefix.
Types ¶
This section is empty.