github.com/demonoid81/containerd@v1.3.4/api/events/content.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/events/content.proto 3 4 package events 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" 10 io "io" 11 math "math" 12 reflect "reflect" 13 strings "strings" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 26 27 type ContentDelete struct { 28 Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` 29 XXX_NoUnkeyedLiteral struct{} `json:"-"` 30 XXX_unrecognized []byte `json:"-"` 31 XXX_sizecache int32 `json:"-"` 32 } 33 34 func (m *ContentDelete) Reset() { *m = ContentDelete{} } 35 func (*ContentDelete) ProtoMessage() {} 36 func (*ContentDelete) Descriptor() ([]byte, []int) { 37 return fileDescriptor_dfb34b8b808e2ecd, []int{0} 38 } 39 func (m *ContentDelete) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *ContentDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_ContentDelete.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalTo(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *ContentDelete) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_ContentDelete.Merge(m, src) 56 } 57 func (m *ContentDelete) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *ContentDelete) XXX_DiscardUnknown() { 61 xxx_messageInfo_ContentDelete.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_ContentDelete proto.InternalMessageInfo 65 66 func init() { 67 proto.RegisterType((*ContentDelete)(nil), "containerd.events.ContentDelete") 68 } 69 70 func init() { 71 proto.RegisterFile("github.com/containerd/containerd/api/events/content.proto", fileDescriptor_dfb34b8b808e2ecd) 72 } 73 74 var fileDescriptor_dfb34b8b808e2ecd = []byte{ 75 // 228 bytes of a gzipped FileDescriptorProto 76 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, 77 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 78 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0x83, 0x45, 0x53, 79 0xf3, 0x4a, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x11, 0x8a, 0xf4, 0x20, 0x0a, 0xa4, 80 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xb2, 0xfa, 0x20, 0x16, 0x44, 0xa1, 0x94, 0x03, 0x41, 0x3b, 81 0xc0, 0xea, 0x92, 0x4a, 0xd3, 0xf4, 0x0b, 0x72, 0x4a, 0xd3, 0x33, 0xf3, 0xf4, 0xd3, 0x32, 0x53, 82 0x73, 0x52, 0x0a, 0x12, 0x4b, 0x32, 0x20, 0x26, 0x28, 0x45, 0x73, 0xf1, 0x3a, 0x43, 0xec, 0x76, 83 0x49, 0xcd, 0x49, 0x2d, 0x49, 0x15, 0xf2, 0xe2, 0x62, 0x4b, 0xc9, 0x4c, 0x4f, 0x2d, 0x2e, 0x91, 84 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x32, 0x3a, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x2d, 85 0x24, 0xab, 0xf2, 0x0b, 0x52, 0xf3, 0xe0, 0x76, 0x14, 0xeb, 0xa7, 0xe7, 0xeb, 0x42, 0xb4, 0xe8, 86 0xb9, 0x80, 0xa9, 0x20, 0xa8, 0x09, 0x4e, 0x01, 0x27, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 87 0xd0, 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 88 0x63, 0x5c, 0xf0, 0x45, 0x8e, 0x31, 0xca, 0x88, 0x84, 0x00, 0xb2, 0x86, 0x50, 0x11, 0x0c, 0x11, 89 0x8c, 0x49, 0x6c, 0x60, 0x97, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x78, 0x99, 0xee, 90 0x61, 0x01, 0x00, 0x00, 91 } 92 93 // Field returns the value for the given fieldpath as a string, if defined. 94 // If the value is not defined, the second value will be false. 95 func (m *ContentDelete) Field(fieldpath []string) (string, bool) { 96 if len(fieldpath) == 0 { 97 return "", false 98 } 99 100 switch fieldpath[0] { 101 case "digest": 102 return string(m.Digest), len(m.Digest) > 0 103 } 104 return "", false 105 } 106 func (m *ContentDelete) Marshal() (dAtA []byte, err error) { 107 size := m.Size() 108 dAtA = make([]byte, size) 109 n, err := m.MarshalTo(dAtA) 110 if err != nil { 111 return nil, err 112 } 113 return dAtA[:n], nil 114 } 115 116 func (m *ContentDelete) MarshalTo(dAtA []byte) (int, error) { 117 var i int 118 _ = i 119 var l int 120 _ = l 121 if len(m.Digest) > 0 { 122 dAtA[i] = 0xa 123 i++ 124 i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) 125 i += copy(dAtA[i:], m.Digest) 126 } 127 if m.XXX_unrecognized != nil { 128 i += copy(dAtA[i:], m.XXX_unrecognized) 129 } 130 return i, nil 131 } 132 133 func encodeVarintContent(dAtA []byte, offset int, v uint64) int { 134 for v >= 1<<7 { 135 dAtA[offset] = uint8(v&0x7f | 0x80) 136 v >>= 7 137 offset++ 138 } 139 dAtA[offset] = uint8(v) 140 return offset + 1 141 } 142 func (m *ContentDelete) Size() (n int) { 143 if m == nil { 144 return 0 145 } 146 var l int 147 _ = l 148 l = len(m.Digest) 149 if l > 0 { 150 n += 1 + l + sovContent(uint64(l)) 151 } 152 if m.XXX_unrecognized != nil { 153 n += len(m.XXX_unrecognized) 154 } 155 return n 156 } 157 158 func sovContent(x uint64) (n int) { 159 for { 160 n++ 161 x >>= 7 162 if x == 0 { 163 break 164 } 165 } 166 return n 167 } 168 func sozContent(x uint64) (n int) { 169 return sovContent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 170 } 171 func (this *ContentDelete) String() string { 172 if this == nil { 173 return "nil" 174 } 175 s := strings.Join([]string{`&ContentDelete{`, 176 `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, 177 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 178 `}`, 179 }, "") 180 return s 181 } 182 func valueToStringContent(v interface{}) string { 183 rv := reflect.ValueOf(v) 184 if rv.IsNil() { 185 return "nil" 186 } 187 pv := reflect.Indirect(rv).Interface() 188 return fmt.Sprintf("*%v", pv) 189 } 190 func (m *ContentDelete) Unmarshal(dAtA []byte) error { 191 l := len(dAtA) 192 iNdEx := 0 193 for iNdEx < l { 194 preIndex := iNdEx 195 var wire uint64 196 for shift := uint(0); ; shift += 7 { 197 if shift >= 64 { 198 return ErrIntOverflowContent 199 } 200 if iNdEx >= l { 201 return io.ErrUnexpectedEOF 202 } 203 b := dAtA[iNdEx] 204 iNdEx++ 205 wire |= uint64(b&0x7F) << shift 206 if b < 0x80 { 207 break 208 } 209 } 210 fieldNum := int32(wire >> 3) 211 wireType := int(wire & 0x7) 212 if wireType == 4 { 213 return fmt.Errorf("proto: ContentDelete: wiretype end group for non-group") 214 } 215 if fieldNum <= 0 { 216 return fmt.Errorf("proto: ContentDelete: illegal tag %d (wire type %d)", fieldNum, wire) 217 } 218 switch fieldNum { 219 case 1: 220 if wireType != 2 { 221 return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) 222 } 223 var stringLen uint64 224 for shift := uint(0); ; shift += 7 { 225 if shift >= 64 { 226 return ErrIntOverflowContent 227 } 228 if iNdEx >= l { 229 return io.ErrUnexpectedEOF 230 } 231 b := dAtA[iNdEx] 232 iNdEx++ 233 stringLen |= uint64(b&0x7F) << shift 234 if b < 0x80 { 235 break 236 } 237 } 238 intStringLen := int(stringLen) 239 if intStringLen < 0 { 240 return ErrInvalidLengthContent 241 } 242 postIndex := iNdEx + intStringLen 243 if postIndex < 0 { 244 return ErrInvalidLengthContent 245 } 246 if postIndex > l { 247 return io.ErrUnexpectedEOF 248 } 249 m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) 250 iNdEx = postIndex 251 default: 252 iNdEx = preIndex 253 skippy, err := skipContent(dAtA[iNdEx:]) 254 if err != nil { 255 return err 256 } 257 if skippy < 0 { 258 return ErrInvalidLengthContent 259 } 260 if (iNdEx + skippy) < 0 { 261 return ErrInvalidLengthContent 262 } 263 if (iNdEx + skippy) > l { 264 return io.ErrUnexpectedEOF 265 } 266 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 267 iNdEx += skippy 268 } 269 } 270 271 if iNdEx > l { 272 return io.ErrUnexpectedEOF 273 } 274 return nil 275 } 276 func skipContent(dAtA []byte) (n int, err error) { 277 l := len(dAtA) 278 iNdEx := 0 279 for iNdEx < l { 280 var wire uint64 281 for shift := uint(0); ; shift += 7 { 282 if shift >= 64 { 283 return 0, ErrIntOverflowContent 284 } 285 if iNdEx >= l { 286 return 0, io.ErrUnexpectedEOF 287 } 288 b := dAtA[iNdEx] 289 iNdEx++ 290 wire |= (uint64(b) & 0x7F) << shift 291 if b < 0x80 { 292 break 293 } 294 } 295 wireType := int(wire & 0x7) 296 switch wireType { 297 case 0: 298 for shift := uint(0); ; shift += 7 { 299 if shift >= 64 { 300 return 0, ErrIntOverflowContent 301 } 302 if iNdEx >= l { 303 return 0, io.ErrUnexpectedEOF 304 } 305 iNdEx++ 306 if dAtA[iNdEx-1] < 0x80 { 307 break 308 } 309 } 310 return iNdEx, nil 311 case 1: 312 iNdEx += 8 313 return iNdEx, nil 314 case 2: 315 var length int 316 for shift := uint(0); ; shift += 7 { 317 if shift >= 64 { 318 return 0, ErrIntOverflowContent 319 } 320 if iNdEx >= l { 321 return 0, io.ErrUnexpectedEOF 322 } 323 b := dAtA[iNdEx] 324 iNdEx++ 325 length |= (int(b) & 0x7F) << shift 326 if b < 0x80 { 327 break 328 } 329 } 330 if length < 0 { 331 return 0, ErrInvalidLengthContent 332 } 333 iNdEx += length 334 if iNdEx < 0 { 335 return 0, ErrInvalidLengthContent 336 } 337 return iNdEx, nil 338 case 3: 339 for { 340 var innerWire uint64 341 var start int = iNdEx 342 for shift := uint(0); ; shift += 7 { 343 if shift >= 64 { 344 return 0, ErrIntOverflowContent 345 } 346 if iNdEx >= l { 347 return 0, io.ErrUnexpectedEOF 348 } 349 b := dAtA[iNdEx] 350 iNdEx++ 351 innerWire |= (uint64(b) & 0x7F) << shift 352 if b < 0x80 { 353 break 354 } 355 } 356 innerWireType := int(innerWire & 0x7) 357 if innerWireType == 4 { 358 break 359 } 360 next, err := skipContent(dAtA[start:]) 361 if err != nil { 362 return 0, err 363 } 364 iNdEx = start + next 365 if iNdEx < 0 { 366 return 0, ErrInvalidLengthContent 367 } 368 } 369 return iNdEx, nil 370 case 4: 371 return iNdEx, nil 372 case 5: 373 iNdEx += 4 374 return iNdEx, nil 375 default: 376 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 377 } 378 } 379 panic("unreachable") 380 } 381 382 var ( 383 ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling") 384 ErrIntOverflowContent = fmt.Errorf("proto: integer overflow") 385 )