Documentation
¶
Index ¶
- func DoCommandAction(config inputStructs.Config) error
- func SetEnvForCLI(orgName, peerName, connProfilePath, tls, currentDir string) error
- type BlockchainCount
- type BurstOptions
- type CCOptions
- type ChannelOptions
- type ChannelUIObject
- type ConnProfileOptions
- type ConstantOptions
- type DiscoveryOptions
- type EndorsementPolicy
- type EventOptions
- type Identity
- type InstallCCDeployOpt
- type InstallCCUIObject
- type InstalledCC
- type InstantiateCCUIObject
- type InstantiateDeployOptions
- type InvokeQueryUIObject
- type JoinBySnapshotUIObject
- type MixOptions
- type OrdererOptions
- type Parameters
- type PeerOptions
- type Policy
- type Result
- type SnapshotOptions
- type SnapshotUIObject
- type TimeOutOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetEnvForCLI ¶
SetEnvForCLI -- sets environment variables for running peer cli commands
Types ¶
type BlockchainCount ¶
type BlockchainCount struct {
// contains filtered or unexported fields
}
type BurstOptions ¶
type BurstOptions struct {
BurstFreq0 string `json:"burstFreq0,omitempty"`
BurstDur0 string `json:"burstDur0,omitempty"`
BurstFreq1 string `json:"burstFreq1,omitempty"`
BurstDur1 string `json:"burstDur1,omitempty"`
}
BurstOptions --
type CCOptions ¶
type CCOptions struct {
KeyIdx []int `json:"keyIdx,omitempty"`
KeyPayLoad []int `json:"keyPayLoad,omitempty"`
KeyStart string `json:"keyStart,omitempty"`
PayLoadMin string `json:"payLoadMin,omitempty"`
PayLoadMax string `json:"payLoadMax,omitempty"`
PayLoadType string `json:"payLoadType,omitempty"`
}
CCOptions --
type ChannelOptions ¶
type ChannelOptions struct {
Name string `json:"name,omitempty"`
ChannelTX string `json:"channelTX,omitempty"`
Action string `json:"action,omitempty"`
OrgName []string `json:"orgName,omitempty"`
}
ChannelOptions --
type ChannelUIObject ¶
type ChannelUIObject struct {
TransType string `json:"transType,omitempty"`
TLS string `json:"TLS,omitempty"`
ChannelOpt ChannelOptions `json:"channelOpt,omitempty"`
ConnProfilePath string `json:"ConnProfilePath,omitempty"`
OrdererSystemChannel string `json:"ordererSystemChannel,omitempty"`
}
ChannelUIObject --
func (ChannelUIObject) ChannelConfigs ¶
func (c ChannelUIObject) ChannelConfigs(config inputStructs.Config, tls, action string) error
ChannelConfigs -- To create channel objects based on create, join and anchorpeer and perform the channel configs and to update connection profile
type ConnProfileOptions ¶
type ConnProfileOptions struct {
Organizations map[string]struct {
MSPID string `yaml:"mspid,omitempty"`
Peers []string `yaml:"peers,omitempty"`
} `yaml:"organizations,omitempty"`
Peers map[string]struct {
URL string `yaml:"url,omitempty"`
MetricsURL string `yaml:"metricsURL,omitempty"`
} `yaml:"peers,omitempty"`
Orderers map[string]struct {
URL string `yaml:"url,omitempty"`
MetricsURL string `yaml:"metricsURL,omitempty"`
}
Channels map[string]struct {
Orderers []string `yaml:"orderers,omitempty"`
Peers []string `yaml:"peers,omitempty"`
}
}
ConnProfileOptions --
func ConnProfileInformationForOrg ¶
func ConnProfileInformationForOrg(connProfilePath, orgName string) (ConnProfileOptions, error)
ConnProfileInformationForOrg -- To get the MSP ID for an organization
type ConstantOptions ¶
type ConstantOptions struct {
RecHist string `json:"recHist,omitempty"`
ConstFreq string `json:"constFreq,omitempty"`
DevFreq string `json:"devFreq,omitempty"`
}
ConstantOptions --
type DiscoveryOptions ¶
type DiscoveryOptions struct {
Localhost string `json:"localHost,omitempty"`
InitFreq int `json:"initFreq,omitempty"`
}
DiscoveryOptions --
type EndorsementPolicy ¶
type EndorsementPolicy struct {
Identities []Identity `json:"identities,omitempty"`
Policy map[string][]Policy `json:"policy,omitempty"`
SignaturePolicy string `json:"signaturePolicy,omitempty"`
}
EndorsementPolicy --
type EventOptions ¶
type EventOptions struct {
Type string `json:"type,omitempty"`
Listener string `json:"listener,omitempty"`
TimeOut string `json:"timeout,omitempty"`
}
EventOptions --
type Identity ¶
type Identity struct {
Role struct {
Name string `json:"name,omitempty"`
MSPID string `json:"mspId,omitempty"`
} `json:"role,omitempty"`
}
Identity --
type InstallCCDeployOpt ¶
type InstallCCDeployOpt struct {
ChainCodePath string `json:"chaincodePath,omitempty"`
MetadataPath string `json:"metadataPath,omitempty"`
Language string `json:"language,omitempty"`
}
InstallCCDeployOpt --
type InstallCCUIObject ¶
type InstallCCUIObject struct {
SDK string `json:"sdk,omitempty"`
TransType string `json:"transType,omitempty"`
TLS string `json:"TLS,omitempty"`
ChainCodeID string `json:"chaincodeID,omitempty"`
ChainCodeVer string `json:"chaincodeVer,omitempty"`
ChannelOpt ChannelOptions `json:"channelOpt,omitempty"`
DeployOpt InstallCCDeployOpt `json:"deploy,omitempty"`
ConnProfilePath string `json:"ConnProfilePath,omitempty"`
TargetPeers []string `json:"targetPeers,omitempty"`
}
InstallCCUIObject --
func (InstallCCUIObject) InstallCC ¶
func (i InstallCCUIObject) InstallCC(config inputStructs.Config, tls string) error
InstallCC -- To install chaincode with the chaincode objects created
type InstalledCC ¶
type InstalledCC struct {
CC []struct {
PackageID string `json:"package_id,omitempty"`
Label string `json:"label,omitempty"`
} `json:"installed_chaincodes,omitempty"`
}
InstalledCC --
type InstantiateCCUIObject ¶
type InstantiateCCUIObject struct {
SDK string `json:"sdk,omitempty"`
TransType string `json:"transType,omitempty"`
TLS string `json:"TLS,omitempty"`
ChainCodeID string `json:"chaincodeID,omitempty"`
ChainCodeVer string `json:"chaincodeVer,omitempty"`
OrgConnProfilePaths []inputStructs.Organization `json:"orgConnProfilePaths,omitempty"`
ChannelOpt ChannelOptions `json:"channelOpt,omitempty"`
DeployOpt InstantiateDeployOptions `json:"deploy,omitempty"`
TimeOutOpt TimeOutOptions `json:"timeoutOpt,omitempty"`
Sequence string `json:"sequence,omitempty"`
TargetPeers []string `json:"targetPeers,omitempty"`
}
InstantiateCCUIObject --
func (InstantiateCCUIObject) InstantiateCC ¶
func (i InstantiateCCUIObject) InstantiateCC(config inputStructs.Config, tls, action string) error
InstantiateCC -- To instantiate/upgrade chaincode with the objects created and to update connection profile
type InstantiateDeployOptions ¶
type InstantiateDeployOptions struct {
Function string `json:"fcn,omitempty"`
Arguments []string `json:"args,omitempty"`
Endorsement *EndorsementPolicy `json:"endorsement,omitempty"`
CollectionsConfigPath string `json:"collectionsConfigPath,omitempty"`
}
InstantiateDeployOptions --
type InvokeQueryUIObject ¶
type InvokeQueryUIObject struct {
LogLevel string `json:"logLevel,omitempty"`
ChaincodeID string `json:"chaincodeID,omitempty"`
InvokeCheck string `json:"invokeCheck,omitempty"`
TransMode string `json:"transMode,omitempty"`
TransType string `json:"transType,omitempty"`
InvokeType string `json:"invokeType,omitempty"`
TargetPeers string `json:"targetPeers,omitempty"`
TLS string `json:"TLS,omitempty"`
NProcPerOrg string `json:"nProcPerOrg,omitempty"`
NRequest string `json:"nRequest,omitempty"`
RunDur string `json:"runDur,omitempty"`
ChannelOpt ChannelOptions `json:"channelOpt,omitempty"`
BurstOpt BurstOptions `json:"burstOpt,omitempty"`
MixOpt MixOptions `json:"mixOpt,omitempty"`
ConstOpt ConstantOptions `json:"constantOpt,omitempty"`
EventOpt EventOptions `json:"eventOpt,omitempty"`
DiscoveryOpt DiscoveryOptions `json:"discoveryOpt,omitempty"`
ListOpt map[string][]string `json:"listOpt,omitempty"`
CCType string `json:"ccType,omitempty"`
CCOpt CCOptions `json:"ccOpt,omitempty"`
Parameters map[string]Parameters `json:"invoke,omitempty"`
ConnProfilePath string `json:"ConnProfilePath,omitempty"`
TimeOutOpt TimeOutOptions `json:"timeoutOpt,timeoutOpt"`
PeerFailover string `json:"peerFailover,omitempty"`
OrdererFailover string `json:"ordererFailover,omitempty"`
FailoverOpt PeerOptions `json:"failoverOpt,omitempty"`
OrdererOpt OrdererOptions `json:"ordererOpt,omitempty"`
Snapshot SnapshotOptions `json:"snapshot,omitempty"`
}
InvokeQueryUIObject --
func (InvokeQueryUIObject) InvokeQuery ¶
func (i InvokeQueryUIObject) InvokeQuery(config inputStructs.Config, tls, action string) error
InvokeQuery -- To perform invoke/query with the objects created
type JoinBySnapshotUIObject ¶
type JoinBySnapshotUIObject struct {
TLS string `json:"TLS,omitempty"`
ChannelOpt ChannelOptions `json:"ChannelOpt,omitempty"`
ConnProfilePath string `json:"ConnProfilePath,omitempty"`
TargetPeers []string `json:"targetPeers,omitempty"`
SnapshotPath string
SnapshotPeer string
}
JoinBySnapshotUIObject --
func (JoinBySnapshotUIObject) JoinBySnapshot ¶
func (j JoinBySnapshotUIObject) JoinBySnapshot(config inputStructs.Config, tls string) error
JoinBySnapshot -- To join channel using snapshot
type MixOptions ¶
type MixOptions struct {
MixFreq string `json:"mixFreq,omitempty"`
}
MixOptions --
type OrdererOptions ¶
type Parameters ¶
Parameters --
type PeerOptions ¶
type SnapshotOptions ¶
type SnapshotUIObject ¶
type SnapshotUIObject struct {
SDK string `json:"sdk,omitempty"`
TLS string `json:"TLS,omitempty"`
BlockNumber int `json:"BlockNumber,omitempty"`
ChannelOpt ChannelOptions `json:"ChannelOpt,omitempty"`
ConnProfilePath string `json:"ConnProfilePath,omitempty"`
TargetPeers []string `json:"targetPeers,omitempty"`
}
SnapshotUIObject --
func (SnapshotUIObject) Snapshot ¶
func (s SnapshotUIObject) Snapshot(config inputStructs.Config, tls string) error
Snapshot -- To snapshot channel
type TimeOutOptions ¶
type TimeOutOptions struct {
PreConfig string `json:"preConfig,omitempty"`
Request string `json:"request,omitempty"`
}
TimeOutOptions --