khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 1 | // Code generated by protoc-gen-gogo. DO NOT EDIT. |
| 2 | // source: snap.proto |
| 3 | |
| 4 | /* |
| 5 | Package snappb is a generated protocol buffer package. |
| 6 | |
| 7 | It is generated from these files: |
| 8 | snap.proto |
| 9 | |
| 10 | It has these top-level messages: |
| 11 | Snapshot |
| 12 | */ |
| 13 | package snappb |
| 14 | |
| 15 | import ( |
| 16 | "fmt" |
| 17 | |
| 18 | proto "github.com/golang/protobuf/proto" |
| 19 | |
| 20 | math "math" |
| 21 | |
| 22 | _ "github.com/gogo/protobuf/gogoproto" |
| 23 | |
| 24 | io "io" |
| 25 | ) |
| 26 | |
| 27 | // Reference imports to suppress errors if they are not otherwise used. |
| 28 | var _ = proto.Marshal |
| 29 | var _ = fmt.Errorf |
| 30 | var _ = math.Inf |
| 31 | |
| 32 | // This is a compile-time assertion to ensure that this generated file |
| 33 | // is compatible with the proto package it is being compiled against. |
| 34 | // A compilation error at this line likely means your copy of the |
| 35 | // proto package needs to be updated. |
| 36 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package |
| 37 | |
| 38 | type Snapshot struct { |
| 39 | Crc uint32 `protobuf:"varint,1,opt,name=crc" json:"crc"` |
| 40 | Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` |
| 41 | XXX_unrecognized []byte `json:"-"` |
| 42 | } |
| 43 | |
| 44 | func (m *Snapshot) Reset() { *m = Snapshot{} } |
| 45 | func (m *Snapshot) String() string { return proto.CompactTextString(m) } |
| 46 | func (*Snapshot) ProtoMessage() {} |
| 47 | func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorSnap, []int{0} } |
| 48 | |
| 49 | func init() { |
| 50 | proto.RegisterType((*Snapshot)(nil), "snappb.snapshot") |
| 51 | } |
| 52 | func (m *Snapshot) Marshal() (dAtA []byte, err error) { |
| 53 | size := m.Size() |
| 54 | dAtA = make([]byte, size) |
| 55 | n, err := m.MarshalTo(dAtA) |
| 56 | if err != nil { |
| 57 | return nil, err |
| 58 | } |
| 59 | return dAtA[:n], nil |
| 60 | } |
| 61 | |
| 62 | func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) { |
| 63 | var i int |
| 64 | _ = i |
| 65 | var l int |
| 66 | _ = l |
| 67 | dAtA[i] = 0x8 |
| 68 | i++ |
| 69 | i = encodeVarintSnap(dAtA, i, uint64(m.Crc)) |
| 70 | if m.Data != nil { |
| 71 | dAtA[i] = 0x12 |
| 72 | i++ |
| 73 | i = encodeVarintSnap(dAtA, i, uint64(len(m.Data))) |
| 74 | i += copy(dAtA[i:], m.Data) |
| 75 | } |
| 76 | if m.XXX_unrecognized != nil { |
| 77 | i += copy(dAtA[i:], m.XXX_unrecognized) |
| 78 | } |
| 79 | return i, nil |
| 80 | } |
| 81 | |
| 82 | func encodeVarintSnap(dAtA []byte, offset int, v uint64) int { |
| 83 | for v >= 1<<7 { |
| 84 | dAtA[offset] = uint8(v&0x7f | 0x80) |
| 85 | v >>= 7 |
| 86 | offset++ |
| 87 | } |
| 88 | dAtA[offset] = uint8(v) |
| 89 | return offset + 1 |
| 90 | } |
| 91 | func (m *Snapshot) Size() (n int) { |
| 92 | var l int |
| 93 | _ = l |
| 94 | n += 1 + sovSnap(uint64(m.Crc)) |
| 95 | if m.Data != nil { |
| 96 | l = len(m.Data) |
| 97 | n += 1 + l + sovSnap(uint64(l)) |
| 98 | } |
| 99 | if m.XXX_unrecognized != nil { |
| 100 | n += len(m.XXX_unrecognized) |
| 101 | } |
| 102 | return n |
| 103 | } |
| 104 | |
| 105 | func sovSnap(x uint64) (n int) { |
| 106 | for { |
| 107 | n++ |
| 108 | x >>= 7 |
| 109 | if x == 0 { |
| 110 | break |
| 111 | } |
| 112 | } |
| 113 | return n |
| 114 | } |
| 115 | func sozSnap(x uint64) (n int) { |
| 116 | return sovSnap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| 117 | } |
| 118 | func (m *Snapshot) Unmarshal(dAtA []byte) error { |
| 119 | l := len(dAtA) |
| 120 | iNdEx := 0 |
| 121 | for iNdEx < l { |
| 122 | preIndex := iNdEx |
| 123 | var wire uint64 |
| 124 | for shift := uint(0); ; shift += 7 { |
| 125 | if shift >= 64 { |
| 126 | return ErrIntOverflowSnap |
| 127 | } |
| 128 | if iNdEx >= l { |
| 129 | return io.ErrUnexpectedEOF |
| 130 | } |
| 131 | b := dAtA[iNdEx] |
| 132 | iNdEx++ |
| 133 | wire |= (uint64(b) & 0x7F) << shift |
| 134 | if b < 0x80 { |
| 135 | break |
| 136 | } |
| 137 | } |
| 138 | fieldNum := int32(wire >> 3) |
| 139 | wireType := int(wire & 0x7) |
| 140 | if wireType == 4 { |
| 141 | return fmt.Errorf("proto: snapshot: wiretype end group for non-group") |
| 142 | } |
| 143 | if fieldNum <= 0 { |
| 144 | return fmt.Errorf("proto: snapshot: illegal tag %d (wire type %d)", fieldNum, wire) |
| 145 | } |
| 146 | switch fieldNum { |
| 147 | case 1: |
| 148 | if wireType != 0 { |
| 149 | return fmt.Errorf("proto: wrong wireType = %d for field Crc", wireType) |
| 150 | } |
| 151 | m.Crc = 0 |
| 152 | for shift := uint(0); ; shift += 7 { |
| 153 | if shift >= 64 { |
| 154 | return ErrIntOverflowSnap |
| 155 | } |
| 156 | if iNdEx >= l { |
| 157 | return io.ErrUnexpectedEOF |
| 158 | } |
| 159 | b := dAtA[iNdEx] |
| 160 | iNdEx++ |
| 161 | m.Crc |= (uint32(b) & 0x7F) << shift |
| 162 | if b < 0x80 { |
| 163 | break |
| 164 | } |
| 165 | } |
| 166 | case 2: |
| 167 | if wireType != 2 { |
| 168 | return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) |
| 169 | } |
| 170 | var byteLen int |
| 171 | for shift := uint(0); ; shift += 7 { |
| 172 | if shift >= 64 { |
| 173 | return ErrIntOverflowSnap |
| 174 | } |
| 175 | if iNdEx >= l { |
| 176 | return io.ErrUnexpectedEOF |
| 177 | } |
| 178 | b := dAtA[iNdEx] |
| 179 | iNdEx++ |
| 180 | byteLen |= (int(b) & 0x7F) << shift |
| 181 | if b < 0x80 { |
| 182 | break |
| 183 | } |
| 184 | } |
| 185 | if byteLen < 0 { |
| 186 | return ErrInvalidLengthSnap |
| 187 | } |
| 188 | postIndex := iNdEx + byteLen |
| 189 | if postIndex > l { |
| 190 | return io.ErrUnexpectedEOF |
| 191 | } |
| 192 | m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) |
| 193 | if m.Data == nil { |
| 194 | m.Data = []byte{} |
| 195 | } |
| 196 | iNdEx = postIndex |
| 197 | default: |
| 198 | iNdEx = preIndex |
| 199 | skippy, err := skipSnap(dAtA[iNdEx:]) |
| 200 | if err != nil { |
| 201 | return err |
| 202 | } |
| 203 | if skippy < 0 { |
| 204 | return ErrInvalidLengthSnap |
| 205 | } |
| 206 | if (iNdEx + skippy) > l { |
| 207 | return io.ErrUnexpectedEOF |
| 208 | } |
| 209 | m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) |
| 210 | iNdEx += skippy |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | if iNdEx > l { |
| 215 | return io.ErrUnexpectedEOF |
| 216 | } |
| 217 | return nil |
| 218 | } |
| 219 | func skipSnap(dAtA []byte) (n int, err error) { |
| 220 | l := len(dAtA) |
| 221 | iNdEx := 0 |
| 222 | for iNdEx < l { |
| 223 | var wire uint64 |
| 224 | for shift := uint(0); ; shift += 7 { |
| 225 | if shift >= 64 { |
| 226 | return 0, ErrIntOverflowSnap |
| 227 | } |
| 228 | if iNdEx >= l { |
| 229 | return 0, io.ErrUnexpectedEOF |
| 230 | } |
| 231 | b := dAtA[iNdEx] |
| 232 | iNdEx++ |
| 233 | wire |= (uint64(b) & 0x7F) << shift |
| 234 | if b < 0x80 { |
| 235 | break |
| 236 | } |
| 237 | } |
| 238 | wireType := int(wire & 0x7) |
| 239 | switch wireType { |
| 240 | case 0: |
| 241 | for shift := uint(0); ; shift += 7 { |
| 242 | if shift >= 64 { |
| 243 | return 0, ErrIntOverflowSnap |
| 244 | } |
| 245 | if iNdEx >= l { |
| 246 | return 0, io.ErrUnexpectedEOF |
| 247 | } |
| 248 | iNdEx++ |
| 249 | if dAtA[iNdEx-1] < 0x80 { |
| 250 | break |
| 251 | } |
| 252 | } |
| 253 | return iNdEx, nil |
| 254 | case 1: |
| 255 | iNdEx += 8 |
| 256 | return iNdEx, nil |
| 257 | case 2: |
| 258 | var length int |
| 259 | for shift := uint(0); ; shift += 7 { |
| 260 | if shift >= 64 { |
| 261 | return 0, ErrIntOverflowSnap |
| 262 | } |
| 263 | if iNdEx >= l { |
| 264 | return 0, io.ErrUnexpectedEOF |
| 265 | } |
| 266 | b := dAtA[iNdEx] |
| 267 | iNdEx++ |
| 268 | length |= (int(b) & 0x7F) << shift |
| 269 | if b < 0x80 { |
| 270 | break |
| 271 | } |
| 272 | } |
| 273 | iNdEx += length |
| 274 | if length < 0 { |
| 275 | return 0, ErrInvalidLengthSnap |
| 276 | } |
| 277 | return iNdEx, nil |
| 278 | case 3: |
| 279 | for { |
| 280 | var innerWire uint64 |
| 281 | var start int = iNdEx |
| 282 | for shift := uint(0); ; shift += 7 { |
| 283 | if shift >= 64 { |
| 284 | return 0, ErrIntOverflowSnap |
| 285 | } |
| 286 | if iNdEx >= l { |
| 287 | return 0, io.ErrUnexpectedEOF |
| 288 | } |
| 289 | b := dAtA[iNdEx] |
| 290 | iNdEx++ |
| 291 | innerWire |= (uint64(b) & 0x7F) << shift |
| 292 | if b < 0x80 { |
| 293 | break |
| 294 | } |
| 295 | } |
| 296 | innerWireType := int(innerWire & 0x7) |
| 297 | if innerWireType == 4 { |
| 298 | break |
| 299 | } |
| 300 | next, err := skipSnap(dAtA[start:]) |
| 301 | if err != nil { |
| 302 | return 0, err |
| 303 | } |
| 304 | iNdEx = start + next |
| 305 | } |
| 306 | return iNdEx, nil |
| 307 | case 4: |
| 308 | return iNdEx, nil |
| 309 | case 5: |
| 310 | iNdEx += 4 |
| 311 | return iNdEx, nil |
| 312 | default: |
| 313 | return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| 314 | } |
| 315 | } |
| 316 | panic("unreachable") |
| 317 | } |
| 318 | |
| 319 | var ( |
| 320 | ErrInvalidLengthSnap = fmt.Errorf("proto: negative length found during unmarshaling") |
| 321 | ErrIntOverflowSnap = fmt.Errorf("proto: integer overflow") |
| 322 | ) |
| 323 | |
| 324 | func init() { proto.RegisterFile("snap.proto", fileDescriptorSnap) } |
| 325 | |
| 326 | var fileDescriptorSnap = []byte{ |
| 327 | // 126 bytes of a gzipped FileDescriptorProto |
| 328 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xce, 0x4b, 0x2c, |
| 329 | 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0xb1, 0x0b, 0x92, 0xa4, 0x44, 0xd2, 0xf3, |
| 330 | 0xd3, 0xf3, 0xc1, 0x42, 0xfa, 0x20, 0x16, 0x44, 0x56, 0xc9, 0x8c, 0x8b, 0x03, 0x24, 0x5f, 0x9c, |
| 331 | 0x91, 0x5f, 0x22, 0x24, 0xc6, 0xc5, 0x9c, 0x5c, 0x94, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xeb, |
| 332 | 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x48, 0x40, 0x48, 0x88, 0x8b, 0x25, 0x25, 0xb1, 0x24, |
| 333 | 0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xcc, 0x76, 0x12, 0x39, 0xf1, 0x50, 0x8e, 0xe1, |
| 334 | 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, |
| 335 | 0x01, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0f, 0x32, 0xb2, 0x78, 0x00, 0x00, 0x00, |
| 336 | } |