Documentation ¶
Index ¶
- Constants
- func CreateAndSendTransaction(channel fab.Channel, resps []*fab.TransactionProposalResponse) (*fab.TransactionResponse, error)
- func CreateAndSendTransactionProposal(channel fab.Channel, chainCodeID string, fcn string, args [][]byte, ...) ([]*fab.TransactionProposalResponse, fab.TransactionID, error)
- func CreateChannel(sdk *fabsdk.FabricSDK, req chmgmt.SaveChannelRequest) (bool, error)
- func CreateProposalProcessors(config apiconfig.Config, orgs []string) ([]fab.ProposalProcessor, error)
- func ExampleCCInitArgs() [][]byte
- func ExampleCCQueryArgs() [][]byte
- func ExampleCCTxArgs() [][]byte
- func ExampleCCUpgradeArgs() [][]byte
- func FilterTargetsJoinedChannel(sdk *fabsdk.FabricSDK, orgID string, channelID string, ...) ([]fab.ProposalProcessor, error)
- func GenerateRandomID() string
- func GetChannel(sdk *fabsdk.FabricSDK, ic fab.IdentityContext, config apiconfig.Config, ...) (fab.Channel, error)
- func GetDeployPath() string
- func HasPeerJoinedChannel(client fab.Resource, peer fab.ProposalProcessor, channel string) (bool, error)
- func InitializeChannel(sdk *fabsdk.FabricSDK, orgID string, req chmgmt.SaveChannelRequest, ...) error
- func InstallAndInstantiateCC(sdk *fabsdk.FabricSDK, user fabsdk.IdentityOption, orgName string, ...) error
- func InstallAndInstantiateExampleCC(sdk *fabsdk.FabricSDK, user fabsdk.IdentityOption, orgName string, ...) error
- func JoinChannel(sdk *fabsdk.FabricSDK, name string) (bool, error)
- func RegisterTxEvent(t *testing.T, txID fab.TransactionID, eventHub fab.EventHub) (chan bool, chan error)
- type BaseSetupImpl
Constants ¶
const ( ExampleCCInitB = "200" ExampleCCUpgradeB = "400" )
Initial B values for ExampleCC
const ( // ConfigTestFile contains the path and filename of the config for integration tests ConfigTestFile = "../fixtures/config/config_test.yaml" //ConfigChBlockTestFile the path and filename of the config for integration tests in which orderer config is not provided ConfigChBlockTestFile = "../fixtures/config/config_test_no_orderer.yaml" )
Variables ¶
This section is empty.
Functions ¶
func CreateAndSendTransaction ¶
func CreateAndSendTransaction(channel fab.Channel, resps []*fab.TransactionProposalResponse) (*fab.TransactionResponse, error)
CreateAndSendTransaction ...
func CreateAndSendTransactionProposal ¶
func CreateAndSendTransactionProposal(channel fab.Channel, chainCodeID string, fcn string, args [][]byte, targets []fab.ProposalProcessor, transientData map[string][]byte) ([]*fab.TransactionProposalResponse, fab.TransactionID, error)
CreateAndSendTransactionProposal ... TODO duplicate
func CreateChannel ¶
CreateChannel attempts to save the named channel.
func CreateProposalProcessors ¶
func CreateProposalProcessors(config apiconfig.Config, orgs []string) ([]fab.ProposalProcessor, error)
CreateProposalProcessors initializes target peers based on config
func ExampleCCInitArgs ¶
func ExampleCCInitArgs() [][]byte
ExampleCCInitArgs returns example cc initialization args
func ExampleCCQueryArgs ¶
func ExampleCCQueryArgs() [][]byte
ExampleCCQueryArgs returns example cc query args
func ExampleCCTxArgs ¶
func ExampleCCTxArgs() [][]byte
ExampleCCTxArgs returns example cc move funds args
func ExampleCCUpgradeArgs ¶
func ExampleCCUpgradeArgs() [][]byte
ExampleCCUpgradeArgs returns example cc upgrade args
func FilterTargetsJoinedChannel ¶
func FilterTargetsJoinedChannel(sdk *fabsdk.FabricSDK, orgID string, channelID string, targets []fab.ProposalProcessor) ([]fab.ProposalProcessor, error)
FilterTargetsJoinedChannel filters targets to those that have joined the named channel.
func GetChannel ¶
func GetChannel(sdk *fabsdk.FabricSDK, ic fab.IdentityContext, config apiconfig.Config, chCfg fab.ChannelCfg, orgs []string) (fab.Channel, error)
GetChannel initializes and returns a channel based on config
func HasPeerJoinedChannel ¶
func HasPeerJoinedChannel(client fab.Resource, peer fab.ProposalProcessor, channel string) (bool, error)
HasPeerJoinedChannel checks whether the peer has already joined the channel. It returns true if it has, false otherwise, or an error
func InitializeChannel ¶
func InitializeChannel(sdk *fabsdk.FabricSDK, orgID string, req chmgmt.SaveChannelRequest, targets []fab.ProposalProcessor) error
InitializeChannel ...
func InstallAndInstantiateCC ¶
func InstallAndInstantiateCC(sdk *fabsdk.FabricSDK, user fabsdk.IdentityOption, orgName string, ccName, ccPath, ccVersion, goPath string, ccArgs [][]byte) error
InstallAndInstantiateCC install and instantiate using resource management client
func InstallAndInstantiateExampleCC ¶
func InstallAndInstantiateExampleCC(sdk *fabsdk.FabricSDK, user fabsdk.IdentityOption, orgName string, chainCodeID string) error
InstallAndInstantiateExampleCC install and instantiate using resource management client
func JoinChannel ¶
JoinChannel attempts to save the named channel.
func RegisterTxEvent ¶
func RegisterTxEvent(t *testing.T, txID fab.TransactionID, eventHub fab.EventHub) (chan bool, chan error)
RegisterTxEvent registers on the given eventhub for the give transaction returns a boolean channel which receives true when the event is complete and an error channel for errors TODO - Duplicate
Types ¶
type BaseSetupImpl ¶
type BaseSetupImpl struct { SDK *fabsdk.FabricSDK Identity fab.IdentityContext Client fab.Resource Channel fab.Channel EventHub fab.EventHub ConnectEventHub bool ConfigFile string OrgID string ChannelID string Initialized bool ChannelConfig string }
BaseSetupImpl implementation of BaseTestSetup
func (*BaseSetupImpl) InitConfig ¶
func (setup *BaseSetupImpl) InitConfig() apiconfig.ConfigProvider
InitConfig ...
func (*BaseSetupImpl) Initialize ¶
func (setup *BaseSetupImpl) Initialize() error
Initialize reads configuration from file and sets up client, channel and event hub