util

package
v1.0.0-alpha2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeGOPATHToDeploy

func ChangeGOPATHToDeploy(deployPath string)

ChangeGOPATHToDeploy changes go path to fixtures folder

func CreateAndJoinChannel

func CreateAndJoinChannel(client fabricClient.Client, ordererUser fabricClient.User, orgUser fabricClient.User, chain fabricClient.Chain, channelConfig string) error

CreateAndJoinChannel creates the channel represented by this chain and makes the primary peer join it. It reads channel configuration from tx channelConfig file

func CreateAndSendTransaction

CreateAndSendTransaction combines create and send transaction methods into one method. See CreateTransaction and SendTransaction

func CreateAndSendTransactionProposal

func CreateAndSendTransactionProposal(chain fabricClient.Chain, chainCodeID string, chainID string, args []string, targets []fabricClient.Peer, transientData map[string][]byte) ([]*fabricClient.TransactionProposalResponse, string, error)

CreateAndSendTransactionProposal combines create and send transaction proposal methods into one method. See CreateTransactionProposal and SendTransactionProposal

func GenerateRandomID

func GenerateRandomID() string

GenerateRandomID generates random ID

func GetChain

func GetChain(client fabricClient.Client, chainID string) (fabricClient.Chain, error)

GetChain initializes and returns a chain based on config

func GetClient

func GetClient(name string, pwd string, stateStorePath string) (fabricClient.Client, error)

GetClient initializes and returns a client based on config and user

func GetMember

func GetMember(client fc.Client, name string, pwd string) (fc.User, error)

GetMember ...

func GetPreEnrolledUser

func GetPreEnrolledUser(c fc.Client, keyDir string, certDir string, username string) (fc.User, error)

GetPreEnrolledUser ...

func RegisterCCEvent

func RegisterCCEvent(chainCodeID, eventID string, eventHub events.EventHub) (chan bool, *events.ChainCodeCBE)

RegisterCCEvent registers chain code event on the given eventhub @returns {chan bool} channel which receives true when the event is complete @returns {object} ChainCodeCBE object handle that should be used to unregister

func RegisterTxEvent

func RegisterTxEvent(txID string, eventHub events.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

func ResetGOPATH

func ResetGOPATH()

ResetGOPATH resets go path to original

func SendInstallCC

func SendInstallCC(client fabricClient.Client, chain fabricClient.Chain, chainCodeID string, chainCodePath string, chainCodeVersion string, chaincodePackage []byte, targets []fabricClient.Peer, deployPath string) error

SendInstallCC Sends an install proposal to one or more endorsing peers.

func SendInstantiateCC

func SendInstantiateCC(chain fabricClient.Chain, chainCodeID string, chainID string, args []string, chaincodePath string, chaincodeVersion string, targets []fabricClient.Peer, eventHub events.EventHub) error

SendInstantiateCC Sends instantiate CC proposal to one or more endorsing peers

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL