@@ -46,64 +46,64 @@ const Prefix string = "CONFIGTX"
4646
4747// TopLevel contains the genesis structures for use by the provisional bootstrapper
4848type TopLevel struct {
49- Profiles map [string ]* Profile
50- Organizations []* Organization
51- Application * Application
52- Orderer * Orderer
49+ Profiles map [string ]* Profile `yaml:"Profiles"`
50+ Organizations []* Organization `yaml:"Organizations"`
51+ Application * Application `yaml:"Application"`
52+ Orderer * Orderer `yaml:"Orderer"`
5353}
5454
5555// TopLevel contains the genesis structures for use by the provisional bootstrapper
5656type Profile struct {
57- Application * Application
58- Orderer * Orderer
57+ Application * Application `yaml:"Application"`
58+ Orderer * Orderer `yaml:"Orderer"`
5959}
6060
6161// Application encodes the configuration needed for the config transaction
6262type Application struct {
63- Organizations []* Organization
63+ Organizations []* Organization `yaml:"Organizations"`
6464}
6565
6666type Organization struct {
67- Name string
68- ID string
69- MSPDir string
70- BCCSP * bccsp.FactoryOpts
67+ Name string `yaml:"Name"`
68+ ID string `yaml:"ID"`
69+ MSPDir string `yaml:"MSPDir"`
70+ BCCSP * bccsp.FactoryOpts `yaml:"BCCSP"`
7171
7272 // Note, the viper deserialization does not seem to care for
7373 // embedding of types, so we use one organization structure for
7474 // both orderers and applications
75- AnchorPeers []* AnchorPeer
75+ AnchorPeers []* AnchorPeer `yaml:"AnchorPeers"`
7676}
7777
7878type AnchorPeer struct {
79- Host string
80- Port int
79+ Host string `yaml:"Host"`
80+ Port int `yaml:"Port"`
8181}
8282
8383type ApplicationOrganization struct {
84- Organization
84+ Organization `yaml:"Organization"`
8585}
8686
8787// Orderer contains config which is used for orderer genesis by the provisional bootstrapper
8888type Orderer struct {
89- OrdererType string
90- Addresses []string
91- BatchTimeout time.Duration
92- BatchSize BatchSize
93- Kafka Kafka
94- Organizations []* Organization
89+ OrdererType string `yaml:"OrdererType"`
90+ Addresses []string `yaml:"Addresses"`
91+ BatchTimeout time.Duration `yaml:"BatchTimeout"`
92+ BatchSize BatchSize `yaml:"BatchSize"`
93+ Kafka Kafka `yaml:"Kafka"`
94+ Organizations []* Organization `yaml:"Organizations"`
9595}
9696
9797// BatchSize contains configuration affecting the size of batches
9898type BatchSize struct {
99- MaxMessageCount uint32
100- AbsoluteMaxBytes uint32
101- PreferredMaxBytes uint32
99+ MaxMessageCount uint32 `yaml:"MaxMessageSize"`
100+ AbsoluteMaxBytes uint32 `yaml:"AbsoluteMaxBytes"`
101+ PreferredMaxBytes uint32 `yaml:"PreferredMaxBytes"`
102102}
103103
104104// Kafka contains config for the Kafka orderer
105105type Kafka struct {
106- Brokers []string
106+ Brokers []string `yaml:"Brokers"`
107107}
108108
109109var genesisDefaults = TopLevel {
0 commit comments