fabric

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FabricCAImageName = "hyperledger/fabric-ca:1.5"
View Source
var FabricOrdererImageName = "hyperledger/fabric-orderer:2.3"
View Source
var FabricPeerImageName = "hyperledger/fabric-peer:2.3"
View Source
var FabricToolsImageName = "hyperledger/fabric-tools:2.3"

Functions

func GenerateDockerServiceDefinitions

func GenerateDockerServiceDefinitions(s *types.Stack) []*docker.ServiceDefinition

func WriteCryptogenConfig

func WriteCryptogenConfig(memberCount int, path string) error

func WriteNetworkConfig

func WriteNetworkConfig(outputPath string) error

Types

type Account added in v0.0.47

type Account struct {
	Name    string `json:"name"`
	OrgName string `json:"orgName"`
}

type BCCSP

type BCCSP struct {
	Security *BCCSPSecurity `yaml:"security,omitempty"`
}

type BCCSPSecurity

type BCCSPSecurity struct {
	Default       *Provider `yaml:"default,omitempty"`
	Enabled       bool      `yaml:"enabled,omitempty"`
	HashAlgorithm string    `yaml:"hashAlgorithm,omitempty"`
	Level         int       `yaml:"level,omitempty"`
	SoftVerify    bool      `yaml:"softVerify,omitempty"`
}

type CA

type CA struct {
	Hostname           string `yaml:"Hostname,omitempty"`
	Country            string `yaml:"Country,omitempty"`
	Province           string `yaml:"Province,omitempty"`
	Locality           string `yaml:"Locality,omitempty"`
	OrganizationalUnit string `yaml:"OrganizationalUnit,omitempty"`
}

type Channel

type Channel struct {
	Orderers []string                `yaml:"orderers,omitempty"`
	Peers    map[string]*ChannelPeer `yaml:"peers,omitempty"`
}

type ChannelPeer

type ChannelPeer struct {
	ChaincodeQuery bool `yaml:"chaincodeQuery,omitempty"`
	EndorsingPeer  bool `yaml:"endorsingPeer,omitempty"`
	EventSource    bool `yaml:"eventSource,omitempty"`
	LedgerQuery    bool `yaml:"ledgerQuery,omitempty"`
}

type Client

type Client struct {
	BCCSP           *BCCSP           `yaml:"BCCSP,omitempty"`
	CredentialStore *CredentialStore `yaml:"credentialStore"`
	CryptoConfig    *Path            `yaml:"cryptoconfig,omitempty"`
	Logging         *Logging         `yaml:"logging,omitempty"`
	Organization    string           `yaml:"organization,omitempty"`
	TLSCerts        *TLSCerts        `yaml:"tlsCerts,omitempty"`
}

type CredentialStore

type CredentialStore struct {
	CryptoStore *Path  `yaml:"cryptoStore,omitempty"`
	Path        string `yaml:"path,omitempty"`
}

type CryptogenConfig

type CryptogenConfig struct {
	OrdererOrgs []*Org `yaml:"OrdererOrgs,omitempty"`
	PeerOrgs    []*Org `yaml:"PeerOrgs,omitempty"`
}

type FabricNetworkConfig

type FabricNetworkConfig struct {
	CertificateAuthorities map[string]*NetworkEntity `yaml:"certificateAuthorities,omitempty"`
	Channels               map[string]*Channel       `yaml:"channels,omitempty"`
	Client                 *Client                   `yaml:"client,omitempty"`
	Organization           string                    `yaml:"organization,omitempty"`
	Orderers               map[string]*NetworkEntity `yaml:"orderers,omitempty"`
	Organizations          map[string]*Organization  `yaml:"organizations,omitempty"`
	Peers                  map[string]*NetworkEntity `yaml:"peers,omitempty"`
	Version                string                    `yaml:"version,omitempty"`
}

type FabricProvider

type FabricProvider struct {
	// contains filtered or unexported fields
}

func NewFabricProvider added in v1.1.0

func NewFabricProvider(ctx context.Context, stack *types.Stack) *FabricProvider

func (*FabricProvider) CreateAccount added in v0.0.47

func (p *FabricProvider) CreateAccount(args []string) (interface{}, error)

func (*FabricProvider) DeployContract added in v0.0.45

func (p *FabricProvider) DeployContract(filename, contractName, instanceName string, member *types.Organization, extraArgs []string) (*types.ContractDeploymentResult, error)

func (*FabricProvider) DeployFireFlyContract added in v0.0.47

func (p *FabricProvider) DeployFireFlyContract() (*types.ContractDeploymentResult, error)

func (*FabricProvider) FirstTimeSetup

func (p *FabricProvider) FirstTimeSetup() error

func (*FabricProvider) GetBlockchainPluginConfig added in v1.1.0

func (p *FabricProvider) GetBlockchainPluginConfig(stack *types.Stack, m *types.Organization) (blockchainConfig *types.BlockchainConfig)

func (*FabricProvider) GetConnectorExternalURL added in v1.1.0

func (p *FabricProvider) GetConnectorExternalURL(org *types.Organization) string

func (*FabricProvider) GetConnectorName added in v1.1.0

func (p *FabricProvider) GetConnectorName() string

func (*FabricProvider) GetConnectorURL added in v1.1.0

func (p *FabricProvider) GetConnectorURL(org *types.Organization) string

func (*FabricProvider) GetContracts added in v0.0.45

func (p *FabricProvider) GetContracts(filename string, extraArgs []string) ([]string, error)

func (*FabricProvider) GetDockerServiceDefinitions

func (p *FabricProvider) GetDockerServiceDefinitions() []*docker.ServiceDefinition

func (*FabricProvider) GetOrgConfig added in v1.1.0

func (p *FabricProvider) GetOrgConfig(stack *types.Stack, m *types.Organization) (orgConfig *types.OrgConfig)

func (*FabricProvider) ParseAccount added in v0.0.47

func (p *FabricProvider) ParseAccount(account interface{}) interface{}

func (*FabricProvider) PostStart

func (p *FabricProvider) PostStart(firstTimeSetup bool) error

func (*FabricProvider) PreStart

func (p *FabricProvider) PreStart() error

func (*FabricProvider) Reset

func (p *FabricProvider) Reset() error

func (*FabricProvider) WriteConfig

func (p *FabricProvider) WriteConfig(options *types.InitOptions) error

type InstalledChaincode

type InstalledChaincode struct {
	PackageID string `json:"package_id,omitempty"`
	Label     string `json:"label,omitempty"`
}

type Logging

type Logging struct {
	Level string `yaml:"level,omitempty"`
}

type NetworkEntity

type NetworkEntity struct {
	TLSCACerts *Path      `yaml:"tlsCACerts,omitempty"`
	URL        string     `yaml:"url,omitempty"`
	Registrar  *Registrar `yaml:"registrar,omitempty"`
}

type Org

type Org struct {
	Name          string    `yaml:"Orderer,omitempty"`
	Domain        string    `yaml:"Domain,omitempty"`
	EnableNodeOUs bool      `yaml:"EnableNodeOUs"`
	Specs         []*Spec   `yaml:"Specs,omitempty"`
	CA            *CA       `yaml:"CA,omitempty"`
	Template      *Template `yaml:"Template,omitempty"`
	Users         *Users    `yaml:"Users,omitempty"`
}

type Organization

type Organization struct {
	CertificateAuthorities []string `yaml:"certificateAuthorities,omitempty"`
	CryptoPath             string   `yaml:"cryptoPath,omitempty"`
	MSPID                  string   `yaml:"mspid,omitempty"`
	Peers                  []string `yaml:"peers,omitempty"`
}

type Path

type Path struct {
	Path string `yaml:"path,omitempty"`
}

type Provider

type Provider struct {
	Provider string `yaml:"provider,omitempty"`
}

type QueryInstalledResponse

type QueryInstalledResponse struct {
	InstalledChaincodes []*InstalledChaincode `json:"installed_chaincodes"`
}

type Registrar

type Registrar struct {
	EnrollID     string `yaml:"enrollId,omitempty"`
	EnrollSecret string `yaml:"enrollSecret,omitempty"`
}

type Spec

type Spec struct {
	Hostname string `yaml:"Hostname,omitempty"`
}

type TLSCerts

type TLSCerts struct {
	Client *TLSCertsClient `yaml:"client,omitempty"`
}

type TLSCertsClient

type TLSCertsClient struct {
	Cert *Path `yaml:"cert,omitempty"`
	Key  *Path `yaml:"key,omitempty"`
}

type Template

type Template struct {
	Count    int    `yaml:"Count,omitempty"`
	Hostname string `yaml:"Hostname,omitempty"`
}

type Users

type Users struct {
	Count int `yaml:"Count,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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