github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/common/tools/protolator/testprotos/sample.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: sample.proto 3 4 /* 5 Package testprotos is a generated protocol buffer package. 6 7 It is generated from these files: 8 sample.proto 9 10 It has these top-level messages: 11 SimpleMsg 12 NestedMsg 13 StaticallyOpaqueMsg 14 VariablyOpaqueMsg 15 DynamicMsg 16 ContextlessMsg 17 */ 18 package testprotos 19 20 import proto "github.com/golang/protobuf/proto" 21 import fmt "fmt" 22 import math "math" 23 24 // Reference imports to suppress errors if they are not otherwise used. 25 var _ = proto.Marshal 26 var _ = fmt.Errorf 27 var _ = math.Inf 28 29 // This is a compile-time assertion to ensure that this generated file 30 // is compatible with the proto package it is being compiled against. 31 // A compilation error at this line likely means your copy of the 32 // proto package needs to be updated. 33 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 34 35 // SimpleMsg is designed to test that all three types of message fields, plain, map, 36 // and slice are handled by the protolator tool 37 type SimpleMsg struct { 38 PlainField string `protobuf:"bytes,1,opt,name=plain_field,json=plainField" json:"plain_field,omitempty"` 39 MapField map[string]string `protobuf:"bytes,2,rep,name=map_field,json=mapField" json:"map_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 40 SliceField []string `protobuf:"bytes,3,rep,name=slice_field,json=sliceField" json:"slice_field,omitempty"` 41 } 42 43 func (m *SimpleMsg) Reset() { *m = SimpleMsg{} } 44 func (m *SimpleMsg) String() string { return proto.CompactTextString(m) } 45 func (*SimpleMsg) ProtoMessage() {} 46 func (*SimpleMsg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 47 48 func (m *SimpleMsg) GetPlainField() string { 49 if m != nil { 50 return m.PlainField 51 } 52 return "" 53 } 54 55 func (m *SimpleMsg) GetMapField() map[string]string { 56 if m != nil { 57 return m.MapField 58 } 59 return nil 60 } 61 62 func (m *SimpleMsg) GetSliceField() []string { 63 if m != nil { 64 return m.SliceField 65 } 66 return nil 67 } 68 69 // NestedMsg is designed to test the nested message component 70 type NestedMsg struct { 71 PlainNestedField *SimpleMsg `protobuf:"bytes,1,opt,name=plain_nested_field,json=plainNestedField" json:"plain_nested_field,omitempty"` 72 MapNestedField map[string]*SimpleMsg `protobuf:"bytes,2,rep,name=map_nested_field,json=mapNestedField" json:"map_nested_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 73 SliceNestedField []*SimpleMsg `protobuf:"bytes,3,rep,name=slice_nested_field,json=sliceNestedField" json:"slice_nested_field,omitempty"` 74 } 75 76 func (m *NestedMsg) Reset() { *m = NestedMsg{} } 77 func (m *NestedMsg) String() string { return proto.CompactTextString(m) } 78 func (*NestedMsg) ProtoMessage() {} 79 func (*NestedMsg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } 80 81 func (m *NestedMsg) GetPlainNestedField() *SimpleMsg { 82 if m != nil { 83 return m.PlainNestedField 84 } 85 return nil 86 } 87 88 func (m *NestedMsg) GetMapNestedField() map[string]*SimpleMsg { 89 if m != nil { 90 return m.MapNestedField 91 } 92 return nil 93 } 94 95 func (m *NestedMsg) GetSliceNestedField() []*SimpleMsg { 96 if m != nil { 97 return m.SliceNestedField 98 } 99 return nil 100 } 101 102 // StaticallyOpaqueMsg is designed to test the statically opaque message component 103 // All fields are statically marshaled to the NestedMsg type 104 type StaticallyOpaqueMsg struct { 105 PlainOpaqueField []byte `protobuf:"bytes,1,opt,name=plain_opaque_field,json=plainOpaqueField,proto3" json:"plain_opaque_field,omitempty"` 106 MapOpaqueField map[string][]byte `protobuf:"bytes,2,rep,name=map_opaque_field,json=mapOpaqueField" json:"map_opaque_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` 107 SliceOpaqueField [][]byte `protobuf:"bytes,3,rep,name=slice_opaque_field,json=sliceOpaqueField,proto3" json:"slice_opaque_field,omitempty"` 108 } 109 110 func (m *StaticallyOpaqueMsg) Reset() { *m = StaticallyOpaqueMsg{} } 111 func (m *StaticallyOpaqueMsg) String() string { return proto.CompactTextString(m) } 112 func (*StaticallyOpaqueMsg) ProtoMessage() {} 113 func (*StaticallyOpaqueMsg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } 114 115 func (m *StaticallyOpaqueMsg) GetPlainOpaqueField() []byte { 116 if m != nil { 117 return m.PlainOpaqueField 118 } 119 return nil 120 } 121 122 func (m *StaticallyOpaqueMsg) GetMapOpaqueField() map[string][]byte { 123 if m != nil { 124 return m.MapOpaqueField 125 } 126 return nil 127 } 128 129 func (m *StaticallyOpaqueMsg) GetSliceOpaqueField() [][]byte { 130 if m != nil { 131 return m.SliceOpaqueField 132 } 133 return nil 134 } 135 136 // VariablyOpaqueMsg is designed to test the staticaly opaque message component 137 // The opaque type is determined by opaque_type 138 type VariablyOpaqueMsg struct { 139 OpaqueType string `protobuf:"bytes,1,opt,name=opaque_type,json=opaqueType" json:"opaque_type,omitempty"` 140 PlainOpaqueField []byte `protobuf:"bytes,2,opt,name=plain_opaque_field,json=plainOpaqueField,proto3" json:"plain_opaque_field,omitempty"` 141 MapOpaqueField map[string][]byte `protobuf:"bytes,3,rep,name=map_opaque_field,json=mapOpaqueField" json:"map_opaque_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` 142 SliceOpaqueField [][]byte `protobuf:"bytes,4,rep,name=slice_opaque_field,json=sliceOpaqueField,proto3" json:"slice_opaque_field,omitempty"` 143 } 144 145 func (m *VariablyOpaqueMsg) Reset() { *m = VariablyOpaqueMsg{} } 146 func (m *VariablyOpaqueMsg) String() string { return proto.CompactTextString(m) } 147 func (*VariablyOpaqueMsg) ProtoMessage() {} 148 func (*VariablyOpaqueMsg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } 149 150 func (m *VariablyOpaqueMsg) GetOpaqueType() string { 151 if m != nil { 152 return m.OpaqueType 153 } 154 return "" 155 } 156 157 func (m *VariablyOpaqueMsg) GetPlainOpaqueField() []byte { 158 if m != nil { 159 return m.PlainOpaqueField 160 } 161 return nil 162 } 163 164 func (m *VariablyOpaqueMsg) GetMapOpaqueField() map[string][]byte { 165 if m != nil { 166 return m.MapOpaqueField 167 } 168 return nil 169 } 170 171 func (m *VariablyOpaqueMsg) GetSliceOpaqueField() [][]byte { 172 if m != nil { 173 return m.SliceOpaqueField 174 } 175 return nil 176 } 177 178 // DynamicMsg is designed to test the dynamic message component 179 // The dynamic wrapper applied to ContextlessMsg is determined by 180 // dynamic_type 181 type DynamicMsg struct { 182 DynamicType string `protobuf:"bytes,1,opt,name=dynamic_type,json=dynamicType" json:"dynamic_type,omitempty"` 183 PlainDynamicField *ContextlessMsg `protobuf:"bytes,2,opt,name=plain_dynamic_field,json=plainDynamicField" json:"plain_dynamic_field,omitempty"` 184 MapDynamicField map[string]*ContextlessMsg `protobuf:"bytes,3,rep,name=map_dynamic_field,json=mapDynamicField" json:"map_dynamic_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 185 SliceDynamicField []*ContextlessMsg `protobuf:"bytes,4,rep,name=slice_dynamic_field,json=sliceDynamicField" json:"slice_dynamic_field,omitempty"` 186 } 187 188 func (m *DynamicMsg) Reset() { *m = DynamicMsg{} } 189 func (m *DynamicMsg) String() string { return proto.CompactTextString(m) } 190 func (*DynamicMsg) ProtoMessage() {} 191 func (*DynamicMsg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } 192 193 func (m *DynamicMsg) GetDynamicType() string { 194 if m != nil { 195 return m.DynamicType 196 } 197 return "" 198 } 199 200 func (m *DynamicMsg) GetPlainDynamicField() *ContextlessMsg { 201 if m != nil { 202 return m.PlainDynamicField 203 } 204 return nil 205 } 206 207 func (m *DynamicMsg) GetMapDynamicField() map[string]*ContextlessMsg { 208 if m != nil { 209 return m.MapDynamicField 210 } 211 return nil 212 } 213 214 func (m *DynamicMsg) GetSliceDynamicField() []*ContextlessMsg { 215 if m != nil { 216 return m.SliceDynamicField 217 } 218 return nil 219 } 220 221 // ContextlessMsg is designed to carry a message of completely arbitrary type 222 // Because there is no context for the type embedded in the message, the opaque 223 // type must be dynamically added at runtime 224 type ContextlessMsg struct { 225 OpaqueField []byte `protobuf:"bytes,1,opt,name=opaque_field,json=opaqueField,proto3" json:"opaque_field,omitempty"` 226 } 227 228 func (m *ContextlessMsg) Reset() { *m = ContextlessMsg{} } 229 func (m *ContextlessMsg) String() string { return proto.CompactTextString(m) } 230 func (*ContextlessMsg) ProtoMessage() {} 231 func (*ContextlessMsg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } 232 233 func (m *ContextlessMsg) GetOpaqueField() []byte { 234 if m != nil { 235 return m.OpaqueField 236 } 237 return nil 238 } 239 240 func init() { 241 proto.RegisterType((*SimpleMsg)(nil), "testprotos.SimpleMsg") 242 proto.RegisterType((*NestedMsg)(nil), "testprotos.NestedMsg") 243 proto.RegisterType((*StaticallyOpaqueMsg)(nil), "testprotos.StaticallyOpaqueMsg") 244 proto.RegisterType((*VariablyOpaqueMsg)(nil), "testprotos.VariablyOpaqueMsg") 245 proto.RegisterType((*DynamicMsg)(nil), "testprotos.DynamicMsg") 246 proto.RegisterType((*ContextlessMsg)(nil), "testprotos.ContextlessMsg") 247 } 248 249 func init() { proto.RegisterFile("sample.proto", fileDescriptor0) } 250 251 var fileDescriptor0 = []byte{ 252 // 582 bytes of a gzipped FileDescriptorProto 253 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0xc1, 0x6e, 0x13, 0x31, 254 0x10, 0x86, 0x95, 0xdd, 0x82, 0xc8, 0x6c, 0x28, 0xc9, 0xa6, 0x48, 0x55, 0x2e, 0x0d, 0xe5, 0x52, 255 0xd4, 0x2a, 0x81, 0xe4, 0x82, 0xe0, 0x02, 0x14, 0x10, 0xaa, 0x54, 0x90,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 0xbc, 267 0xa9, 0x92, 0xc1, 0xcd, 0xca, 0xd8, 0xa3, 0x26, 0x16, 0x58, 0x0b, 0x1b, 0x78, 0x0c, 0x4d, 0x33, 268 0x72, 0x60, 0x61, 0x27, 0xbf, 0xe3, 0x5b, 0x9c, 0x75, 0x35, 0x93, 0x7b, 0xf5, 0x76, 0xfe, 0xf5, 269 0x3c, 0x10, 0x4d, 0x32, 0x4b, 0x21, 0xb0, 0x8d, 0xd1, 0x76, 0x55, 0x32, 0x2c, 0xf0, 0x4c, 0x3a, 270 0xef, 0xa0, 0x5d, 0xd1, 0xab, 0x82, 0xd7, 0xae, 0xcf, 0x6b, 0x65, 0x03, 0x0f, 0xe3, 0x8f, 0x08, 271 0xda, 0x63, 0x4d, 0x34, 0xcb, 0x08, 0xe7, 0xe5, 0xab, 0x82, 0x7c, 0x99, 0xe3, 0xfd, 0xd8, 0x5b, 272 0x00, 0x95, 0x28, 0x79, 0x40, 0x1b, 0x8e, 0x9c, 0x3d, 0x6b, 0x87, 0xfc, 0x68, 0xc9, 0x05, 0x67, 273 0x2d, 0xb9, 0x61, 0x90, 0xe0, 0x7c, 0x23, 0xc3, 0xd0, 0x73, 0x5a, 0x32, 0xf4, 0xed, 0xf7, 0x16, 274 0x0c, 0x83, 0x06, 0x86, 0x61, 0xc3, 0xc1, 0xf2, 0x4e, 0x77, 0x1e, 0x23, 0xac, 0xbf, 0x4d, 0xff, 275 0x75, 0xb9, 0x1a, 0x3e, 0x95, 0x9f, 0x11, 0xb4, 0xde, 0x90, 0x19, 0x23, 0x13, 0x9f, 0xc9, 0x16, 276 0x24, 0x2e, 0x80, 0x2e, 0x0b, 0xba, 0x78, 0x33, 0x56, 0x7a, 0x5d, 0x16, 0x74, 0x05, 0xb4, 0x68, 277 0x05, 0xb4, 0x0f, 0x15, 0xd0, 0xec, 0xbd, 0xb8, 0xe7, 0x43, 0x3b, 0x97, 0xe3, 0x3f, 0x90, 0xad, 278 0x5d, 0x1e, 0xb2, 0xef, 0x31, 0xc0, 0xd3, 0x52, 0x90, 0x9c, 0x65, 0x86, 0xd5, 0x2d, 0x68, 0x4c, 279 0xed, 0xca, 0x87, 0x95, 0x38, 0x0d, 0x69, 0x1d, 0x40, 0xdb, 0xd2, 0x5a, 0x1c, 0x5c, 0xe2, 0x4a, 280 0x06, 0x1d, 0x1f, 0xc1, 0xbe, 0x14, 0x9a, 0x7e, 0xd3, 0x9c, 0x2a, 0x65, 0xae, 0x6f, 0x0b, 0xcb, 281 0x5c, 0x33, 0x3b, 0xee, 0x5b, 0x68, 0x19, 0x96, 0xa1, 0x93, 0x85, 0xb9, 0xeb, 0x3b, 0x2d, 0x13, 282 0x1a, 0x8a, 0xbe, 0x85, 0xc5, 0x78, 0x23, 0x0f, 0x55, 0x13, 0xd2, 0x72, 0x0c, 0xad, 0xd7, 0xd0, 283 0xfa, 0xc2, 0x90, 0x58, 0xe6, 0x7b, 0x75, 0x3e, 0xc1, 0x46, 0x55, 0xd3, 0x0a, 0xcc, 0x77, 0xc3, 284 0x67, 0x7c, 0x51, 0x1f, 0xef, 0x13, 0x0c, 0x61, 0x3d, 0xdc, 0x34, 0x5f, 0xa1, 0xe2, 0xfd, 0xba, 285 0x5b, 0x8c, 0x09, 0x9e, 0x1c, 0xbc, 0x7f, 0x71, 0xcc, 0xf4, 0xc9, 0x7c, 0xd2, 0xcb, 0x64, 0xde, 286 0x67, 0xe2, 0x94, 0x93, 0x89, 0x3a, 0x92, 0x73, 0x31, 0x25, 0x9a, 0x49, 0x61, 0x94, 0xec, 0x84, 287 0x30, 0xd1, 0xcf, 0x64, 0x9e, 0x4b, 0xd1, 0xd7, 0x52, 0x72, 0xd5, 0xc7, 0x2c, 0x9c, 0x68, 0x39, 288 0xeb, 0x2f, 0xa3, 0x4d, 0xae, 0xe2, 0xef, 0xf0, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0xa2, 289 0x07, 0xb3, 0x85, 0x06, 0x00, 0x00, 290 }