Documentation ¶
Overview ¶
Package fabricsdk enables Go developers to build solutions that interact with Hyperledger Fabric.
Packages for end developer usage ¶
pkg/fabsdk: The main package of the Fabric SDK. This package enables creation of contexts based on configuration. These contexts are used by the client packages listed below. Reference: https://godoc.org/github.com/shiqinfeng1/fabric-sdk-go-gm/pkg/fabsdk
pkg/client/channel: Provides channel transaction capabilities. Reference: https://godoc.org/github.com/shiqinfeng1fabric-sdk-go-gm/pkg/client/channel
pkg/client/event: Provides channel event capabilities. Reference: https://godoc.org/github.com/shiqinfeng1fabric-sdk-go-gm/pkg/client/event
pkg/client/ledger: Enables queries to a channel's underlying ledger. Reference: https://godoc.org/github.com/shiqinfeng1fabric-sdk-go-gm/pkg/client/ledger
pkg/client/resmgmt: Provides resource management capabilities such as installing chaincode. Reference: https://godoc.org/github.com/shiqinfeng1fabric-sdk-go-gm/pkg/client/resmgmt
pkg/client/msp: Enables identity management capability. Reference: https://godoc.org/github.com/shiqinfeng1fabric-sdk-go-gm/pkg/client/msp
Basic workflow
- Instantiate a fabsdk instance using a configuration. Note: fabsdk maintains caches so you should minimize instances of fabsdk itself.
- Create a context based on a user and organization, using your fabsdk instance. Note: A channel context additionally requires the channel ID.
- Create a client instance using its New func, passing the context. Note: you create a new client instance for each context you need.
- Use the funcs provided by each client to create your solution!
- Call fabsdk.Close() to release resources and caches.
Support for Hyperledger Fabric programming model ¶
In order to support the 'Gateway' programming model, the following package is provided:
pkg/gateway: Enables Go developers to build client applications using the Hyperledger Fabric programming model as described in the 'Developing Applications' chapter of the Fabric documentation. Reference: https://godoc.org/github.com/shiqinfeng1fabric-sdk-go-gm/pkg/gateway
Directories ¶
Path | Synopsis |
---|---|
cfssl
module
|
|
api
Package api implements an HTTP-based API and server for CFSSL.
|
Package api implements an HTTP-based API and server for CFSSL. |
auth
Package auth implements an interface for providing CFSSL authentication.
|
Package auth implements an interface for providing CFSSL authentication. |
config
Package config contains the configuration logic for CFSSL.
|
Package config contains the configuration logic for CFSSL. |
crypto/pkcs7
Package pkcs7 implements the subset of the CMS PKCS #7 datatype that is typically used to package certificates and CRLs.
|
Package pkcs7 implements the subset of the CMS PKCS #7 datatype that is typically used to package certificates and CRLs. |
csr
Package csr implements certificate requests for CFSSL.
|
Package csr implements certificate requests for CFSSL. |
errors
Package errors provides error types returned in CF SSL.
|
Package errors provides error types returned in CF SSL. |
helpers
Package helpers implements utility functionality common to many CFSSL packages.
|
Package helpers implements utility functionality common to many CFSSL packages. |
helpers/derhelpers
Package derhelpers implements common functionality on DER encoded data
|
Package derhelpers implements common functionality on DER encoded data |
info
Package info contains the definitions for the info endpoint
|
Package info contains the definitions for the info endpoint |
log
Package log implements a wrapper around the Go standard library's logging package.
|
Package log implements a wrapper around the Go standard library's logging package. |
ocsp/config
Package config in the ocsp directory provides configuration data for an OCSP signer.
|
Package config in the ocsp directory provides configuration data for an OCSP signer. |
signer
Package signer implements certificate signature functionality for CFSSL.
|
Package signer implements certificate signature functionality for CFSSL. |
Package http provides HTTP client and server implementations.
|
Package http provides HTTP client and server implementations. |
cgi
Package cgi implements CGI (Common Gateway Interface) as specified in RFC 3875.
|
Package cgi implements CGI (Common Gateway Interface) as specified in RFC 3875. |
cookiejar
Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar.
|
Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar. |
fcgi
Package fcgi implements the FastCGI protocol.
|
Package fcgi implements the FastCGI protocol. |
httptest
Package httptest provides utilities for HTTP testing.
|
Package httptest provides utilities for HTTP testing. |
httptrace
Package httptrace provides mechanisms to trace the events within HTTP client requests.
|
Package httptrace provides mechanisms to trace the events within HTTP client requests. |
httputil
Package httputil provides HTTP utility functions, complementing the more common ones in the net/http package.
|
Package httputil provides HTTP utility functions, complementing the more common ones in the net/http package. |
internal
Package internal contains HTTP internals shared by net/http and net/http/httputil.
|
Package internal contains HTTP internals shared by net/http and net/http/httputil. |
internal/netttrace
Package nettrace contains internal hooks for tracing activity in the net package.
|
Package nettrace contains internal hooks for tracing activity in the net package. |
pprof
Package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool.
|
Package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. |
internal
|
|
pkg
|
|
client/channel
Package channel enables access to a channel on a Fabric network.
|
Package channel enables access to a channel on a Fabric network. |
client/channel/invoke
Package invoke provides the handlers for performing chaincode invocations.
|
Package invoke provides the handlers for performing chaincode invocations. |
client/common/filter
Package filter provides common filters (e.g.
|
Package filter provides common filters (e.g. |
client/common/verifier
Package verifier provides various verifier (e.g.
|
Package verifier provides various verifier (e.g. |
client/event
Package event enables access to a channel events on a Fabric network.
|
Package event enables access to a channel events on a Fabric network. |
client/ledger
Package ledger enables ledger queries on specified channel on a Fabric network.
|
Package ledger enables ledger queries on specified channel on a Fabric network. |
client/msp
Package msp enables creation and update of users on a Fabric network.
|
Package msp enables creation and update of users on a Fabric network. |
client/resmgmt
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
common/errors/multi
Package multi is an error type that holds multiple errors.
|
Package multi is an error type that holds multiple errors. |
common/errors/retry
Package retry provides retransmission capabilities to fabric-sdk-go.
|
Package retry provides retransmission capabilities to fabric-sdk-go. |
common/errors/status
Package status defines metadata for errors returned by fabric-sdk-go.
|
Package status defines metadata for errors returned by fabric-sdk-go. |
common/logging
Package logging enables setting custom logger implementation.
|
Package logging enables setting custom logger implementation. |
common/providers/test/mockcontext
Package mockcontext is a generated GoMock package.
|
Package mockcontext is a generated GoMock package. |
common/providers/test/mockcore
Package mockcore is a generated GoMock package.
|
Package mockcore is a generated GoMock package. |
common/providers/test/mockfab
Package mockfab is a generated GoMock package.
|
Package mockfab is a generated GoMock package. |
common/providers/test/mockmsp
Package mockmsp is a generated GoMock package.
|
Package mockmsp is a generated GoMock package. |
fab/resource
Package resource provides access to fabric network resource management, typically using system channel queries.
|
Package resource provides access to fabric network resource management, typically using system channel queries. |
fab/txn
Package txn enables creating, endorsing and sending transactions to Fabric peers and orderers.
|
Package txn enables creating, endorsing and sending transactions to Fabric peers and orderers. |
fabsdk
Package fabsdk enables client usage of a Hyperledger Fabric network.
|
Package fabsdk enables client usage of a Hyperledger Fabric network. |
fabsdk/test/mocksdkapi
Package mocksdkapi is a generated GoMock package.
|
Package mocksdkapi is a generated GoMock package. |
gateway
Package gateway enables Go developers to build client applications using the Hyperledger Fabric programming model as described in the 'Developing Applications' chapter of the Fabric documentation: https://hyperledger-fabric.readthedocs.io/en/master/developapps/developing_applications.html A Gateway object is created using the Connect() function to connect to a 'gateway' peer as specified in a network configuration file, using an identity stored in a wallet.
|
Package gateway enables Go developers to build client applications using the Hyperledger Fabric programming model as described in the 'Developing Applications' chapter of the Fabric documentation: https://hyperledger-fabric.readthedocs.io/en/master/developapps/developing_applications.html A Gateway object is created using the Connect() function to connect to a 'gateway' peer as specified in a network configuration file, using an identity stored in a wallet. |
msp/test/mockmspapi
Package mockmspapi is a generated GoMock package.
|
Package mockmspapi is a generated GoMock package. |
spf13
|
|
cast
Package cast provides easy and safe casting in Go.
|
Package cast provides easy and safe casting in Go. |
cobra
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.
|
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces. |
pflag
Package pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
|
Package pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags. |
test
|
|
metadata
Package metadata contains variables used by tests
|
Package metadata contains variables used by tests |
third_party
|
|
tjfoc
|
|
gmsm/sm2
crypto/x509 add sm2 support
|
crypto/x509 add sm2 support |
gmtls
add sm2 support
|
add sm2 support |
gmtls/gmcredentials/echo
Package echo is a generated protocol buffer package.
|
Package echo is a generated protocol buffer package. |
gmsm
Module
|