1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: nopackage.proto 3 4package nopackage 5 6import proto "github.com/gogo/protobuf/proto" 7import fmt "fmt" 8import math "math" 9 10import encoding_binary "encoding/binary" 11 12import io "io" 13 14// Reference imports to suppress errors if they are not otherwise used. 15var _ = proto.Marshal 16var _ = fmt.Errorf 17var _ = math.Inf 18 19// This is a compile-time assertion to ensure that this generated file 20// is compatible with the proto package it is being compiled against. 21// A compilation error at this line likely means your copy of the 22// proto package needs to be updated. 23const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 24 25type M struct { 26 F map[string]float64 `protobuf:"bytes,1,rep,name=f" json:"f,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` 27 XXX_NoUnkeyedLiteral struct{} `json:"-"` 28 XXX_unrecognized []byte `json:"-"` 29 XXX_sizecache int32 `json:"-"` 30} 31 32func (m *M) Reset() { *m = M{} } 33func (m *M) String() string { return proto.CompactTextString(m) } 34func (*M) ProtoMessage() {} 35func (*M) Descriptor() ([]byte, []int) { 36 return fileDescriptor_nopackage_085d7f4350f51d1d, []int{0} 37} 38func (m *M) XXX_Unmarshal(b []byte) error { 39 return m.Unmarshal(b) 40} 41func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 if deterministic { 43 return xxx_messageInfo_M.Marshal(b, m, deterministic) 44 } else { 45 b = b[:cap(b)] 46 n, err := m.MarshalTo(b) 47 if err != nil { 48 return nil, err 49 } 50 return b[:n], nil 51 } 52} 53func (dst *M) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_M.Merge(dst, src) 55} 56func (m *M) XXX_Size() int { 57 return m.Size() 58} 59func (m *M) XXX_DiscardUnknown() { 60 xxx_messageInfo_M.DiscardUnknown(m) 61} 62 63var xxx_messageInfo_M proto.InternalMessageInfo 64 65func (m *M) GetF() map[string]float64 { 66 if m != nil { 67 return m.F 68 } 69 return nil 70} 71 72func init() { 73 proto.RegisterType((*M)(nil), "M") 74 proto.RegisterMapType((map[string]float64)(nil), "M.FEntry") 75} 76func (m *M) Marshal() (dAtA []byte, err error) { 77 size := m.Size() 78 dAtA = make([]byte, size) 79 n, err := m.MarshalTo(dAtA) 80 if err != nil { 81 return nil, err 82 } 83 return dAtA[:n], nil 84} 85 86func (m *M) MarshalTo(dAtA []byte) (int, error) { 87 var i int 88 _ = i 89 var l int 90 _ = l 91 if len(m.F) > 0 { 92 for k := range m.F { 93 dAtA[i] = 0xa 94 i++ 95 v := m.F[k] 96 mapSize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 97 i = encodeVarintNopackage(dAtA, i, uint64(mapSize)) 98 dAtA[i] = 0xa 99 i++ 100 i = encodeVarintNopackage(dAtA, i, uint64(len(k))) 101 i += copy(dAtA[i:], k) 102 dAtA[i] = 0x11 103 i++ 104 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) 105 i += 8 106 } 107 } 108 if m.XXX_unrecognized != nil { 109 i += copy(dAtA[i:], m.XXX_unrecognized) 110 } 111 return i, nil 112} 113 114func encodeVarintNopackage(dAtA []byte, offset int, v uint64) int { 115 for v >= 1<<7 { 116 dAtA[offset] = uint8(v&0x7f | 0x80) 117 v >>= 7 118 offset++ 119 } 120 dAtA[offset] = uint8(v) 121 return offset + 1 122} 123func (m *M) Size() (n int) { 124 var l int 125 _ = l 126 if len(m.F) > 0 { 127 for k, v := range m.F { 128 _ = k 129 _ = v 130 mapEntrySize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 131 n += mapEntrySize + 1 + sovNopackage(uint64(mapEntrySize)) 132 } 133 } 134 if m.XXX_unrecognized != nil { 135 n += len(m.XXX_unrecognized) 136 } 137 return n 138} 139 140func sovNopackage(x uint64) (n int) { 141 for { 142 n++ 143 x >>= 7 144 if x == 0 { 145 break 146 } 147 } 148 return n 149} 150func sozNopackage(x uint64) (n int) { 151 return sovNopackage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 152} 153func (m *M) Unmarshal(dAtA []byte) error { 154 l := len(dAtA) 155 iNdEx := 0 156 for iNdEx < l { 157 preIndex := iNdEx 158 var wire uint64 159 for shift := uint(0); ; shift += 7 { 160 if shift >= 64 { 161 return ErrIntOverflowNopackage 162 } 163 if iNdEx >= l { 164 return io.ErrUnexpectedEOF 165 } 166 b := dAtA[iNdEx] 167 iNdEx++ 168 wire |= (uint64(b) & 0x7F) << shift 169 if b < 0x80 { 170 break 171 } 172 } 173 fieldNum := int32(wire >> 3) 174 wireType := int(wire & 0x7) 175 if wireType == 4 { 176 return fmt.Errorf("proto: M: wiretype end group for non-group") 177 } 178 if fieldNum <= 0 { 179 return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) 180 } 181 switch fieldNum { 182 case 1: 183 if wireType != 2 { 184 return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) 185 } 186 var msglen int 187 for shift := uint(0); ; shift += 7 { 188 if shift >= 64 { 189 return ErrIntOverflowNopackage 190 } 191 if iNdEx >= l { 192 return io.ErrUnexpectedEOF 193 } 194 b := dAtA[iNdEx] 195 iNdEx++ 196 msglen |= (int(b) & 0x7F) << shift 197 if b < 0x80 { 198 break 199 } 200 } 201 if msglen < 0 { 202 return ErrInvalidLengthNopackage 203 } 204 postIndex := iNdEx + msglen 205 if postIndex > l { 206 return io.ErrUnexpectedEOF 207 } 208 if m.F == nil { 209 m.F = make(map[string]float64) 210 } 211 var mapkey string 212 var mapvalue float64 213 for iNdEx < postIndex { 214 entryPreIndex := iNdEx 215 var wire uint64 216 for shift := uint(0); ; shift += 7 { 217 if shift >= 64 { 218 return ErrIntOverflowNopackage 219 } 220 if iNdEx >= l { 221 return io.ErrUnexpectedEOF 222 } 223 b := dAtA[iNdEx] 224 iNdEx++ 225 wire |= (uint64(b) & 0x7F) << shift 226 if b < 0x80 { 227 break 228 } 229 } 230 fieldNum := int32(wire >> 3) 231 if fieldNum == 1 { 232 var stringLenmapkey uint64 233 for shift := uint(0); ; shift += 7 { 234 if shift >= 64 { 235 return ErrIntOverflowNopackage 236 } 237 if iNdEx >= l { 238 return io.ErrUnexpectedEOF 239 } 240 b := dAtA[iNdEx] 241 iNdEx++ 242 stringLenmapkey |= (uint64(b) & 0x7F) << shift 243 if b < 0x80 { 244 break 245 } 246 } 247 intStringLenmapkey := int(stringLenmapkey) 248 if intStringLenmapkey < 0 { 249 return ErrInvalidLengthNopackage 250 } 251 postStringIndexmapkey := iNdEx + intStringLenmapkey 252 if postStringIndexmapkey > l { 253 return io.ErrUnexpectedEOF 254 } 255 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 256 iNdEx = postStringIndexmapkey 257 } else if fieldNum == 2 { 258 var mapvaluetemp uint64 259 if (iNdEx + 8) > l { 260 return io.ErrUnexpectedEOF 261 } 262 mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 263 iNdEx += 8 264 mapvalue = math.Float64frombits(mapvaluetemp) 265 } else { 266 iNdEx = entryPreIndex 267 skippy, err := skipNopackage(dAtA[iNdEx:]) 268 if err != nil { 269 return err 270 } 271 if skippy < 0 { 272 return ErrInvalidLengthNopackage 273 } 274 if (iNdEx + skippy) > postIndex { 275 return io.ErrUnexpectedEOF 276 } 277 iNdEx += skippy 278 } 279 } 280 m.F[mapkey] = mapvalue 281 iNdEx = postIndex 282 default: 283 iNdEx = preIndex 284 skippy, err := skipNopackage(dAtA[iNdEx:]) 285 if err != nil { 286 return err 287 } 288 if skippy < 0 { 289 return ErrInvalidLengthNopackage 290 } 291 if (iNdEx + skippy) > l { 292 return io.ErrUnexpectedEOF 293 } 294 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 295 iNdEx += skippy 296 } 297 } 298 299 if iNdEx > l { 300 return io.ErrUnexpectedEOF 301 } 302 return nil 303} 304func skipNopackage(dAtA []byte) (n int, err error) { 305 l := len(dAtA) 306 iNdEx := 0 307 for iNdEx < l { 308 var wire uint64 309 for shift := uint(0); ; shift += 7 { 310 if shift >= 64 { 311 return 0, ErrIntOverflowNopackage 312 } 313 if iNdEx >= l { 314 return 0, io.ErrUnexpectedEOF 315 } 316 b := dAtA[iNdEx] 317 iNdEx++ 318 wire |= (uint64(b) & 0x7F) << shift 319 if b < 0x80 { 320 break 321 } 322 } 323 wireType := int(wire & 0x7) 324 switch wireType { 325 case 0: 326 for shift := uint(0); ; shift += 7 { 327 if shift >= 64 { 328 return 0, ErrIntOverflowNopackage 329 } 330 if iNdEx >= l { 331 return 0, io.ErrUnexpectedEOF 332 } 333 iNdEx++ 334 if dAtA[iNdEx-1] < 0x80 { 335 break 336 } 337 } 338 return iNdEx, nil 339 case 1: 340 iNdEx += 8 341 return iNdEx, nil 342 case 2: 343 var length int 344 for shift := uint(0); ; shift += 7 { 345 if shift >= 64 { 346 return 0, ErrIntOverflowNopackage 347 } 348 if iNdEx >= l { 349 return 0, io.ErrUnexpectedEOF 350 } 351 b := dAtA[iNdEx] 352 iNdEx++ 353 length |= (int(b) & 0x7F) << shift 354 if b < 0x80 { 355 break 356 } 357 } 358 iNdEx += length 359 if length < 0 { 360 return 0, ErrInvalidLengthNopackage 361 } 362 return iNdEx, nil 363 case 3: 364 for { 365 var innerWire uint64 366 var start int = iNdEx 367 for shift := uint(0); ; shift += 7 { 368 if shift >= 64 { 369 return 0, ErrIntOverflowNopackage 370 } 371 if iNdEx >= l { 372 return 0, io.ErrUnexpectedEOF 373 } 374 b := dAtA[iNdEx] 375 iNdEx++ 376 innerWire |= (uint64(b) & 0x7F) << shift 377 if b < 0x80 { 378 break 379 } 380 } 381 innerWireType := int(innerWire & 0x7) 382 if innerWireType == 4 { 383 break 384 } 385 next, err := skipNopackage(dAtA[start:]) 386 if err != nil { 387 return 0, err 388 } 389 iNdEx = start + next 390 } 391 return iNdEx, nil 392 case 4: 393 return iNdEx, nil 394 case 5: 395 iNdEx += 4 396 return iNdEx, nil 397 default: 398 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 399 } 400 } 401 panic("unreachable") 402} 403 404var ( 405 ErrInvalidLengthNopackage = fmt.Errorf("proto: negative length found during unmarshaling") 406 ErrIntOverflowNopackage = fmt.Errorf("proto: integer overflow") 407) 408 409func init() { proto.RegisterFile("nopackage.proto", fileDescriptor_nopackage_085d7f4350f51d1d) } 410 411var fileDescriptor_nopackage_085d7f4350f51d1d = []byte{ 412 // 134 bytes of a gzipped FileDescriptorProto 413 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0xcb, 0x2f, 0x48, 414 0x4c, 0xce, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x0a, 0xe2, 0x62, 0xf4, 415 0x15, 0x12, 0xe7, 0x62, 0x4c, 0x93, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0xe2, 0xd4, 0xf3, 0xd5, 416 0x73, 0x73, 0xcd, 0x2b, 0x29, 0xaa, 0x0c, 0x62, 0x4c, 0x93, 0x32, 0xe1, 0x62, 0x83, 0x70, 0x84, 417 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, 418 0x11, 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xc6, 0x20, 0x08, 419 0xc7, 0x8a, 0xc9, 0x82, 0xd1, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 420 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x5b, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x62, 0x62, 421 0xb2, 0xed, 0x7b, 0x00, 0x00, 0x00, 422} 423