asset_mgmt_c

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: 8 Imported by: 0

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

func GetAssetId(assetNamespace string, id string) string

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

func IsValidAssetId(assetId string) bool

IsValidAssetId checks whether the given assetId has the correct asset id prefix.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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