Documentation
¶
Index ¶
- func GenerateDocumentID(stub shim.ChaincodeStubInterface) string
- func GetAttributeValue(stub shim.ChaincodeStubInterface, attrName string) (*string, error)
- func GetByOneColumn(stub shim.ChaincodeStubInterface, table string, column string, ...) (resultsIterator shim.StateQueryIteratorInterface, err error)
- func GetByTwoColumns(stub shim.ChaincodeStubInterface, table string, column1 string, ...) (resultsIterator shim.StateQueryIteratorInterface, err error)
- func GetCertID(stub shim.ChaincodeStubInterface) (*string, error)
- func GetContainKey(stub shim.ChaincodeStubInterface, table string, key string) (resultsIterator shim.StateQueryIteratorInterface, err error)
- func GetMSPID(stub shim.ChaincodeStubInterface) (*string, error)
- func GetRole(stub shim.ChaincodeStubInterface) (*string, error)
- func IsSuperAdmin(stub shim.ChaincodeStubInterface) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDocumentID ¶ added in v1.0.3
func GenerateDocumentID(stub shim.ChaincodeStubInterface) string
GenerateDocumentID func to generate ID
func GetAttributeValue ¶
func GetAttributeValue(stub shim.ChaincodeStubInterface, attrName string) (*string, error)
GetAttributeValue func to get a attribute saved in current user's certificate
func GetByOneColumn ¶
func GetByOneColumn(stub shim.ChaincodeStubInterface, table string, column string, value interface{}) (resultsIterator shim.StateQueryIteratorInterface, err error)
GetByOneColumn func to get information
func GetByTwoColumns ¶
func GetByTwoColumns(stub shim.ChaincodeStubInterface, table string, column1 string, value1 interface{}, column2 string, value2 interface{}) (resultsIterator shim.StateQueryIteratorInterface, err error)
GetByTwoColumns func to get information
func GetCertID ¶
func GetCertID(stub shim.ChaincodeStubInterface) (*string, error)
GetCertID func to get Certtificate ID of current user
func GetContainKey ¶
func GetContainKey(stub shim.ChaincodeStubInterface, table string, key string) (resultsIterator shim.StateQueryIteratorInterface, err error)
GetContainKey func to get information
func GetMSPID ¶
func GetMSPID(stub shim.ChaincodeStubInterface) (*string, error)
GetMSPID func to get MSP ID of current user
func GetRole ¶
func GetRole(stub shim.ChaincodeStubInterface) (*string, error)
GetRole func to get 'role' attribute saved in current user's certificate
func IsSuperAdmin ¶ added in v1.0.3
func IsSuperAdmin(stub shim.ChaincodeStubInterface) error
IsSuperAdmin func to check role Super Admin of caller. Return nil if true
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.