chaincode

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproveForMyOrgCmd

func ApproveForMyOrgCmd(a *ApproverForMyOrg) *cobra.Command

func CheckCommitReadinessCmd

func CheckCommitReadinessCmd(c *CommitReadinessChecker) *cobra.Command

func Cmd

func Cmd() *cobra.Command

func CommitCmd

func CommitCmd(c *Committer) *cobra.Command

func GetInstalledPackageCmd

func GetInstalledPackageCmd(i *InstalledPackageGetter) *cobra.Command

func InstallCmd

func InstallCmd(i *Installer) *cobra.Command

func PackageCmd

func PackageCmd(p *Packager) *cobra.Command

func QueryCommittedCmd

func QueryCommittedCmd(c *CommittedQuerier) *cobra.Command

func QueryInstalledCmd

func QueryInstalledCmd(i *InstalledQuerier) *cobra.Command

func ResetFlags

func ResetFlags()

func SimulateCommitCmd

func SimulateCommitCmd(c *CommitSimulator) *cobra.Command

Types

type ApprovalStatusOutput

type ApprovalStatusOutput struct {
	Approved map[string]bool `json:"Approved"`
}

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
}

func (*ApproveForMyOrgInput) Validate

func (a *ApproveForMyOrgInput) Validate() error

type ApproverForMyOrg

type ApproverForMyOrg struct {
	Certificate     tls.Certificate
	Command         *cobra.Command
	BroadcastClient common.BroadcastClient
	DeliverClients  []pb.DeliverClient
	EndorserClients []EndorserClient
	Input           *ApproveForMyOrgInput
	Signer          Signer
}

func (*ApproverForMyOrg) Approve

func (a *ApproverForMyOrg) Approve() error

type ChaincodeDefinition

type ChaincodeDefinition interface {
	GetVersion() string
	GetSequence() int64
	GetEndorsementPlugin() string
	GetValidationPlugin() string
}

type ClientConnections

type ClientConnections struct {
	BroadcastClient common.BroadcastClient
	DeliverClients  []pb.DeliverClient
	EndorserClients []pb.EndorserClient
	Certificate     tls.Certificate
	Signer          identity.SignerSerializer
}

func NewClientConnections

func NewClientConnections(input *ClientConnectionsInput) (*ClientConnections, error)

type ClientConnectionsInput

type ClientConnectionsInput struct {
	CommandName           string
	EndorserRequired      bool
	OrdererRequired       bool
	OrderingEndpoint      string
	ChannelID             string
	PeerAddresses         []string
	TLSRootCertFiles      []string
	ConnectionProfilePath string
	TLSEnabled            bool
}

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
}

func (*CommitInput) Validate

func (c *CommitInput) Validate() error

type CommitReadinessCheckInput

type CommitReadinessCheckInput 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
	OutputFormat             string
}

func (*CommitReadinessCheckInput) Validate

func (c *CommitReadinessCheckInput) Validate() error

type CommitReadinessChecker

type CommitReadinessChecker struct {
	Command        *cobra.Command
	EndorserClient pb.EndorserClient
	Input          *CommitReadinessCheckInput
	Signer         identity.SignerSerializer
	Writer         io.Writer
}

func (*CommitReadinessChecker) ReadinessCheck

func (c *CommitReadinessChecker) ReadinessCheck() error

type CommitSimulationInput

type CommitSimulationInput 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
	OutputFormat             string
}

func (*CommitSimulationInput) Validate

func (c *CommitSimulationInput) Validate() error

type CommitSimulator

type CommitSimulator struct {
	Command        *cobra.Command
	EndorserClient pb.EndorserClient
	Input          *CommitSimulationInput
	Signer         identity.SignerSerializer
	Writer         io.Writer
}

func (*CommitSimulator) Simulate

func (c *CommitSimulator) Simulate() error

type CommittedQuerier

type CommittedQuerier struct {
	Command        *cobra.Command
	Input          *CommittedQueryInput
	EndorserClient EndorserClient
	Signer         Signer
	Writer         io.Writer
}

func (*CommittedQuerier) Query

func (c *CommittedQuerier) Query() error

type CommittedQueryInput

type CommittedQueryInput struct {
	ChannelID    string
	Name         string
	OutputFormat string
}

type Committer

type Committer struct {
	Certificate     tls.Certificate
	Command         *cobra.Command
	BroadcastClient common.BroadcastClient
	EndorserClients []EndorserClient
	DeliverClients  []pb.DeliverClient
	Input           *CommitInput
	Signer          Signer
}

func (*Committer) Commit

func (c *Committer) Commit() error

type EndorserClient

type EndorserClient interface {
	ProcessProposal(ctx context.Context, in *pb.SignedProposal, opts ...grpc.CallOption) (*pb.ProposalResponse, error)
}

type GetInstalledPackageInput

type GetInstalledPackageInput struct {
	PackageID       string
	OutputDirectory string
}

func (*GetInstalledPackageInput) Validate

func (i *GetInstalledPackageInput) Validate() error

type InstallInput

type InstallInput struct {
	PackageFile string
}

func (*InstallInput) Validate

func (i *InstallInput) Validate() error

type InstalledPackageGetter

type InstalledPackageGetter struct {
	Command        *cobra.Command
	Input          *GetInstalledPackageInput
	EndorserClient EndorserClient
	Signer         Signer
	Writer         Writer
}

func (*InstalledPackageGetter) Get

func (i *InstalledPackageGetter) Get() error

type InstalledQuerier

type InstalledQuerier struct {
	Command        *cobra.Command
	Input          *InstalledQueryInput
	EndorserClient EndorserClient
	Signer         Signer
	Writer         io.Writer
}

func (*InstalledQuerier) Query

func (i *InstalledQuerier) Query() error

type InstalledQueryInput

type InstalledQueryInput struct {
	OutputFormat string
}

type Installer

type Installer struct {
	Command        *cobra.Command
	EndorserClient EndorserClient
	Input          *InstallInput
	Reader         Reader
	Signer         Signer
}

func (*Installer) Install

func (i *Installer) Install() error

func (*Installer) InstallChaincode

func (i *Installer) InstallChaincode(args []string) error

type PackageInput

type PackageInput struct {
	OutputFile string
	Path       string
	Type       string
	Label      string
}

func (*PackageInput) Validate

func (p *PackageInput) Validate() error

type PackageMetadata

type PackageMetadata struct {
	Path  string `json:"Path"`
	Type  string `json:"Type"`
	Label string `json:"Label"`
}

type Packager

type Packager struct {
	Command          *cobra.Command
	Input            *PackageInput
	PlatformRegistry PlatformRegistry
	Writer           Writer
}

func (*Packager) Package

func (p *Packager) Package() error

func (*Packager) PackageChaincode

func (p *Packager) PackageChaincode(args []string) error

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)
}

type PlatformRegistry

type PlatformRegistry interface {
	GetDeploymentPayload(ccType, path string) ([]byte, error)
	NormalizePath(ccType, path string) (string, error)
}

type QueryApprovalStatus

type QueryApprovalStatus struct {
	Command        *cobra.Command
	EndorserClient pb.EndorserClient
	Input          *QueryApprovalStatusInput
	Signer         identity.SignerSerializer
}

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
}

func (*QueryApprovalStatusInput) Validate

func (a *QueryApprovalStatusInput) Validate() error

type Reader

type Reader interface {
	ReadFile(string) ([]byte, error)
}

type Signer

type Signer interface {
	Sign(msg []byte) ([]byte, error)
	Serialize() ([]byte, error)
}

type Writer

type Writer interface {
	WriteFile(string, string, []byte) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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