localconfig

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestChainID = "testchainid"

	SampleInsecureSoloProfile = "SampleInsecureSolo"

	SampleDevModeSoloProfile = "SampleDevModeSolo"

	SampleSingleMSPSoloProfile = "SampleSingleMSPSolo"

	SampleInsecureKafkaProfile = "SampleInsecureKafka"

	SampleDevModeKafkaProfile = "SampleDevModeKafka"

	SampleSingleMSPKafkaProfile = "SampleSingleMSPKafka"

	SampleDevModeEtcdRaftProfile = "SampleDevModeEtcdRaft"

	SampleSingleMSPChannelProfile = "SampleSingleMSPChannel"

	SampleConsortiumName = "SampleConsortium"

	SampleOrgName = "SampleOrg"

	AdminRoleAdminPrincipal = "Role.ADMIN"

	MemberRoleAdminPrincipal = "Role.MEMBER"
)
View Source
const (
	Prefix string = "CONFIGTX"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnchorPeer

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

type Application

type Application struct {
	Organizations []*Organization    `yaml:"Organizations"`
	Capabilities  map[string]bool    `yaml:"Capabilities"`
	Resources     *Resources         `yaml:"Resources"`
	Policies      map[string]*Policy `yaml:"Policies"`
	ACLs          map[string]string  `yaml:"ACLs"`
}

type BatchSize

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

type Consortium

type Consortium struct {
	Organizations []*Organization `yaml:"Organizations"`
}

type Kafka

type Kafka struct {
	Brokers []string `yaml:"Brokers"`
}

type Orderer

type Orderer struct {
	OrdererType   string             `yaml:"OrdererType"`
	Addresses     []string           `yaml:"Addresses"`
	BatchTimeout  time.Duration      `yaml:"BatchTimeout"`
	BatchSize     BatchSize          `yaml:"BatchSize"`
	Kafka         Kafka              `yaml:"Kafka"`
	EtcdRaft      *etcdraft.Metadata `yaml:"EtcdRaft"`
	Organizations []*Organization    `yaml:"Organizations"`
	MaxChannels   uint64             `yaml:"MaxChannels"`
	Capabilities  map[string]bool    `yaml:"Capabilities"`
	Policies      map[string]*Policy `yaml:"Policies"`
}

type Organization

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

	AnchorPeers []*AnchorPeer `yaml:"AnchorPeers"`

	AdminPrincipal string `yaml:"AdminPrincipal"`
}

type Policy

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

type Profile

type Profile struct {
	Consortium   string                 `yaml:"Consortium"`
	Application  *Application           `yaml:"Application"`
	Orderer      *Orderer               `yaml:"Orderer"`
	Consortiums  map[string]*Consortium `yaml:"Consortiums"`
	Capabilities map[string]bool        `yaml:"Capabilities"`
	Policies     map[string]*Policy     `yaml:"Policies"`
}

func Load

func Load(profile string, configPaths ...string) *Profile

type Resources

type Resources struct {
	DefaultModPolicy string
}

type TopLevel

type TopLevel struct {
	Profiles      map[string]*Profile        `yaml:"Profiles"`
	Organizations []*Organization            `yaml:"Organizations"`
	Channel       *Profile                   `yaml:"Channel"`
	Application   *Application               `yaml:"Application"`
	Orderer       *Orderer                   `yaml:"Orderer"`
	Capabilities  map[string]map[string]bool `yaml:"Capabilities"`
	Resources     *Resources                 `yaml:"Resources"`
}

func LoadTopLevel

func LoadTopLevel(configPaths ...string) *TopLevel

Jump to

Keyboard shortcuts

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