Documentation
¶
Index ¶
- func Abort(c *gin.Context, status int, err error)
- func CloseSDK()
- func CreateGatewayConnection(grpcConn *grpc.ClientConn, user string) (*client.Gateway, error)
- func CreateGrpcConnection(endpoint string) (*grpc.ClientConn, error)
- func GetClientOrg() string
- func GetCryptoPath() string
- func GetMSPID() string
- func GetSDK(sdkOpts ...fabsdk.Option) (*sdk, error)
- func GetTLSCACert() string
- func NewFabricChClient(channelName, userName, orgName string) (*fabricChannelClient, error)
- func NewFabricLedgerClient(channelName, user, orgName string) (*fabricLedgerClient, error)
- func NewFabricResmgmtClient(orgName, userName string, opts ...resmgmt.ClientOption) (*fabricResmgtmClient, error)
- func ParseError(err error) (error, int)
- func Respond(c *gin.Context, res interface{}, status int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGatewayConnection ¶
func CreateGrpcConnection ¶
func CreateGrpcConnection(endpoint string) (*grpc.ClientConn, error)
func GetClientOrg ¶
func GetClientOrg() string
GetClientOrg returns the name of the client organization
func GetCryptoPath ¶
func GetCryptoPath() string
func GetSDK ¶
GetSDK returns a fabric sdk instance.
A new sdk is created if: - it is the first time it is beeing used, or - new sdk options are given
Otherwise, it returns the one previoulsy created. If options are given, the new sdk is not a singleton, and must be closed by whoever invoked it.
The configsdk file can be set via environment variable and defaults to './config/configsdk.yaml'
func GetTLSCACert ¶
func GetTLSCACert() string
func NewFabricChClient ¶
Returns a client which has channel transaction capabilities These are, but not limited to: Execute, Query, Invoke cc...
Function works like this:
- Get sdk
- Use sdk to create a ChannelProvider ()
- From channel provider create channel Client
You can then use this .Client to call for specific functionalities
func NewFabricLedgerClient ¶
Returns a client which can query a channel's underlying ledger, such as QueryBlock and QueryConfig
Function works like this:
- Get sdk
- Use sdk to create a ChannelProvider ()
- From channel provider create ledger Client
You can then use this .Client to call for specific functionalities
func NewFabricResmgmtClient ¶
func NewFabricResmgmtClient(orgName, userName string, opts ...resmgmt.ClientOption) (*fabricResmgtmClient, error)
Returns a client which has access resource management capabilities These are, but not limited to: create channel, query cfg, cc lifecycle...
Function works like this:
- Get sdk
- Use sdk to create a ClientProvider ()
- From client provider create resmgmt Client
You can then use this .Client to call for specific functionalities
Types ¶
This section is empty.