structure

package
v0.0.0-...-41c7706 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrdererPeer    = iota
	AnchorPeer     = iota
	CAPeer         = iota
	LeaderPeer     = iota
	CommittingPeer = iota
	EndorsingPeer  = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Organizations []string `yaml:"organizations" json:"organizations"`
	// contains filtered or unexported fields
}

type Ca

type Ca struct {
	PeerName   string `yaml:"peerName" json:"peerName"`
	OrgName    string `yaml:"orgName" json:"orgName"`
	DomainRoot string `yaml:"domainRoot" json:"domainRoot"`
	Port       uint   `yaml:"port" json:"port"`
	GrpcPort   uint   `yaml:"grpcPort" json:"grpcPort"`
}

type Channel

type Channel struct {
	Name          string   `yaml:"name" json:"name"`
	Consortium    string   `yaml:"consortium" json:"consortium"`
	Applications  []string `yaml:"applications" json:"applications"`
	Organizations []string `yaml:"organizations" json:"organizations"`
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Organizations []*Organization `yaml:"organizations" json:"organizations"`
	Channels      []*Channel      `yaml:"channels" json:"channels"`
	Applications  []*Application  `yaml:"applications" json:"applications"`
	NetworkName   string          `yaml:"networkName" json:"networkName"`
	// contains filtered or unexported fields
}

func ReadConfigFromFile

func ReadConfigFromFile(path string) *Config

func (*Config) AddCaToOrg

func (that *Config) AddCaToOrg(org *Organization, peerName string, orgName string, domainRoot string, port uint, grpcPort uint)

func (*Config) AddOrdererToOrg

func (that *Config) AddOrdererToOrg(org *Organization, peerName string, orgName string, domainRoot string, port uint)

func (*Config) AddOrganization

func (that *Config) AddOrganization(org *Organization)

func (*Config) AddPeerToOrg

func (that *Config) AddPeerToOrg(org *Organization, peerName string, orgName string, domainRoot string, port uint)

func (*Config) CreateOrganization

func (that *Config) CreateOrganization(orgName string, id string, domainRoot string, mapPath string) *Organization

func (*Config) Export

func (that *Config) Export(path string, name string, yamlOut bool, jsonOut bool)

func (*Config) FillConfigtx

func (that *Config) FillConfigtx()

FillConfigtx 填充configtx数据

func (*Config) FillCryptoConfig

func (that *Config) FillCryptoConfig()

FillCryptoConfig 填充crypto-config

func (*Config) FillDockerCompose

func (that *Config) FillDockerCompose()

FillDockerCompose 填充docker-compose

func (*Config) FindOrganization

func (that *Config) FindOrganization(orgName string) *Organization

type Orderer

type Orderer struct {
	PeerName      string `yaml:"peerName" json:"peerName"`
	OrgName       string `yaml:"orgName" json:"orgName"`
	DomainRoot    string `yaml:"domainRoot" json:"domainRoot"`
	Port          uint   `yaml:"port" json:"port"`
	OperationPort uint   `yaml:"operationPort" json:"operationPort"`
}

type Organization

type Organization struct {
	Name     string                         `yaml:"name" json:"name"`
	ID       string                         `yaml:"id" json:"id"`
	Domain   string                         `yaml:"domain" json:"domain"`
	MSPDir   string                         `yaml:"mspDir" json:"mspDir"`
	Cas      []*Ca                          `yaml:"Cas" json:"Cas"`
	Peers    []*Peer                        `yaml:"peers" json:"peers"`
	Orderers []*Orderer                     `yaml:"orderers" json:"orderers"`
	Policies *configtx.OrganizationPolicies `yaml:"policies" json:"policies"`
	Channels []string                       `yaml:"channels" json:"channels"`
	// contains filtered or unexported fields
}

func GenerateEmptyOrganization

func GenerateEmptyOrganization(orgName string, id string, domainRoot string, mspDir string) *Organization

func (*Organization) AddCa

func (that *Organization) AddCa(peerName string, orgName string, domainRoot string, port uint, grpcPort uint)

func (*Organization) AddOrderer

func (that *Organization) AddOrderer(peerName string, orgName string, domainRoot string, port uint)

func (*Organization) AddPeer

func (that *Organization) AddPeer(peerName string, orgName string, domainRoot string, port uint)

type Peer

type Peer struct {
	Role           []int       `yaml:"role" json:"role"`
	PeerName       string      `yaml:"peerName" json:"peerName"`
	OrgName        string      `yaml:"orgName" json:"orgName"`
	DomainRoot     string      `yaml:"domainRoot" json:"domainRoot"`
	Port           uint        `yaml:"port" json:"port"`
	ChaincodePort  uint        `yaml:"chaincodePort" json:"chaincodePort"`
	OperationsPort uint        `yaml:"operationsPort" json:"operationsPort"`
	PeerUser       []*PeerUser `json:"peerUser" yaml:"peerUser"`
}

type PeerUser

type PeerUser struct {
	Username string `yaml:"username" json:"username"`
	Password string `yaml:"password" json:"password"`
}

Jump to

Keyboard shortcuts

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