utils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

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.

Jump to

Keyboard shortcuts

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