 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func ApproveForMyOrgCmd(a *ApproverForMyOrg) *cobra.Command
- func Cmd() *cobra.Command
- func CommitCmd(c *Committer) *cobra.Command
- func InstallCmd(i *Installer) *cobra.Command
- func PackageCmd(p *Packager) *cobra.Command
- func QueryCommittedCmd(c *CommittedQuerier) *cobra.Command
- func QueryInstalledCmd(i *InstalledQuerier) *cobra.Command
- func ResetFlags()
- type ApprovalStatusOutput
- type ApproveForMyOrgInput
- type ApproverForMyOrg
- type ClientConnections
- type ClientConnectionsInput
- type CommitInput
- type CommittedQuerier
- type CommittedQueryInput
- type Committer
- type EndorserClient
- type InstallInput
- type InstalledQuerier
- type Installer
- type PackageInput
- type PackageMetadata
- type Packager
- type PeerDeliverClient
- type PlatformRegistry
- type QueryApprovalStatus
- type QueryApprovalStatusInput
- type Reader
- type Signer
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveForMyOrgCmd ¶
func ApproveForMyOrgCmd(a *ApproverForMyOrg) *cobra.Command
ApproveForMyOrgCmd returns the cobra command for chaincode ApproveForMyOrg
func InstallCmd ¶
InstallCmd returns the cobra command for chaincode install.
func PackageCmd ¶
PackageCmd returns the cobra command for packaging chaincode
func QueryCommittedCmd ¶
func QueryCommittedCmd(c *CommittedQuerier) *cobra.Command
QueryCommittedCmd returns the cobra command for querying a committed chaincode definition given the chaincode name
func QueryInstalledCmd ¶
func QueryInstalledCmd(i *InstalledQuerier) *cobra.Command
QueryInstalledCmd returns the cobra command for listing the installed chaincodes
Types ¶
type ApprovalStatusOutput ¶
type ApproveForMyOrgInput ¶
type ApproveForMyOrgInput struct {
	ChannelID                string
	Name                     string
	Version                  string
	PackageID                string
	Sequence                 int64
	EndorsementPlugin        string
	ValidationPlugin         string
	ValidationParameterBytes []byte
	CollectionConfigPackage  *cb.CollectionConfigPackage
	InitRequired             bool
	PeerAddresses            []string
	WaitForEvent             bool
	WaitForEventTimeout      time.Duration
	TxID                     string
}
    ApproveForMyOrgInput 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
func (*ApproveForMyOrgInput) Validate ¶
func (a *ApproveForMyOrgInput) Validate() error
Validate the input for an ApproveChaincodeDefinitionForMyOrg proposal
type ApproverForMyOrg ¶
type ApproverForMyOrg struct {
	Certificate     tls.Certificate
	Command         *cobra.Command
	BroadcastClient common.BroadcastClient
	DeliverClients  []pb.DeliverClient
	EndorserClients []EndorserClient
	Input           *ApproveForMyOrgInput
	Signer          Signer
}
    ApproverForMyOrg holds the dependencies needed to approve a chaincode definition for an organization
func (*ApproverForMyOrg) Approve ¶
func (a *ApproverForMyOrg) Approve() error
Approve submits a ApproveChaincodeDefinitionForMyOrg proposal
type ClientConnections ¶
type ClientConnections struct {
	BroadcastClient common.BroadcastClient
	DeliverClients  []pb.DeliverClient
	EndorserClients []pb.EndorserClient
	Certificate     tls.Certificate
	Signer          identity.SignerSerializer
}
    ClientConnections holds the clients for connecting to the various endpoints in a Fabric network.
func NewClientConnections ¶
func NewClientConnections(input *ClientConnectionsInput) (*ClientConnections, error)
NewClientConnections creates a new set of client connections based on the input parameters.
type ClientConnectionsInput ¶
type ClientConnectionsInput struct {
	CommandName           string
	EndorserRequired      bool
	OrdererRequired       bool
	OrderingEndpoint      string
	ChannelID             string
	PeerAddresses         []string
	TLSRootCertFiles      []string
	ConnectionProfilePath string
	TLSEnabled            bool
}
    ClientConnectionsInput holds the input parameters for creating client connections.
type CommitInput ¶
type CommitInput struct {
	ChannelID                string
	Name                     string
	Version                  string
	Hash                     []byte
	Sequence                 int64
	EndorsementPlugin        string
	ValidationPlugin         string
	ValidationParameterBytes []byte
	CollectionConfigPackage  *cb.CollectionConfigPackage
	InitRequired             bool
	PeerAddresses            []string
	WaitForEvent             bool
	WaitForEventTimeout      time.Duration
	TxID                     string
}
    CommitInput 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
func (*CommitInput) Validate ¶
func (c *CommitInput) Validate() error
Validate the input for a CommitChaincodeDefinition proposal
type CommittedQuerier ¶
type CommittedQuerier struct {
	Command        *cobra.Command
	Input          *CommittedQueryInput
	EndorserClient EndorserClient
	Signer         Signer
}
    CommittedQuerier holds the dependencies needed to query the committed chaincode definitions
func (*CommittedQuerier) Query ¶
func (c *CommittedQuerier) Query() error
Query returns the committed chaincode definition for a given channel and chaincode name
type CommittedQueryInput ¶
type Committer ¶
type Committer struct {
	Certificate     tls.Certificate
	Command         *cobra.Command
	BroadcastClient common.BroadcastClient
	EndorserClients []EndorserClient
	DeliverClients  []pb.DeliverClient
	Input           *CommitInput
	Signer          Signer
}
    Committer holds the dependencies needed to commit a chaincode
type EndorserClient ¶
type EndorserClient interface {
	ProcessProposal(ctx context.Context, in *pb.SignedProposal, opts ...grpc.CallOption) (*pb.ProposalResponse, error)
}
    EndorserClient defines the interface for sending a proposal to an endorser
type InstallInput ¶
type InstallInput struct {
	PackageFile string
}
    InstallInput holds the input parameters for installing a chaincode.
func (*InstallInput) Validate ¶
func (i *InstallInput) Validate() error
Validate checks that the required install parameters are provided.
type InstalledQuerier ¶
type InstalledQuerier struct {
	Command        *cobra.Command
	EndorserClient EndorserClient
	Signer         Signer
}
    InstalledQuerier holds the dependencies needed to query the installed chaincodes
func (*InstalledQuerier) Query ¶
func (i *InstalledQuerier) Query() error
Query returns the chaincodes installed on a peer
type Installer ¶
type Installer struct {
	Command        *cobra.Command
	EndorserClient EndorserClient
	Input          *InstallInput
	Reader         Reader
	Signer         Signer
}
    Installer holds the dependencies needed to install a chaincode.
func (*Installer) InstallChaincode ¶
InstallChaincode installs the chaincode.
type PackageInput ¶
PackageInput holds the input parameters for packaging a ChaincodeInstallPackage
func (*PackageInput) Validate ¶
func (p *PackageInput) Validate() error
Validate checks for the required inputs
type PackageMetadata ¶
type PackageMetadata struct {
	Path  string `json:"Path"`
	Type  string `json:"Type"`
	Label string `json:"Label"`
}
    PackageMetadata holds the path and type for a chaincode package
type Packager ¶
type Packager struct {
	Command          *cobra.Command
	Input            *PackageInput
	PlatformRegistry PlatformRegistry
	Writer           Writer
}
    Packager holds the dependencies needed to package a chaincode and write it
func (*Packager) Package ¶
Package packages chaincodes into the package type, (.tar.gz) used by _lifecycle and writes it to disk
func (*Packager) PackageChaincode ¶
PackageChaincode packages a chaincode.
type PeerDeliverClient ¶
type PeerDeliverClient interface {
	Deliver(ctx context.Context, opts ...grpc.CallOption) (pb.Deliver_DeliverClient, error)
	DeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (pb.Deliver_DeliverClient, error)
}
    PeerDeliverClient defines the interface for a peer deliver client
type PlatformRegistry ¶
PlatformRegistry defines the interface to get the code bytes for a chaincode given the type and path
type QueryApprovalStatus ¶
type QueryApprovalStatus struct {
	Command        *cobra.Command
	EndorserClient pb.EndorserClient
	Input          *QueryApprovalStatusInput
	Signer         identity.SignerSerializer
}
    QueryApprovalStatus holds the dependencies needed to approve a chaincode definition for an organization
func (*QueryApprovalStatus) Approve ¶
func (a *QueryApprovalStatus) Approve() error
type QueryApprovalStatusInput ¶
type QueryApprovalStatusInput struct {
	ChannelID                string
	Name                     string
	Version                  string
	PackageID                string
	Sequence                 int64
	EndorsementPlugin        string
	ValidationPlugin         string
	ValidationParameterBytes []byte
	CollectionConfigPackage  *cb.CollectionConfigPackage
	InitRequired             bool
	PeerAddresses            []string
	TxID                     string
}
    QueryApprovalStatusInput 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
func (*QueryApprovalStatusInput) Validate ¶
func (a *QueryApprovalStatusInput) Validate() error