Documentation ¶
Index ¶
- Constants
- type FabricSDKWrapper
- func (w *FabricSDKWrapper) AsyncInvoke(channelID string, userName string, chaincodeID string, ccFunctionName string, ...) (channel.Response, error)
- func (w *FabricSDKWrapper) Close()
- func (w *FabricSDKWrapper) CreateChaincodePackage(chaincodePath string, chaincodeGoPath string) (*resource.CCPackage, error)
- func (w *FabricSDKWrapper) CreateChannel(channelID string, channelConfig string, ordererID string) error
- func (w *FabricSDKWrapper) EnrollUser(userName string, orgName string) error
- func (w *FabricSDKWrapper) GetEnrolledUser(userName string, orgName string) (*msp.IdentityResponse, error)
- func (w *FabricSDKWrapper) GetPayloadFromResponse(response *channel.Response) []byte
- func (w *FabricSDKWrapper) GetSigningIdentity(orgName string, userName string) (mspapi.SigningIdentity, error)
- func (w *FabricSDKWrapper) InitializeByFile(configFile string, orgAdmin string, orgName string) error
- func (w *FabricSDKWrapper) InstallChaincode(chaincodeID string, chaincodePath string, ccPkg *resource.CCPackage) error
- func (w *FabricSDKWrapper) InstantiateChaincode(channelID string, chaincodeID string, chaincodeGoPath string, version string, ...) error
- func (w *FabricSDKWrapper) Invoke(channelID string, userName string, chaincodeID string, ccFunctionName string, ...) (channel.Response, error)
- func (w *FabricSDKWrapper) JoinChannel(channelID string, ordererID string) error
- func (w *FabricSDKWrapper) Query(channelID string, userName string, chaincodeID string, ccFunctionName string, ...) (channel.Response, error)
- func (w *FabricSDKWrapper) RemoveEnrolledUser(userName string, orgName string) (*msp.IdentityResponse, error)
Constants ¶
const (
IdentityTypeUser = "client"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FabricSDKWrapper ¶
type FabricSDKWrapper struct {
// contains filtered or unexported fields
}
FabricSDKWrapper implementation
func (*FabricSDKWrapper) AsyncInvoke ¶
func (w *FabricSDKWrapper) AsyncInvoke(channelID string, userName string, chaincodeID string, ccFunctionName string, args []string) (channel.Response, error)
AsyncInvoke executes a Hyperledger Fabric transaction asycn
func (*FabricSDKWrapper) CreateChaincodePackage ¶
func (w *FabricSDKWrapper) CreateChaincodePackage(chaincodePath string, chaincodeGoPath string) (*resource.CCPackage, error)
CreateChaincodePackage creates a Hyperledger Fabric package ready for installation
func (*FabricSDKWrapper) CreateChannel ¶
func (w *FabricSDKWrapper) CreateChannel(channelID string, channelConfig string, ordererID string) error
CreateChannel creates a Hyperledger Fabric channel
func (*FabricSDKWrapper) EnrollUser ¶
func (w *FabricSDKWrapper) EnrollUser(userName string, orgName string) error
EnrollUser enrolls a new Fabric CA user
func (*FabricSDKWrapper) GetEnrolledUser ¶
func (w *FabricSDKWrapper) GetEnrolledUser(userName string, orgName string) (*msp.IdentityResponse, error)
GetEnrolledUser returns an enrolled CA user for an organization
func (*FabricSDKWrapper) GetPayloadFromResponse ¶
func (w *FabricSDKWrapper) GetPayloadFromResponse(response *channel.Response) []byte
GetPayloadFromResponse returns the payload from the provided channel response
func (*FabricSDKWrapper) GetSigningIdentity ¶
func (w *FabricSDKWrapper) GetSigningIdentity(orgName string, userName string) (mspapi.SigningIdentity, error)
GetSigningIdentity returns an organization identity
func (*FabricSDKWrapper) InitializeByFile ¶
func (w *FabricSDKWrapper) InitializeByFile(configFile string, orgAdmin string, orgName string) error
InitializeByFile creates a Hyperledger Fabric SDK instance and loads the SDK config from a file path The SDK is initialized per organization
func (*FabricSDKWrapper) InstallChaincode ¶
func (w *FabricSDKWrapper) InstallChaincode(chaincodeID string, chaincodePath string, ccPkg *resource.CCPackage) error
InstallChaincode installs chaincode on a selected peer or all of them
func (*FabricSDKWrapper) InstantiateChaincode ¶
func (w *FabricSDKWrapper) InstantiateChaincode(channelID string, chaincodeID string, chaincodeGoPath string, version string, ccPolicy *common.SignaturePolicyEnvelope) error
InstantiateChaincode instantiates selected chaincode on a channel
func (*FabricSDKWrapper) Invoke ¶
func (w *FabricSDKWrapper) Invoke( channelID string, userName string, chaincodeID string, ccFunctionName string, args []string, targetEndpoints ...string, ) (channel.Response, error)
Invoke executes a Hyperledger Fabric transaction
func (*FabricSDKWrapper) JoinChannel ¶
func (w *FabricSDKWrapper) JoinChannel(channelID string, ordererID string) error
JoinChannel lets the peers join the channel
func (*FabricSDKWrapper) Query ¶
func (w *FabricSDKWrapper) Query(channelID string, userName string, chaincodeID string, ccFunctionName string, args []string, targetEndpoints ...string) (channel.Response, error)
Query executes a Hyperledger Fabric query
func (*FabricSDKWrapper) RemoveEnrolledUser ¶
func (w *FabricSDKWrapper) RemoveEnrolledUser(userName string, orgName string) (*msp.IdentityResponse, error)
RemoveIdentity removes a Hyperledger Fabric CA user