github.com/celestiaorg/celestia-node@v0.15.0-beta.1/share/p2p/shrexsub/pb/notification.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: share/p2p/shrexsub/pb/notification.proto 3 4 package share_p2p_shrex_sub 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = 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. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 type RecentEDSNotification struct { 26 Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 27 DataHash []byte `protobuf:"bytes,2,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` 28 } 29 30 func (m *RecentEDSNotification) Reset() { *m = RecentEDSNotification{} } 31 func (m *RecentEDSNotification) String() string { return proto.CompactTextString(m) } 32 func (*RecentEDSNotification) ProtoMessage() {} 33 func (*RecentEDSNotification) Descriptor() ([]byte, []int) { 34 return fileDescriptor_1a6ade914b560e62, []int{0} 35 } 36 func (m *RecentEDSNotification) XXX_Unmarshal(b []byte) error { 37 return m.Unmarshal(b) 38 } 39 func (m *RecentEDSNotification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 40 if deterministic { 41 return xxx_messageInfo_RecentEDSNotification.Marshal(b, m, deterministic) 42 } else { 43 b = b[:cap(b)] 44 n, err := m.MarshalToSizedBuffer(b) 45 if err != nil { 46 return nil, err 47 } 48 return b[:n], nil 49 } 50 } 51 func (m *RecentEDSNotification) XXX_Merge(src proto.Message) { 52 xxx_messageInfo_RecentEDSNotification.Merge(m, src) 53 } 54 func (m *RecentEDSNotification) XXX_Size() int { 55 return m.Size() 56 } 57 func (m *RecentEDSNotification) XXX_DiscardUnknown() { 58 xxx_messageInfo_RecentEDSNotification.DiscardUnknown(m) 59 } 60 61 var xxx_messageInfo_RecentEDSNotification proto.InternalMessageInfo 62 63 func (m *RecentEDSNotification) GetHeight() uint64 { 64 if m != nil { 65 return m.Height 66 } 67 return 0 68 } 69 70 func (m *RecentEDSNotification) GetDataHash() []byte { 71 if m != nil { 72 return m.DataHash 73 } 74 return nil 75 } 76 77 func init() { 78 proto.RegisterType((*RecentEDSNotification)(nil), "share.p2p.shrex.sub.RecentEDSNotification") 79 } 80 81 func init() { 82 proto.RegisterFile("share/p2p/shrexsub/pb/notification.proto", fileDescriptor_1a6ade914b560e62) 83 } 84 85 var fileDescriptor_1a6ade914b560e62 = []byte{ 86 // 176 bytes of a gzipped FileDescriptorProto 87 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x28, 0xce, 0x48, 0x2c, 88 0x4a, 0xd5, 0x2f, 0x30, 0x2a, 0xd0, 0x2f, 0xce, 0x28, 0x4a, 0xad, 0x28, 0x2e, 0x4d, 0xd2, 0x2f, 89 0x48, 0xd2, 0xcf, 0xcb, 0x2f, 0xc9, 0x4c, 0xcb, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2b, 90 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, 0xab, 0xd4, 0x2b, 0x30, 0x2a, 0xd0, 0x03, 0xab, 0xd4, 91 0x2b, 0x2e, 0x4d, 0x52, 0xf2, 0xe1, 0x12, 0x0d, 0x4a, 0x4d, 0x4e, 0xcd, 0x2b, 0x71, 0x75, 0x09, 92 0xf6, 0x43, 0xd2, 0x23, 0x24, 0xc6, 0xc5, 0x96, 0x91, 0x9a, 0x99, 0x9e, 0x51, 0x22, 0xc1, 0xa8, 93 0xc0, 0xa8, 0xc1, 0x12, 0x04, 0xe5, 0x09, 0x49, 0x73, 0x71, 0xa6, 0x24, 0x96, 0x24, 0xc6, 0x67, 94 0x24, 0x16, 0x67, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x04, 0x71, 0x80, 0x04, 0x3c, 0x12, 0x8b, 95 0x33, 0x9c, 0x24, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 96 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 97 0x06, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0x16, 0xea, 0xc6, 0xaf, 0x00, 0x00, 0x00, 98 } 99 100 func (m *RecentEDSNotification) Marshal() (dAtA []byte, err error) { 101 size := m.Size() 102 dAtA = make([]byte, size) 103 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 104 if err != nil { 105 return nil, err 106 } 107 return dAtA[:n], nil 108 } 109 110 func (m *RecentEDSNotification) MarshalTo(dAtA []byte) (int, error) { 111 size := m.Size() 112 return m.MarshalToSizedBuffer(dAtA[:size]) 113 } 114 115 func (m *RecentEDSNotification) MarshalToSizedBuffer(dAtA []byte) (int, error) { 116 i := len(dAtA) 117 _ = i 118 var l int 119 _ = l 120 if len(m.DataHash) > 0 { 121 i -= len(m.DataHash) 122 copy(dAtA[i:], m.DataHash) 123 i = encodeVarintNotification(dAtA, i, uint64(len(m.DataHash))) 124 i-- 125 dAtA[i] = 0x12 126 } 127 if m.Height != 0 { 128 i = encodeVarintNotification(dAtA, i, uint64(m.Height)) 129 i-- 130 dAtA[i] = 0x8 131 } 132 return len(dAtA) - i, nil 133 } 134 135 func encodeVarintNotification(dAtA []byte, offset int, v uint64) int { 136 offset -= sovNotification(v) 137 base := offset 138 for v >= 1<<7 { 139 dAtA[offset] = uint8(v&0x7f | 0x80) 140 v >>= 7 141 offset++ 142 } 143 dAtA[offset] = uint8(v) 144 return base 145 } 146 func (m *RecentEDSNotification) Size() (n int) { 147 if m == nil { 148 return 0 149 } 150 var l int 151 _ = l 152 if m.Height != 0 { 153 n += 1 + sovNotification(uint64(m.Height)) 154 } 155 l = len(m.DataHash) 156 if l > 0 { 157 n += 1 + l + sovNotification(uint64(l)) 158 } 159 return n 160 } 161 162 func sovNotification(x uint64) (n int) { 163 return (math_bits.Len64(x|1) + 6) / 7 164 } 165 func sozNotification(x uint64) (n int) { 166 return sovNotification(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 167 } 168 func (m *RecentEDSNotification) Unmarshal(dAtA []byte) error { 169 l := len(dAtA) 170 iNdEx := 0 171 for iNdEx < l { 172 preIndex := iNdEx 173 var wire uint64 174 for shift := uint(0); ; shift += 7 { 175 if shift >= 64 { 176 return ErrIntOverflowNotification 177 } 178 if iNdEx >= l { 179 return io.ErrUnexpectedEOF 180 } 181 b := dAtA[iNdEx] 182 iNdEx++ 183 wire |= uint64(b&0x7F) << shift 184 if b < 0x80 { 185 break 186 } 187 } 188 fieldNum := int32(wire >> 3) 189 wireType := int(wire & 0x7) 190 if wireType == 4 { 191 return fmt.Errorf("proto: RecentEDSNotification: wiretype end group for non-group") 192 } 193 if fieldNum <= 0 { 194 return fmt.Errorf("proto: RecentEDSNotification: illegal tag %d (wire type %d)", fieldNum, wire) 195 } 196 switch fieldNum { 197 case 1: 198 if wireType != 0 { 199 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 200 } 201 m.Height = 0 202 for shift := uint(0); ; shift += 7 { 203 if shift >= 64 { 204 return ErrIntOverflowNotification 205 } 206 if iNdEx >= l { 207 return io.ErrUnexpectedEOF 208 } 209 b := dAtA[iNdEx] 210 iNdEx++ 211 m.Height |= uint64(b&0x7F) << shift 212 if b < 0x80 { 213 break 214 } 215 } 216 case 2: 217 if wireType != 2 { 218 return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) 219 } 220 var byteLen int 221 for shift := uint(0); ; shift += 7 { 222 if shift >= 64 { 223 return ErrIntOverflowNotification 224 } 225 if iNdEx >= l { 226 return io.ErrUnexpectedEOF 227 } 228 b := dAtA[iNdEx] 229 iNdEx++ 230 byteLen |= int(b&0x7F) << shift 231 if b < 0x80 { 232 break 233 } 234 } 235 if byteLen < 0 { 236 return ErrInvalidLengthNotification 237 } 238 postIndex := iNdEx + byteLen 239 if postIndex < 0 { 240 return ErrInvalidLengthNotification 241 } 242 if postIndex > l { 243 return io.ErrUnexpectedEOF 244 } 245 m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) 246 if m.DataHash == nil { 247 m.DataHash = []byte{} 248 } 249 iNdEx = postIndex 250 default: 251 iNdEx = preIndex 252 skippy, err := skipNotification(dAtA[iNdEx:]) 253 if err != nil { 254 return err 255 } 256 if (skippy < 0) || (iNdEx+skippy) < 0 { 257 return ErrInvalidLengthNotification 258 } 259 if (iNdEx + skippy) > l { 260 return io.ErrUnexpectedEOF 261 } 262 iNdEx += skippy 263 } 264 } 265 266 if iNdEx > l { 267 return io.ErrUnexpectedEOF 268 } 269 return nil 270 } 271 func skipNotification(dAtA []byte) (n int, err error) { 272 l := len(dAtA) 273 iNdEx := 0 274 depth := 0 275 for iNdEx < l { 276 var wire uint64 277 for shift := uint(0); ; shift += 7 { 278 if shift >= 64 { 279 return 0, ErrIntOverflowNotification 280 } 281 if iNdEx >= l { 282 return 0, io.ErrUnexpectedEOF 283 } 284 b := dAtA[iNdEx] 285 iNdEx++ 286 wire |= (uint64(b) & 0x7F) << shift 287 if b < 0x80 { 288 break 289 } 290 } 291 wireType := int(wire & 0x7) 292 switch wireType { 293 case 0: 294 for shift := uint(0); ; shift += 7 { 295 if shift >= 64 { 296 return 0, ErrIntOverflowNotification 297 } 298 if iNdEx >= l { 299 return 0, io.ErrUnexpectedEOF 300 } 301 iNdEx++ 302 if dAtA[iNdEx-1] < 0x80 { 303 break 304 } 305 } 306 case 1: 307 iNdEx += 8 308 case 2: 309 var length int 310 for shift := uint(0); ; shift += 7 { 311 if shift >= 64 { 312 return 0, ErrIntOverflowNotification 313 } 314 if iNdEx >= l { 315 return 0, io.ErrUnexpectedEOF 316 } 317 b := dAtA[iNdEx] 318 iNdEx++ 319 length |= (int(b) & 0x7F) << shift 320 if b < 0x80 { 321 break 322 } 323 } 324 if length < 0 { 325 return 0, ErrInvalidLengthNotification 326 } 327 iNdEx += length 328 case 3: 329 depth++ 330 case 4: 331 if depth == 0 { 332 return 0, ErrUnexpectedEndOfGroupNotification 333 } 334 depth-- 335 case 5: 336 iNdEx += 4 337 default: 338 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 339 } 340 if iNdEx < 0 { 341 return 0, ErrInvalidLengthNotification 342 } 343 if depth == 0 { 344 return iNdEx, nil 345 } 346 } 347 return 0, io.ErrUnexpectedEOF 348 } 349 350 var ( 351 ErrInvalidLengthNotification = fmt.Errorf("proto: negative length found during unmarshaling") 352 ErrIntOverflowNotification = fmt.Errorf("proto: integer overflow") 353 ErrUnexpectedEndOfGroupNotification = fmt.Errorf("proto: unexpected end of group") 354 )