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/hyperledger/fabric-sdk-go/pkg/fabsdk
pkg/client/channel: Provides channel transaction capabilities. Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel
pkg/client/ledger: Enables queries to a channel's underlying ledger. Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/ledger
pkg/client/resmgmt: Provides resource management capabilities such as installing chaincode. Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt
pkg/client/msp: Enables identity management capability. Reference: https://godoc.org/github.com/hyperledger/fabric-sdk-go/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.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
github.com/hyperledger/fabric/protos/orderer
Package orderer is a generated protocol buffer package.
|
Package orderer is a generated protocol buffer package. |
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/verifier
Package verifier provides various verifier (e.g.
|
Package verifier provides various verifier (e.g. |
client/ledger
Package ledger enables ability to query ledger in a Fabric network.
|
Package ledger enables ability to query ledger in a Fabric network. |
client/resmgmt
Package resmgmt enables ability to update resources in a Fabric network.
|
Package resmgmt enables ability to update resources in a Fabric network. |
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/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. |
msp/test/mockmspapi
Package mockmspapi is a generated GoMock package.
|
Package mockmspapi is a generated GoMock package. |
scripts
|
|
test
|
|
metadata
Package metadata contains variables used by tests
|
Package metadata contains variables used by tests |
third_party
|
|
github.com/hyperledger/fabric/protos/common
Package common is a generated protocol buffer package.
|
Package common is a generated protocol buffer package. |
github.com/hyperledger/fabric/protos/ledger/rwset
Package rwset is a generated protocol buffer package.
|
Package rwset is a generated protocol buffer package. |
github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset
Package kvrwset is a generated protocol buffer package.
|
Package kvrwset is a generated protocol buffer package. |
github.com/hyperledger/fabric/protos/msp
Package msp is a generated protocol buffer package.
|
Package msp is a generated protocol buffer package. |