ops

package
v0.0.0-...-db48615 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ApplicationOrg identifies that OrgType is application organization.
	ApplicationOrg = "Application"

	// OrdererOrg identifies that OrgType is application organization.
	OrdererOrg = "Orderer"

	// ConsortiumsOrg identifies that OrgType is consortiums organization.
	ConsortiumsOrg = "Consortiums"
)

Variables

This section is empty.

Functions

func OutputConfigTXToCreateChannel

func OutputConfigTXToCreateChannel(outputDir string, outputFile string, outputFormat string, channelID string, profilePath string) error

OutputConfigTXToCreateChannel creates ConfigUpdate for creating the specified channel by using the specified profile and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputConfigTXToDoMultipleOps

func OutputConfigTXToDoMultipleOps(blockPath string, outputDir string, outputFile string, outputFormat string, channelID string, profile string) error

OutputConfigTXToDoMultipleOps creates ConfigUpdate for executing multiple operations to update the specified channel by using the specified profile and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputConfigTXToRemoveConsenter

func OutputConfigTXToRemoveConsenter(blockPath string, outputDir string, outputFile string, outputFormat string, channelID string, address string) error

OutputConfigTXToRemoveConsenter creates ConfigUpdate for remove the specified consenter from the specified channel and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputConfigTXToRemoveOrg

func OutputConfigTXToRemoveOrg(blockPath string, outputDir string, outputFile string, outputFormat string, channelID string, orgName string, orgType string) error

OutputConfigTXToRemoveOrg creates ConfigUpdate for removing the specified organization from the specified channel and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputConfigTXToSetChannel

func OutputConfigTXToSetChannel(blockPath string, outputDir string, outputFile string, outputFormat string, channelID string, profilePath string) error

OutputConfigTXToSetChannel creates ConfigUpdate for updating the channel configuration of the specified channel by using the specified profile and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputConfigTXToSetConsenter

func OutputConfigTXToSetConsenter(blockPath string, outputDir string, outputFile string, outputFormat string, channelID string, profilePath string) error

OutputConfigTXToSetConsenter creates ConfigUpdate for upserting the consenter to the specified channel by using the specified profile and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputConfigTXToSetOrderer

func OutputConfigTXToSetOrderer(blockPath string, outputDir string, outputFile string, outputFormat string, channelID string, profilePath string) error

OutputConfigTXToSetOrderer creates ConfigUpdate for updating the orderer configuration of the specified channel by using the specified profile and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputConfigTXToSetOrg

func OutputConfigTXToSetOrg(blockPath string, outputDir string, outputFile string, outputFormat string, channelID string, profilePath string, orgType string) error

OutputConfigTXToSetOrg creates ConfigUpdate for upserting the consenter to the specified channel by using the specified profile and then outputs the ConfigUpdate to the specified output path with the specified output format.

func OutputEnvelopedConfigTx

func OutputEnvelopedConfigTx(profile string, outputDirectory string, outputFile string) error

OutputEnvelopedConfigTx outputs the config envelope by using the specified profile to the specified output path.

func OutputSign

func OutputSign(configTxPath string, outputDirectory string, outputFile string, mspID string, keyPath string, certPath string) error

OutputSign outputs the ConfigSignature signed by specified MSP to the specified ConfigUpdate using with the specified sign key and cert.

Types

type AnchorPeer

type AnchorPeer struct {
	Host string `yaml:"Host"`
	Port int    `yaml:"Port"`
}

AnchorPeer contains the configuration information for a anchor peer

type Application

type Application struct {
	Policies map[string]*Policy `yaml:"Policies"`
	ACLs     map[string]string  `yaml:"ACLs"`
}

Application contains the configuration information for a application channel. (This is only used for channel update)

type ApplicationForChannelCreation

type ApplicationForChannelCreation struct {
	Policies      map[string]*Policy `yaml:"Policies"`
	ACLs          map[string]string  `yaml:"ACLs"`
	Capabilities  []string           `yaml:"Capabilities"`
	Organizations []string           `yaml:"Organizations"`
}

ApplicationForChannelCreation contains the configuration information for a application channel. (This is only used for channel creation)

type BatchSize

type BatchSize struct {
	MaxMessageCount   uint32 `yaml:"MaxMessageCount"`
	AbsoluteMaxBytes  string `yaml:"AbsoluteMaxBytes"`
	PreferredMaxBytes string `yaml:"PreferredMaxBytes"`
}

BatchSize contains configuration affecting the size of batches.

type Channel

type Channel struct {
	Policies map[string]*Policy `yaml:"Policies"`
}

Channel contains the configuration information for a system channel.

type ChannelCreationProfile

type ChannelCreationProfile struct {
	Consortium  string                         `yaml:"Consortium"`
	Application *ApplicationForChannelCreation `yaml:"Application"`
}

ChannelCreationProfile is a profile to create a channel.

type ChannelProfile

type ChannelProfile struct {
	Application *Application `yaml:"Application"`
	Channel     *Channel     `yaml:"Channel"`
}

ChannelProfile is a profile to update the channel configuration on a channel.

type ConfigTxProfile

type ConfigTxProfile struct {
	ConfigUpdate string            `yaml:"configUpdate"`
	Signatures   map[string]string `yaml:"signatures"`
}

ConfigTxProfile is a profile to output config envelope.

type Consenter

type Consenter struct {
	Host          string `yaml:"Host"`
	Port          int    `yaml:"Port"`
	ClientTLSCert string `yaml:"ClientTLSCert"`
	ServerTLSCert string `yaml:"ServerTLSCert"`
}

Consenter contains the configuration information for a consenter.

type EtcdRaftOptions

type EtcdRaftOptions struct {
	TickInterval         string `yaml:"TickInterval"`
	ElectionTick         uint32 `yaml:"ElectionTick"`
	HeartbeatTick        uint32 `yaml:"HeartbeatTick"`
	MaxInflightBlocks    uint32 `yaml:"MaxInflightBlocks"`
	SnapshotIntervalSize string `yaml:"SnapshotIntervalSize"`
}

EtcdRaftOptions contains configuration for Raft orderer.

type Instruction

type Instruction struct {
	Command    string      `yaml:"Command"`
	Parameters interface{} `yaml:"Parameters"`
}

Instruction represents a update operation.

type MSP

type MSP struct {
	RootCerts                     []string       `yaml:"RootCerts"`
	IntermediateCerts             []string       `yaml:"IntermediateCerts"`
	Admins                        []string       `yaml:"Admins"`
	RevocationList                []string       `yaml:"RevocationList"`
	OrganizationalUnitIdentifiers []OUIdentifier `yaml:"OrganizationalUnitIdentifiers"`
	TLSRootCerts                  []string       `yaml:"TLSRootCerts"`
	TLSIntermediateCerts          []string       `yaml:"TLSIntermediateCerts"`
	NodeOUs                       NodeOUs        `yaml:"NodeOUs"`
}

MSP contains the configuration information for a MSP

type NodeOUs

type NodeOUs struct {
	Enable              bool          `yaml:"Enable"`
	ClientOUIdentifier  *OUIdentifier `yaml:"ClientOUIdentifier"`
	PeerOUIdentifier    *OUIdentifier `yaml:"PeerOUIdentifier"`
	AdminOUIdentifier   *OUIdentifier `yaml:"AdminOUIdentifier"`
	OrdererOUIdentifier *OUIdentifier `yaml:"OrdererOUIdentifier"`
}

NodeOUs contains information on how to tell apart clients, peers and orderers based on OUs. If the check is enforced, by setting Enabled to true, the MSP will consider an identity valid if it is an identity of a client, a peer or an orderer. An identity should have only one of these special OUs.

type OUIdentifier

type OUIdentifier struct {
	OrganizationalUnitIdentifier string `yaml:"OrganizationalUnitIdentifier"`
	Certificate                  string `yaml:"Certificate"`
}

OUIdentifier is used to represent an OU and an associated trusted certificate.

type OrdererProfile

type OrdererProfile struct {
	OrdererType     string           `yaml:"OrdererType"`
	BatchTimeout    string           `yaml:"BatchTimeout"`
	BatchSize       BatchSize        `yaml:"BatchSize"`
	EtcdRaftOptions *EtcdRaftOptions `yaml:"EtcdRaftOptions"`
	MaxChannels     uint64           `yaml:"MaxChannels"`
	// Capabilities    map[string]bool    `yaml:"Capabilities"` // Out of scope
	Policies map[string]*Policy `yaml:"Policies"`
}

OrdererProfile is a profile to update the orderer configuration on a channel.

type OrganizationProfile

type OrganizationProfile struct {
	Name     string             `yaml:"Name"`
	ID       string             `yaml:"ID"`
	MSPDir   string             `yaml:"MSPDir"`
	MSP      MSP                `yaml:"MSP"`
	Policies map[string]*Policy `yaml:"Policies"`

	AnchorPeers      []*AnchorPeer `yaml:"AnchorPeers"`
	OrdererEndpoints []string      `yaml:"OrdererEndpoints"`
}

OrganizationProfile is a profile to add or update an organization.

type Policy

type Policy struct {
	Type string `yaml:"Type"`
	Rule string `yaml:"Rule"`
}

Policy contains the configuration information for a policy

type ProviderType

type ProviderType int

ProviderType indicates the type of an identity provider

const (
	FABRIC ProviderType = iota // MSP is of FABRIC type
	IDEMIX                     // MSP is of IDEMIX type
	OTHER                      // MSP is of OTHER TYPE

)

The ProviderType of a member relative to the member API

type RemoveConsenterParameters

type RemoveConsenterParameters struct {
	ConsenterAddress string `yaml:"ConsenterAddress"`
}

RemoveConsenterParameters represents to do remove-consenter.

type RemoveOrgParameters

type RemoveOrgParameters struct {
	OrgType string `yaml:"OrgType"`
	OrgName string `yaml:"OrgName"`
}

RemoveOrgParameters represents to do remove-org.

type SetChannelParameters

type SetChannelParameters struct {
	Channel ChannelProfile `yaml:"Channel"`
}

SetChannelParameters represents to do set-channel.

type SetConsenterParameters

type SetConsenterParameters struct {
	Consenter Consenter `yaml:"Consenter"`
}

SetConsenterParameters represents to do set-consenter.

type SetOrdererParameters

type SetOrdererParameters struct {
	Orderer OrdererProfile `yaml:"Orderer"`
}

SetOrdererParameters represents to do set-orderer.

type SetOrgParameters

type SetOrgParameters struct {
	OrgType string              `yaml:"OrgType"`
	Org     OrganizationProfile `yaml:"Org"`
}

SetOrgParameters represents to do set-org.

Jump to

Keyboard shortcuts

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