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