github.com/leonlxy/hyperledger@v1.0.0-alpha.0.20170427033203-34922035d248/protos/common/configtx.pb.go (about) 1 // Code generated by protoc-gen-go. 2 // source: common/configtx.proto 3 // DO NOT EDIT! 4 5 package common 6 7 import proto "github.com/golang/protobuf/proto" 8 import fmt "fmt" 9 import math "math" 10 11 // Reference imports to suppress errors if they are not otherwise used. 12 var _ = proto.Marshal 13 var _ = fmt.Errorf 14 var _ = math.Inf 15 16 // ConfigEnvelope is designed to contain _all_ configuration for a chain with no dependency 17 // on previous configuration transactions. 18 // 19 // It is generated with the following scheme: 20 // 1. Retrieve the existing configuration 21 // 2. Note the config properties (ConfigValue, ConfigPolicy, ConfigGroup) to be modified 22 // 3. Add any intermediate ConfigGroups to the ConfigUpdate.read_set (sparsely) 23 // 4. Add any additional desired dependencies to ConfigUpdate.read_set (sparsely) 24 // 5. Modify the config properties, incrementing each version by 1, set them in the ConfigUpdate.write_set 25 // Note: any element not modified but specified should already be in the read_set, so may be specified sparsely 26 // 6. Create ConfigUpdate message and marshal it into ConfigUpdateEnvelope.update and encode the required signatures 27 // a) Each signature is of type ConfigSignature 28 // b) The ConfigSignature signature is over the concatenation of signature_header and the ConfigUpdate bytes (which includes a ChainHeader) 29 // 5. Submit new Config for ordering in Envelope signed by submitter 30 // a) The Envelope Payload has data set to the marshaled ConfigEnvelope 31 // b) The Envelope Payload has a header of type Header.Type.CONFIG_UPDATE 32 // 33 // The configuration manager will verify: 34 // 1. All items in the read_set exist at the read versions 35 // 2. All items in the write_set at a different version than, or not in, the read_set have been appropriately signed according to their mod_policy 36 // 3. The new configuration satisfies the ConfigSchema 37 type ConfigEnvelope struct { 38 Config *Config `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"` 39 LastUpdate *Envelope `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate" json:"last_update,omitempty"` 40 } 41 42 func (m *ConfigEnvelope) Reset() { *m = ConfigEnvelope{} } 43 func (m *ConfigEnvelope) String() string { return proto.CompactTextString(m) } 44 func (*ConfigEnvelope) ProtoMessage() {} 45 func (*ConfigEnvelope) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } 46 47 func (m *ConfigEnvelope) GetConfig() *Config { 48 if m != nil { 49 return m.Config 50 } 51 return nil 52 } 53 54 func (m *ConfigEnvelope) GetLastUpdate() *Envelope { 55 if m != nil { 56 return m.LastUpdate 57 } 58 return nil 59 } 60 61 type ConfigGroupSchema struct { 62 Groups map[string]*ConfigGroupSchema `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 63 Values map[string]*ConfigValueSchema `protobuf:"bytes,2,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 64 Policies map[string]*ConfigPolicySchema `protobuf:"bytes,3,rep,name=policies" json:"policies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 65 } 66 67 func (m *ConfigGroupSchema) Reset() { *m = ConfigGroupSchema{} } 68 func (m *ConfigGroupSchema) String() string { return proto.CompactTextString(m) } 69 func (*ConfigGroupSchema) ProtoMessage() {} 70 func (*ConfigGroupSchema) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } 71 72 func (m *ConfigGroupSchema) GetGroups() map[string]*ConfigGroupSchema { 73 if m != nil { 74 return m.Groups 75 } 76 return nil 77 } 78 79 func (m *ConfigGroupSchema) GetValues() map[string]*ConfigValueSchema { 80 if m != nil { 81 return m.Values 82 } 83 return nil 84 } 85 86 func (m *ConfigGroupSchema) GetPolicies() map[string]*ConfigPolicySchema { 87 if m != nil { 88 return m.Policies 89 } 90 return nil 91 } 92 93 type ConfigValueSchema struct { 94 } 95 96 func (m *ConfigValueSchema) Reset() { *m = ConfigValueSchema{} } 97 func (m *ConfigValueSchema) String() string { return proto.CompactTextString(m) } 98 func (*ConfigValueSchema) ProtoMessage() {} 99 func (*ConfigValueSchema) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } 100 101 type ConfigPolicySchema struct { 102 } 103 104 func (m *ConfigPolicySchema) Reset() { *m = ConfigPolicySchema{} } 105 func (m *ConfigPolicySchema) String() string { return proto.CompactTextString(m) } 106 func (*ConfigPolicySchema) ProtoMessage() {} 107 func (*ConfigPolicySchema) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } 108 109 // Config represents the config for a particular channel 110 type Config struct { 111 Sequence uint64 `protobuf:"varint,1,opt,name=sequence" json:"sequence,omitempty"` 112 ChannelGroup *ConfigGroup `protobuf:"bytes,2,opt,name=channel_group,json=channelGroup" json:"channel_group,omitempty"` 113 } 114 115 func (m *Config) Reset() { *m = Config{} } 116 func (m *Config) String() string { return proto.CompactTextString(m) } 117 func (*Config) ProtoMessage() {} 118 func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } 119 120 func (m *Config) GetChannelGroup() *ConfigGroup { 121 if m != nil { 122 return m.ChannelGroup 123 } 124 return nil 125 } 126 127 type ConfigUpdateEnvelope struct { 128 ConfigUpdate []byte `protobuf:"bytes,1,opt,name=config_update,json=configUpdate,proto3" json:"config_update,omitempty"` 129 Signatures []*ConfigSignature `protobuf:"bytes,2,rep,name=signatures" json:"signatures,omitempty"` 130 } 131 132 func (m *ConfigUpdateEnvelope) Reset() { *m = ConfigUpdateEnvelope{} } 133 func (m *ConfigUpdateEnvelope) String() string { return proto.CompactTextString(m) } 134 func (*ConfigUpdateEnvelope) ProtoMessage() {} 135 func (*ConfigUpdateEnvelope) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } 136 137 func (m *ConfigUpdateEnvelope) GetSignatures() []*ConfigSignature { 138 if m != nil { 139 return m.Signatures 140 } 141 return nil 142 } 143 144 // ConfigUpdate is used to submit a subset of config and to have the orderer apply to Config 145 // it is always submitted inside a ConfigUpdateEnvelope which allows the addition of signatures 146 // resulting in a new total configuration. The update is applied as follows: 147 // 1. The versions from all of the elements in the read_set is verified against the versions in the existing config. 148 // If there is a mismatch in the read versions, then the config update fails and is rejected. 149 // 2. Any elements in the write_set with the same version as the read_set are ignored. 150 // 3. The corresponding mod_policy for every remaining element in the write_set is collected. 151 // 4. Each policy is checked against the signatures from the ConfigUpdateEnvelope, any failing to verify are rejected 152 // 5. The write_set is applied to the Config and the ConfigGroupSchema verifies that the updates were legal 153 type ConfigUpdate struct { 154 ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId" json:"channel_id,omitempty"` 155 ReadSet *ConfigGroup `protobuf:"bytes,2,opt,name=read_set,json=readSet" json:"read_set,omitempty"` 156 WriteSet *ConfigGroup `protobuf:"bytes,3,opt,name=write_set,json=writeSet" json:"write_set,omitempty"` 157 } 158 159 func (m *ConfigUpdate) Reset() { *m = ConfigUpdate{} } 160 func (m *ConfigUpdate) String() string { return proto.CompactTextString(m) } 161 func (*ConfigUpdate) ProtoMessage() {} 162 func (*ConfigUpdate) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } 163 164 func (m *ConfigUpdate) GetReadSet() *ConfigGroup { 165 if m != nil { 166 return m.ReadSet 167 } 168 return nil 169 } 170 171 func (m *ConfigUpdate) GetWriteSet() *ConfigGroup { 172 if m != nil { 173 return m.WriteSet 174 } 175 return nil 176 } 177 178 // ConfigGroup is the hierarchical data structure for holding config 179 type ConfigGroup struct { 180 Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` 181 Groups map[string]*ConfigGroup `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 182 Values map[string]*ConfigValue `protobuf:"bytes,3,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 183 Policies map[string]*ConfigPolicy `protobuf:"bytes,4,rep,name=policies" json:"policies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 184 ModPolicy string `protobuf:"bytes,5,opt,name=mod_policy,json=modPolicy" json:"mod_policy,omitempty"` 185 } 186 187 func (m *ConfigGroup) Reset() { *m = ConfigGroup{} } 188 func (m *ConfigGroup) String() string { return proto.CompactTextString(m) } 189 func (*ConfigGroup) ProtoMessage() {} 190 func (*ConfigGroup) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } 191 192 func (m *ConfigGroup) GetGroups() map[string]*ConfigGroup { 193 if m != nil { 194 return m.Groups 195 } 196 return nil 197 } 198 199 func (m *ConfigGroup) GetValues() map[string]*ConfigValue { 200 if m != nil { 201 return m.Values 202 } 203 return nil 204 } 205 206 func (m *ConfigGroup) GetPolicies() map[string]*ConfigPolicy { 207 if m != nil { 208 return m.Policies 209 } 210 return nil 211 } 212 213 // ConfigValue represents an individual piece of config data 214 type ConfigValue struct { 215 Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` 216 Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 217 ModPolicy string `protobuf:"bytes,3,opt,name=mod_policy,json=modPolicy" json:"mod_policy,omitempty"` 218 } 219 220 func (m *ConfigValue) Reset() { *m = ConfigValue{} } 221 func (m *ConfigValue) String() string { return proto.CompactTextString(m) } 222 func (*ConfigValue) ProtoMessage() {} 223 func (*ConfigValue) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } 224 225 type ConfigPolicy struct { 226 Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` 227 Policy *Policy `protobuf:"bytes,2,opt,name=policy" json:"policy,omitempty"` 228 ModPolicy string `protobuf:"bytes,3,opt,name=mod_policy,json=modPolicy" json:"mod_policy,omitempty"` 229 } 230 231 func (m *ConfigPolicy) Reset() { *m = ConfigPolicy{} } 232 func (m *ConfigPolicy) String() string { return proto.CompactTextString(m) } 233 func (*ConfigPolicy) ProtoMessage() {} 234 func (*ConfigPolicy) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} } 235 236 func (m *ConfigPolicy) GetPolicy() *Policy { 237 if m != nil { 238 return m.Policy 239 } 240 return nil 241 } 242 243 type ConfigSignature struct { 244 SignatureHeader []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"` 245 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` 246 } 247 248 func (m *ConfigSignature) Reset() { *m = ConfigSignature{} } 249 func (m *ConfigSignature) String() string { return proto.CompactTextString(m) } 250 func (*ConfigSignature) ProtoMessage() {} 251 func (*ConfigSignature) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} } 252 253 func init() { 254 proto.RegisterType((*ConfigEnvelope)(nil), "common.ConfigEnvelope") 255 proto.RegisterType((*ConfigGroupSchema)(nil), "common.ConfigGroupSchema") 256 proto.RegisterType((*ConfigValueSchema)(nil), "common.ConfigValueSchema") 257 proto.RegisterType((*ConfigPolicySchema)(nil), "common.ConfigPolicySchema") 258 proto.RegisterType((*Config)(nil), "common.Config") 259 proto.RegisterType((*ConfigUpdateEnvelope)(nil), "common.ConfigUpdateEnvelope") 260 proto.RegisterType((*ConfigUpdate)(nil), "common.ConfigUpdate") 261 proto.RegisterType((*ConfigGroup)(nil), "common.ConfigGroup") 262 proto.RegisterType((*ConfigValue)(nil), "common.ConfigValue") 263 proto.RegisterType((*ConfigPolicy)(nil), "common.ConfigPolicy") 264 proto.RegisterType((*ConfigSignature)(nil), "common.ConfigSignature") 265 } 266 267 func init() { proto.RegisterFile("common/configtx.proto", fileDescriptor1) } 268 269 var fileDescriptor1 = []byte{ 270 // 674 bytes of a gzipped FileDescriptorProto 271 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x55, 0xdb, 0x6e, 0xd3, 0x40, 272 0x10, 0x55, 0xe2, 0xd6, 0x4d, 0x26, 0xe9, 0x85, 0x6d, 0x10, 0xc6, 0x02, 0x51, 0x0c, 0x94, 0x16, 273 0x24, 0xa7, 0x94, 0x87, 0x56, 0x48, 0x7d, 0xa1, 0xaa, 0x80, 0x97, 0x0a, 0x1c, 0x2e, 0x52, 0x85, 274 0x88, 0x5c, 0x7b, 0xeb, 0x58, 0x75, 0xbc, 0x66, 0xbd, 0x2e, 0xe4, 0x2b, 0xf8, 0x40, 0xfe, 0x80, 275 0xaf, 0x40, 0xde, 0x5d, 0x9b, 0x75, 0xe2, 0x24, 0xe2, 0x29, 0x99, 0x99, 0x73, 0xce, 0xec, 0xce, 276 0xce, 0x91, 0xe1, 0xb6, 0x47, 0xc6, 0x63, 0x12, 0xf7, 0x3d, 0x12, 0x5f, 0x85, 0x01, 0xfb, 0x69, 277 0x27, 0x94, 0x30, 0x82, 0x74, 0x91, 0x36, 0xb7, 0xcb, 0x72, 0xfe, 0x23, 0x8a, 0x66, 0xc1, 0x49, 278 0x48, 0x14, 0x7a, 0x21, 0x4e, 0x45, 0xda, 0xba, 0x86, 0x8d, 0x53, 0xae, 0x72, 0x16, 0xdf, 0xe0, 279 0x88, 0x24, 0x18, 0xed, 0x82, 0x2e, 0x74, 0x8d, 0xc6, 0x4e, 0x63, 0xaf, 0x73, 0xb8, 0x61, 0x4b, 280 0x1d, 0x81, 0x73, 0x64, 0x15, 0xbd, 0x80, 0x4e, 0xe4, 0xa6, 0x6c, 0x98, 0x25, 0xbe, 0xcb, 0xb0, 281 0xd1, 0xe4, 0xe0, 0xad, 0x02, 0x5c, 0xc8, 0x39, 0x90, 0x83, 0x3e, 0x71, 0x8c, 0xf5, 0x5b, 0x83, 282 0x5b, 0x42, 0xe5, 0x0d, 0x25, 0x59, 0x32, 0xf0, 0x46, 0x78, 0xec, 0xa2, 0x13, 0xd0, 0x83, 0x3c, 283 0x4c, 0x8d, 0xc6, 0x8e, 0xb6, 0xd7, 0x39, 0x7c, 0x52, 0x6d, 0xa8, 0x40, 0x6d, 0xfe, 0x3f, 0x3d, 284 0x8b, 0x19, 0x9d, 0x38, 0x92, 0x94, 0xd3, 0x6f, 0xdc, 0x28, 0xc3, 0xa9, 0xd1, 0x5c, 0x46, 0xff, 285 0xcc, 0x71, 0x92, 0x2e, 0x48, 0xe8, 0x14, 0x5a, 0xc5, 0x48, 0x0c, 0x8d, 0x0b, 0x3c, 0x9d, 0x2f, 286 0xf0, 0x5e, 0x22, 0x85, 0x44, 0x49, 0x34, 0x3f, 0x42, 0x47, 0x39, 0x1a, 0xda, 0x02, 0xed, 0x1a, 287 0x4f, 0xf8, 0xfc, 0xda, 0x4e, 0xfe, 0x17, 0xf5, 0x61, 0x95, 0xf7, 0x93, 0x63, 0xba, 0x3b, 0xb7, 288 0x85, 0x23, 0x70, 0xaf, 0x9a, 0xc7, 0x8d, 0x5c, 0x55, 0x39, 0xf1, 0x7f, 0xab, 0x72, 0xee, 0xac, 289 0xea, 0x17, 0x58, 0xaf, 0x5c, 0xa3, 0x46, 0xf7, 0xa0, 0xaa, 0x6b, 0x56, 0x75, 0x39, 0x7b, 0x32, 290 0x23, 0x6c, 0x6d, 0x17, 0x8f, 0xab, 0x34, 0xb6, 0x7a, 0x80, 0x66, 0x59, 0xd6, 0x37, 0xd0, 0x45, 291 0x16, 0x99, 0xd0, 0x4a, 0xf1, 0xf7, 0x0c, 0xc7, 0x1e, 0xe6, 0x27, 0x58, 0x71, 0xca, 0x18, 0x1d, 292 0xc3, 0xba, 0x37, 0x72, 0xe3, 0x18, 0x47, 0x43, 0xfe, 0xd6, 0xf2, 0x38, 0xdb, 0x35, 0xc3, 0x73, 293 0xba, 0x12, 0xc9, 0x23, 0x8b, 0x41, 0x4f, 0x14, 0xc5, 0xe2, 0x95, 0xbb, 0xfd, 0x08, 0xd6, 0xc5, 294 0xf6, 0x16, 0x5b, 0x9b, 0xb7, 0xec, 0x3a, 0x5d, 0x4f, 0x01, 0xa3, 0x23, 0x80, 0x34, 0x0c, 0x62, 295 0x97, 0x65, 0xb4, 0x5c, 0xaa, 0x3b, 0xd5, 0x9e, 0x83, 0xa2, 0xee, 0x28, 0x50, 0xeb, 0x57, 0x03, 296 0xba, 0x6a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1, 0x05, 0x6c, 0x4e, 0x99, 0x0d, 0xed, 0xc3, 0x56, 0x69, 0xb7, 308 0xe1, 0x08, 0xbb, 0x3e, 0xa6, 0xd2, 0xc1, 0x9b, 0x65, 0xfe, 0x2d, 0x4f, 0xa3, 0x7b, 0xd0, 0x2e, 309 0x53, 0xf2, 0x9e, 0xff, 0x12, 0xaf, 0x07, 0xf0, 0x98, 0xd0, 0xc0, 0x1e, 0x4d, 0x12, 0x4c, 0x23, 310 0xec, 0x07, 0x98, 0xda, 0x57, 0xee, 0x25, 0x0d, 0x3d, 0xf1, 0x55, 0x4c, 0xe5, 0x89, 0x2f, 0x9e, 311 0x07, 0x21, 0x1b, 0x65, 0x97, 0x79, 0xd8, 0x57, 0xc0, 0x7d, 0x01, 0xee, 0x0b, 0xb0, 0xfc, 0xce, 312 0x5e, 0xea, 0x3c, 0x7c, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x25, 0x75, 0xfb, 0xf8, 0x9e, 0x07, 313 0x00, 0x00, 314 }