@@ -46,64 +46,64 @@ const Prefix string = "CONFIGTX"
46
46
47
47
// TopLevel contains the genesis structures for use by the provisional bootstrapper
48
48
type 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"`
53
53
}
54
54
55
55
// TopLevel contains the genesis structures for use by the provisional bootstrapper
56
56
type Profile struct {
57
- Application * Application
58
- Orderer * Orderer
57
+ Application * Application `yaml:"Application"`
58
+ Orderer * Orderer `yaml:"Orderer"`
59
59
}
60
60
61
61
// Application encodes the configuration needed for the config transaction
62
62
type Application struct {
63
- Organizations []* Organization
63
+ Organizations []* Organization `yaml:"Organizations"`
64
64
}
65
65
66
66
type 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"`
71
71
72
72
// Note, the viper deserialization does not seem to care for
73
73
// embedding of types, so we use one organization structure for
74
74
// both orderers and applications
75
- AnchorPeers []* AnchorPeer
75
+ AnchorPeers []* AnchorPeer `yaml:"AnchorPeers"`
76
76
}
77
77
78
78
type AnchorPeer struct {
79
- Host string
80
- Port int
79
+ Host string `yaml:"Host"`
80
+ Port int `yaml:"Port"`
81
81
}
82
82
83
83
type ApplicationOrganization struct {
84
- Organization
84
+ Organization `yaml:"Organization"`
85
85
}
86
86
87
87
// Orderer contains config which is used for orderer genesis by the provisional bootstrapper
88
88
type 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"`
95
95
}
96
96
97
97
// BatchSize contains configuration affecting the size of batches
98
98
type 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"`
102
102
}
103
103
104
104
// Kafka contains config for the Kafka orderer
105
105
type Kafka struct {
106
- Brokers []string
106
+ Brokers []string `yaml:"Brokers"`
107
107
}
108
108
109
109
var genesisDefaults = TopLevel {
0 commit comments