{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v2.0.0-alpha+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package chaincode\n\n## Functions\n\n```go\nfunc ApproveForMyOrgCmd(a *ApproverForMyOrg) *cobra.Command\n```\nApproveForMyOrgCmd returns the cobra command for chaincode ApproveForMyOrg\n\n```go\nfunc Cmd() *cobra.Command\n```\nCmd returns the cobra command for Chaincode\n\n```go\nfunc CommitCmd(c *Committer) *cobra.Command\n```\nCommitCmd returns the cobra command for chaincode Commit\n\n```go\nfunc InstallCmd(i *Installer) *cobra.Command\n```\nInstallCmd returns the cobra command for chaincode install.\n\n```go\nfunc PackageCmd(p *Packager) *cobra.Command\n```\nPackageCmd returns the cobra command for packaging chaincode\n\n```go\nfunc QueryCommittedCmd(c *CommittedQuerier) *cobra.Command\n```\nQueryCommittedCmd returns the cobra command for querying a committed chaincode definition given the chaincode name\n\n```go\nfunc QueryInstalledCmd(i *InstalledQuerier) *cobra.Command\n```\nQueryInstalledCmd returns the cobra command for listing the installed chaincodes\n\n```go\nfunc ResetFlags()\n```\nResetFlags resets the values of these flags to facilitate tests\n\n## Types\n\n```go\ntype ApprovalStatusOutput struct {\n\tApproved map[string]bool `json:\"Approved\"`\n}\n```\n\n```go\ntype ApproveForMyOrgInput struct {\n\tChannelID                string\n\tName                     string\n\tVersion                  string\n\tPackageID                string\n\tSequence                 int64\n\tEndorsementPlugin        string\n\tValidationPlugin         string\n\tValidationParameterBytes []byte\n\tCollectionConfigPackage  *cb.CollectionConfigPackage\n\tInitRequired             bool\n\tPeerAddresses            []string\n\tWaitForEvent             bool\n\tWaitForEventTimeout      time.Duration\n\tTxID                     string\n}\n```\nApproveForMyOrgInput holds all of the input parameters for approving a chaincode definition for an organization. ValidationParameter bytes is the (marshalled) endorsement policy when using the default endorsement and validation plugins\n\n```go\nfunc (a *ApproveForMyOrgInput) Validate() error\n```\nValidate the input for an ApproveChaincodeDefinitionForMyOrg proposal\n\n```go\ntype ApproverForMyOrg struct {\n\tCertificate     tls.Certificate\n\tCommand         *cobra.Command\n\tBroadcastClient common.BroadcastClient\n\tDeliverClients  []pb.DeliverClient\n\tEndorserClients []EndorserClient\n\tInput           *ApproveForMyOrgInput\n\tSigner          Signer\n}\n```\nApproverForMyOrg holds the dependencies needed to approve a chaincode definition for an organization\n\n```go\nfunc (a *ApproverForMyOrg) Approve() error\n```\nApprove submits a ApproveChaincodeDefinitionForMyOrg proposal\n\n```go\ntype ClientConnections struct {\n\tBroadcastClient common.BroadcastClient\n\tDeliverClients  []pb.DeliverClient\n\tEndorserClients []pb.EndorserClient\n\tCertificate     tls.Certificate\n\tSigner          identity.SignerSerializer\n}\n```\nClientConnections holds the clients for connecting to the various endpoints in a Fabric network.\n\n```go\nfunc NewClientConnections(input *ClientConnectionsInput) (*ClientConnections, error)\n```\nNewClientConnections creates a new set of client connections based on the input parameters.\n\n```go\ntype ClientConnectionsInput struct {\n\tCommandName           string\n\tEndorserRequired      bool\n\tOrdererRequired       bool\n\tOrderingEndpoint      string\n\tChannelID             string\n\tPeerAddresses         []string\n\tTLSRootCertFiles      []string\n\tConnectionProfilePath string\n\tTLSEnabled            bool\n}\n```\nClientConnectionsInput holds the input parameters for creating client connections.\n\n```go\ntype CommitInput struct {\n\tChannelID                string\n\tName                     string\n\tVersion                  string\n\tHash                     []byte\n\tSequence                 int64\n\tEndorsementPlugin        string\n\tValidationPlugin         string\n\tValidationParameterBytes []byte\n\tCollectionConfigPackage  *cb.CollectionConfigPackage\n\tInitRequired             bool\n\tPeerAddresses            []string\n\tWaitForEvent             bool\n\tWaitForEventTimeout      time.Duration\n\tTxID                     string\n}\n```\nCommitInput holds all of the input parameters for committing a chaincode definition. ValidationParameter bytes is the (marshalled) endorsement policy when using the default endorsement and validation plugins\n\n```go\nfunc (c *CommitInput) Validate() error\n```\nValidate the input for a CommitChaincodeDefinition proposal\n\n```go\ntype CommittedQuerier struct {\n\tCommand        *cobra.Command\n\tInput          *CommittedQueryInput\n\tEndorserClient EndorserClient\n\tSigner         Signer\n}\n```\nCommittedQuerier holds the dependencies needed to query the committed chaincode definitions\n\n```go\nfunc (c *CommittedQuerier) Query() error\n```\nQuery returns the committed chaincode definition for a given channel and chaincode name\n\n```go\ntype CommittedQueryInput struct {\n\tChannelID string\n\tName      string\n}\n```\n\n```go\ntype Committer struct {\n\tCertificate     tls.Certificate\n\tCommand         *cobra.Command\n\tBroadcastClient common.BroadcastClient\n\tEndorserClients []EndorserClient\n\tDeliverClients  []pb.DeliverClient\n\tInput           *CommitInput\n\tSigner          Signer\n}\n```\nCommitter holds the dependencies needed to commit a chaincode\n\n```go\nfunc (c *Committer) Commit() error\n```\nCommit submits a CommitChaincodeDefinition proposal\n\n```go\ntype EndorserClient interface {\n\tProcessProposal(ctx context.Context, in *pb.SignedProposal, opts ...grpc.CallOption) (*pb.ProposalResponse, error)\n}\n```\nEndorserClient defines the interface for sending a proposal to an endorser\n\n```go\ntype InstallInput struct {\n\tPackageFile string\n}\n```\nInstallInput holds the input parameters for installing a chaincode.\n\n```go\nfunc (i *InstallInput) Validate() error\n```\nValidate checks that the required install parameters are provided.\n\n```go\ntype InstalledQuerier struct {\n\tCommand        *cobra.Command\n\tEndorserClient EndorserClient\n\tSigner         Signer\n}\n```\nInstalledQuerier holds the dependencies needed to query the installed chaincodes\n\n```go\nfunc (i *InstalledQuerier) Query() error\n```\nQuery returns the chaincodes installed on a peer\n\n```go\ntype Installer struct {\n\tCommand        *cobra.Command\n\tEndorserClient EndorserClient\n\tInput          *InstallInput\n\tReader         Reader\n\tSigner         Signer\n}\n```\nInstaller holds the dependencies needed to install a chaincode.\n\n```go\nfunc (i *Installer) Install() error\n```\nInstall installs a chaincode for use with \\_lifecycle.\n\n```go\nfunc (i *Installer) InstallChaincode(args []string) error\n```\nInstallChaincode installs the chaincode.\n\n```go\ntype PackageInput struct {\n\tOutputFile string\n\tPath       string\n\tType       string\n\tLabel      string\n}\n```\nPackageInput holds the input parameters for packaging a ChaincodeInstallPackage\n\n```go\nfunc (p *PackageInput) Validate() error\n```\nValidate checks for the required inputs\n\n```go\ntype PackageMetadata struct {\n\tPath  string `json:\"Path\"`\n\tType  string `json:\"Type\"`\n\tLabel string `json:\"Label\"`\n}\n```\nPackageMetadata holds the path and type for a chaincode package\n\n```go\ntype Packager struct {\n\tCommand          *cobra.Command\n\tInput            *PackageInput\n\tPlatformRegistry PlatformRegistry\n\tWriter           Writer\n}\n```\nPackager holds the dependencies needed to package a chaincode and write it\n\n```go\nfunc (p *Packager) Package() error\n```\nPackage packages chaincodes into the package type, (.tar.gz) used by \\_lifecycle and writes it to disk\n\n```go\nfunc (p *Packager) PackageChaincode(args []string) error\n```\nPackageChaincode packages a chaincode.\n\n```go\ntype PeerDeliverClient interface {\n\tDeliver(ctx context.Context, opts ...grpc.CallOption) (pb.Deliver_DeliverClient, error)\n\tDeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (pb.Deliver_DeliverClient, error)\n}\n```\nPeerDeliverClient defines the interface for a peer deliver client\n\n```go\ntype PlatformRegistry interface {\n\tGetDeploymentPayload(ccType, path string) ([]byte, error)\n}\n```\nPlatformRegistry defines the interface to get the code bytes for a chaincode given the type and path\n\n```go\ntype QueryApprovalStatus struct {\n\tCommand        *cobra.Command\n\tEndorserClient pb.EndorserClient\n\tInput          *QueryApprovalStatusInput\n\tSigner         identity.SignerSerializer\n}\n```\nQueryApprovalStatus holds the dependencies needed to approve a chaincode definition for an organization\n\n```go\nfunc (a *QueryApprovalStatus) Approve() error\n```\n\n```go\ntype QueryApprovalStatusInput struct {\n\tChannelID                string\n\tName                     string\n\tVersion                  string\n\tPackageID                string\n\tSequence                 int64\n\tEndorsementPlugin        string\n\tValidationPlugin         string\n\tValidationParameterBytes []byte\n\tCollectionConfigPackage  *cb.CollectionConfigPackage\n\tInitRequired             bool\n\tPeerAddresses            []string\n\tTxID                     string\n}\n```\nQueryApprovalStatusInput holds all of the input parameters for committing a chaincode definition. ValidationParameter bytes is the (marshalled) endorsement policy when using the default endorsement and validation plugins\n\n```go\nfunc (a *QueryApprovalStatusInput) Validate() error\n```\n\n```go\ntype Reader interface {\n\tReadFile(string) ([]byte, error)\n}\n```\nReader defines the interface needed for reading a file.\n\n```go\ntype Signer interface {\n\tSign(msg []byte) ([]byte, error)\n\tSerialize() ([]byte, error)\n}\n```\nSigner defines the interface needed for signing messages\n\n```go\ntype Writer interface {\n\tWriteFile(string, []byte, os.FileMode) error\n}\n```\nWriter defines the interface needed for writing a file\n\n","path":"github.com/eric-erki/https-hyperledger.org/internal/peer/lifecycle/chaincode","name":"chaincode","synopsis":"","isRedistributable":true}
