github.com/demonoid81/containerd@v1.3.4/api/services/diff/v1/diff.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/services/diff/v1/diff.proto 3 4 package diff 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/containerd/containerd/api/types" 10 proto "github.com/gogo/protobuf/proto" 11 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 12 types1 "github.com/gogo/protobuf/types" 13 grpc "google.golang.org/grpc" 14 io "io" 15 math "math" 16 reflect "reflect" 17 strings "strings" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 25 // This is a compile-time assertion to ensure that this generated file 26 // is compatible with the proto package it is being compiled against. 27 // A compilation error at this line likely means your copy of the 28 // proto package needs to be updated. 29 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 30 31 type ApplyRequest struct { 32 // Diff is the descriptor of the diff to be extracted 33 Diff *types.Descriptor `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"` 34 Mounts []*types.Mount `protobuf:"bytes,2,rep,name=mounts,proto3" json:"mounts,omitempty"` 35 Payloads map[string]*types1.Any `protobuf:"bytes,3,rep,name=payloads,proto3" json:"payloads,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 36 XXX_NoUnkeyedLiteral struct{} `json:"-"` 37 XXX_unrecognized []byte `json:"-"` 38 XXX_sizecache int32 `json:"-"` 39 } 40 41 func (m *ApplyRequest) Reset() { *m = ApplyRequest{} } 42 func (*ApplyRequest) ProtoMessage() {} 43 func (*ApplyRequest) Descriptor() ([]byte, []int) { 44 return fileDescriptor_3b36a99e6faaa935, []int{0} 45 } 46 func (m *ApplyRequest) XXX_Unmarshal(b []byte) error { 47 return m.Unmarshal(b) 48 } 49 func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 50 if deterministic { 51 return xxx_messageInfo_ApplyRequest.Marshal(b, m, deterministic) 52 } else { 53 b = b[:cap(b)] 54 n, err := m.MarshalTo(b) 55 if err != nil { 56 return nil, err 57 } 58 return b[:n], nil 59 } 60 } 61 func (m *ApplyRequest) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_ApplyRequest.Merge(m, src) 63 } 64 func (m *ApplyRequest) XXX_Size() int { 65 return m.Size() 66 } 67 func (m *ApplyRequest) XXX_DiscardUnknown() { 68 xxx_messageInfo_ApplyRequest.DiscardUnknown(m) 69 } 70 71 var xxx_messageInfo_ApplyRequest proto.InternalMessageInfo 72 73 type ApplyResponse struct { 74 // Applied is the descriptor for the object which was applied. 75 // If the input was a compressed blob then the result will be 76 // the descriptor for the uncompressed blob. 77 Applied *types.Descriptor `protobuf:"bytes,1,opt,name=applied,proto3" json:"applied,omitempty"` 78 XXX_NoUnkeyedLiteral struct{} `json:"-"` 79 XXX_unrecognized []byte `json:"-"` 80 XXX_sizecache int32 `json:"-"` 81 } 82 83 func (m *ApplyResponse) Reset() { *m = ApplyResponse{} } 84 func (*ApplyResponse) ProtoMessage() {} 85 func (*ApplyResponse) Descriptor() ([]byte, []int) { 86 return fileDescriptor_3b36a99e6faaa935, []int{1} 87 } 88 func (m *ApplyResponse) XXX_Unmarshal(b []byte) error { 89 return m.Unmarshal(b) 90 } 91 func (m *ApplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 92 if deterministic { 93 return xxx_messageInfo_ApplyResponse.Marshal(b, m, deterministic) 94 } else { 95 b = b[:cap(b)] 96 n, err := m.MarshalTo(b) 97 if err != nil { 98 return nil, err 99 } 100 return b[:n], nil 101 } 102 } 103 func (m *ApplyResponse) XXX_Merge(src proto.Message) { 104 xxx_messageInfo_ApplyResponse.Merge(m, src) 105 } 106 func (m *ApplyResponse) XXX_Size() int { 107 return m.Size() 108 } 109 func (m *ApplyResponse) XXX_DiscardUnknown() { 110 xxx_messageInfo_ApplyResponse.DiscardUnknown(m) 111 } 112 113 var xxx_messageInfo_ApplyResponse proto.InternalMessageInfo 114 115 type DiffRequest struct { 116 // Left are the mounts which represent the older copy 117 // in which is the base of the computed changes. 118 Left []*types.Mount `protobuf:"bytes,1,rep,name=left,proto3" json:"left,omitempty"` 119 // Right are the mounts which represents the newer copy 120 // in which changes from the left were made into. 121 Right []*types.Mount `protobuf:"bytes,2,rep,name=right,proto3" json:"right,omitempty"` 122 // MediaType is the media type descriptor for the created diff 123 // object 124 MediaType string `protobuf:"bytes,3,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` 125 // Ref identifies the pre-commit content store object. This 126 // reference can be used to get the status from the content store. 127 Ref string `protobuf:"bytes,4,opt,name=ref,proto3" json:"ref,omitempty"` 128 // Labels are the labels to apply to the generated content 129 // on content store commit. 130 Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 131 XXX_NoUnkeyedLiteral struct{} `json:"-"` 132 XXX_unrecognized []byte `json:"-"` 133 XXX_sizecache int32 `json:"-"` 134 } 135 136 func (m *DiffRequest) Reset() { *m = DiffRequest{} } 137 func (*DiffRequest) ProtoMessage() {} 138 func (*DiffRequest) Descriptor() ([]byte, []int) { 139 return fileDescriptor_3b36a99e6faaa935, []int{2} 140 } 141 func (m *DiffRequest) XXX_Unmarshal(b []byte) error { 142 return m.Unmarshal(b) 143 } 144 func (m *DiffRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 145 if deterministic { 146 return xxx_messageInfo_DiffRequest.Marshal(b, m, deterministic) 147 } else { 148 b = b[:cap(b)] 149 n, err := m.MarshalTo(b) 150 if err != nil { 151 return nil, err 152 } 153 return b[:n], nil 154 } 155 } 156 func (m *DiffRequest) XXX_Merge(src proto.Message) { 157 xxx_messageInfo_DiffRequest.Merge(m, src) 158 } 159 func (m *DiffRequest) XXX_Size() int { 160 return m.Size() 161 } 162 func (m *DiffRequest) XXX_DiscardUnknown() { 163 xxx_messageInfo_DiffRequest.DiscardUnknown(m) 164 } 165 166 var xxx_messageInfo_DiffRequest proto.InternalMessageInfo 167 168 type DiffResponse struct { 169 // Diff is the descriptor of the diff which can be applied 170 Diff *types.Descriptor `protobuf:"bytes,3,opt,name=diff,proto3" json:"diff,omitempty"` 171 XXX_NoUnkeyedLiteral struct{} `json:"-"` 172 XXX_unrecognized []byte `json:"-"` 173 XXX_sizecache int32 `json:"-"` 174 } 175 176 func (m *DiffResponse) Reset() { *m = DiffResponse{} } 177 func (*DiffResponse) ProtoMessage() {} 178 func (*DiffResponse) Descriptor() ([]byte, []int) { 179 return fileDescriptor_3b36a99e6faaa935, []int{3} 180 } 181 func (m *DiffResponse) XXX_Unmarshal(b []byte) error { 182 return m.Unmarshal(b) 183 } 184 func (m *DiffResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 185 if deterministic { 186 return xxx_messageInfo_DiffResponse.Marshal(b, m, deterministic) 187 } else { 188 b = b[:cap(b)] 189 n, err := m.MarshalTo(b) 190 if err != nil { 191 return nil, err 192 } 193 return b[:n], nil 194 } 195 } 196 func (m *DiffResponse) XXX_Merge(src proto.Message) { 197 xxx_messageInfo_DiffResponse.Merge(m, src) 198 } 199 func (m *DiffResponse) XXX_Size() int { 200 return m.Size() 201 } 202 func (m *DiffResponse) XXX_DiscardUnknown() { 203 xxx_messageInfo_DiffResponse.DiscardUnknown(m) 204 } 205 206 var xxx_messageInfo_DiffResponse proto.InternalMessageInfo 207 208 func init() { 209 proto.RegisterType((*ApplyRequest)(nil), "containerd.services.diff.v1.ApplyRequest") 210 proto.RegisterMapType((map[string]*types1.Any)(nil), "containerd.services.diff.v1.ApplyRequest.PayloadsEntry") 211 proto.RegisterType((*ApplyResponse)(nil), "containerd.services.diff.v1.ApplyResponse") 212 proto.RegisterType((*DiffRequest)(nil), "containerd.services.diff.v1.DiffRequest") 213 proto.RegisterMapType((map[string]string)(nil), "containerd.services.diff.v1.DiffRequest.LabelsEntry") 214 proto.RegisterType((*DiffResponse)(nil), "containerd.services.diff.v1.DiffResponse") 215 } 216 217 func init() { 218 proto.RegisterFile("github.com/containerd/containerd/api/services/diff/v1/diff.proto", fileDescriptor_3b36a99e6faaa935) 219 } 220 221 var fileDescriptor_3b36a99e6faaa935 = []byte{ 222 // 526 bytes of a gzipped FileDescriptorProto 223 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6f, 0xd3, 0x4c, 224 0x10, 0x8d, 0xed, 0x24, 0xdf, 0x97, 0x49, 0x2b, 0xa1, 0x55, 0x24, 0x8c, 0x01, 0xab, 0xca, 0x29, 225 0x2d, 0x62, 0x4d, 0x03, 0x2a, 0xd0, 0x5e, 0x5a, 0x54, 0xc4, 0xa5, 0x48, 0x60, 0x7a, 0x40, 0x20, 226 0x81, 0x9c, 0x78, 0xed, 0xae, 0x70, 0xbc, 0x8b, 0x77, 0x1d, 0xc9, 0x37, 0xfe, 0x06, 0x67, 0x7e, 227 0x0a, 0x97, 0x1e, 0x39, 0x72, 0xa4, 0xf9, 0x25, 0xc8, 0xeb, 0x75, 0x31, 0x02, 0x05, 0xc3, 0xc9, 228 0x9b, 0x9d, 0xf7, 0xde, 0xce, 0xbc, 0x37, 0x0a, 0x1c, 0xc6, 0x54, 0x9e, 0xe5, 0x33, 0x3c, 0x67, 229 0x0b, 0x6f, 0xce, 0x52, 0x19, 0xd0, 0x94, 0x64, 0x61, 0xf3, 0x18, 0x70, 0xea, 0x09, 0x92, 0x2d, 230 0xe9, 0x9c, 0x08, 0x2f, 0xa4, 0x51, 0xe4, 0x2d, 0x77, 0xd5, 0x17, 0xf3, 0x8c, 0x49, 0x86, 0xae, 231 0xff, 0xc0, 0xe2, 0x1a, 0x87, 0x55, 0x7d, 0xb9, 0xeb, 0x8c, 0x62, 0x16, 0x33, 0x85, 0xf3, 0xca, 232 0x53, 0x45, 0x71, 0xae, 0xc5, 0x8c, 0xc5, 0x09, 0xf1, 0xd4, 0xaf, 0x59, 0x1e, 0x79, 0x41, 0x5a, 233 0xe8, 0xd2, 0x5e, 0xab, 0x7e, 0x64, 0xc1, 0x89, 0xf0, 0x16, 0x2c, 0x4f, 0xa5, 0xe6, 0x1d, 0xfc, 234 0x05, 0x2f, 0x24, 0x62, 0x9e, 0x51, 0x2e, 0x59, 0x56, 0x91, 0xc7, 0x1f, 0x4d, 0xd8, 0x38, 0xe2, 235 0x3c, 0x29, 0x7c, 0xf2, 0x3e, 0x27, 0x42, 0xa2, 0x3b, 0xd0, 0x2d, 0x27, 0xb0, 0x8d, 0x2d, 0x63, 236 0x32, 0x9c, 0xde, 0xc0, 0x8d, 0x11, 0x95, 0x04, 0x3e, 0xbe, 0x94, 0xf0, 0x15, 0x12, 0x79, 0xd0, 237 0x57, 0xed, 0x08, 0xdb, 0xdc, 0xb2, 0x26, 0xc3, 0xe9, 0xd5, 0x5f, 0x39, 0x4f, 0xcb, 0xba, 0xaf, 238 0x61, 0xe8, 0x05, 0xfc, 0xcf, 0x83, 0x22, 0x61, 0x41, 0x28, 0x6c, 0x4b, 0x51, 0xee, 0xe3, 0x35, 239 0x4e, 0xe2, 0x66, 0x7f, 0xf8, 0x99, 0x66, 0x3e, 0x4e, 0x65, 0x56, 0xf8, 0x97, 0x42, 0xce, 0x73, 240 0xd8, 0xfc, 0xa9, 0x84, 0xae, 0x80, 0xf5, 0x8e, 0x14, 0x6a, 0x8e, 0x81, 0x5f, 0x1e, 0xd1, 0x0e, 241 0xf4, 0x96, 0x41, 0x92, 0x13, 0xdb, 0x54, 0xb3, 0x8d, 0x70, 0x95, 0x05, 0xae, 0xb3, 0xc0, 0x47, 242 0x69, 0xe1, 0x57, 0x90, 0x7d, 0xf3, 0x81, 0x31, 0x7e, 0x02, 0x9b, 0xfa, 0x69, 0xc1, 0x59, 0x2a, 243 0x08, 0xda, 0x83, 0xff, 0x02, 0xce, 0x13, 0x4a, 0xc2, 0x56, 0xf6, 0xd4, 0xe0, 0xf1, 0x27, 0x13, 244 0x86, 0xc7, 0x34, 0x8a, 0x6a, 0x8f, 0x6f, 0x41, 0x37, 0x21, 0x91, 0xb4, 0x8d, 0xf5, 0x7e, 0x29, 245 0x10, 0xba, 0x0d, 0xbd, 0x8c, 0xc6, 0x67, 0xf2, 0x4f, 0xee, 0x56, 0x28, 0x74, 0x13, 0x60, 0x41, 246 0x42, 0x1a, 0xbc, 0x2d, 0x6b, 0xb6, 0xa5, 0xa6, 0x1f, 0xa8, 0x9b, 0xd3, 0x82, 0x93, 0xd2, 0x95, 247 0x8c, 0x44, 0x76, 0xb7, 0x72, 0x25, 0x23, 0x11, 0x3a, 0x81, 0x7e, 0x12, 0xcc, 0x48, 0x22, 0xec, 248 0x9e, 0x7a, 0xe0, 0xde, 0xda, 0x2c, 0x1a, 0x63, 0xe0, 0x13, 0x45, 0xab, 0x82, 0xd0, 0x1a, 0xce, 249 0x43, 0x18, 0x36, 0xae, 0x7f, 0x13, 0xc2, 0xa8, 0x19, 0xc2, 0xa0, 0x69, 0xf7, 0x21, 0x6c, 0x54, 250 0xea, 0xda, 0xed, 0x7a, 0x13, 0xad, 0xb6, 0x9b, 0x38, 0xfd, 0x6c, 0x40, 0xb7, 0x94, 0x40, 0x6f, 251 0xa0, 0xa7, 0x92, 0x43, 0xdb, 0xad, 0x17, 0xcb, 0xd9, 0x69, 0x03, 0xd5, 0xad, 0xbd, 0xd6, 0xef, 252 0x4c, 0xda, 0x7a, 0xe5, 0x6c, 0xb7, 0x40, 0x56, 0xe2, 0x8f, 0x4e, 0xcf, 0x2f, 0xdc, 0xce, 0xd7, 253 0x0b, 0xb7, 0xf3, 0x61, 0xe5, 0x1a, 0xe7, 0x2b, 0xd7, 0xf8, 0xb2, 0x72, 0x8d, 0x6f, 0x2b, 0xd7, 254 0x78, 0xb5, 0xff, 0x4f, 0xff, 0x58, 0x07, 0xe5, 0xf7, 0x65, 0x67, 0xd6, 0x57, 0x7b, 0x7e, 0xf7, 255 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x85, 0x25, 0xb8, 0xf8, 0x04, 0x00, 0x00, 256 } 257 258 // Reference imports to suppress errors if they are not otherwise used. 259 var _ context.Context 260 var _ grpc.ClientConn 261 262 // This is a compile-time assertion to ensure that this generated file 263 // is compatible with the grpc package it is being compiled against. 264 const _ = grpc.SupportPackageIsVersion4 265 266 // DiffClient is the client API for Diff service. 267 // 268 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 269 type DiffClient interface { 270 // Apply applies the content associated with the provided digests onto 271 // the provided mounts. Archive content will be extracted and 272 // decompressed if necessary. 273 Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) 274 // Diff creates a diff between the given mounts and uploads the result 275 // to the content store. 276 Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) 277 } 278 279 type diffClient struct { 280 cc *grpc.ClientConn 281 } 282 283 func NewDiffClient(cc *grpc.ClientConn) DiffClient { 284 return &diffClient{cc} 285 } 286 287 func (c *diffClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) { 288 out := new(ApplyResponse) 289 err := c.cc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Apply", in, out, opts...) 290 if err != nil { 291 return nil, err 292 } 293 return out, nil 294 } 295 296 func (c *diffClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) { 297 out := new(DiffResponse) 298 err := c.cc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Diff", in, out, opts...) 299 if err != nil { 300 return nil, err 301 } 302 return out, nil 303 } 304 305 // DiffServer is the server API for Diff service. 306 type DiffServer interface { 307 // Apply applies the content associated with the provided digests onto 308 // the provided mounts. Archive content will be extracted and 309 // decompressed if necessary. 310 Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) 311 // Diff creates a diff between the given mounts and uploads the result 312 // to the content store. 313 Diff(context.Context, *DiffRequest) (*DiffResponse, error) 314 } 315 316 func RegisterDiffServer(s *grpc.Server, srv DiffServer) { 317 s.RegisterService(&_Diff_serviceDesc, srv) 318 } 319 320 func _Diff_Apply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 321 in := new(ApplyRequest) 322 if err := dec(in); err != nil { 323 return nil, err 324 } 325 if interceptor == nil { 326 return srv.(DiffServer).Apply(ctx, in) 327 } 328 info := &grpc.UnaryServerInfo{ 329 Server: srv, 330 FullMethod: "/containerd.services.diff.v1.Diff/Apply", 331 } 332 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 333 return srv.(DiffServer).Apply(ctx, req.(*ApplyRequest)) 334 } 335 return interceptor(ctx, in, info, handler) 336 } 337 338 func _Diff_Diff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 339 in := new(DiffRequest) 340 if err := dec(in); err != nil { 341 return nil, err 342 } 343 if interceptor == nil { 344 return srv.(DiffServer).Diff(ctx, in) 345 } 346 info := &grpc.UnaryServerInfo{ 347 Server: srv, 348 FullMethod: "/containerd.services.diff.v1.Diff/Diff", 349 } 350 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 351 return srv.(DiffServer).Diff(ctx, req.(*DiffRequest)) 352 } 353 return interceptor(ctx, in, info, handler) 354 } 355 356 var _Diff_serviceDesc = grpc.ServiceDesc{ 357 ServiceName: "containerd.services.diff.v1.Diff", 358 HandlerType: (*DiffServer)(nil), 359 Methods: []grpc.MethodDesc{ 360 { 361 MethodName: "Apply", 362 Handler: _Diff_Apply_Handler, 363 }, 364 { 365 MethodName: "Diff", 366 Handler: _Diff_Diff_Handler, 367 }, 368 }, 369 Streams: []grpc.StreamDesc{}, 370 Metadata: "github.com/containerd/containerd/api/services/diff/v1/diff.proto", 371 } 372 373 func (m *ApplyRequest) Marshal() (dAtA []byte, err error) { 374 size := m.Size() 375 dAtA = make([]byte, size) 376 n, err := m.MarshalTo(dAtA) 377 if err != nil { 378 return nil, err 379 } 380 return dAtA[:n], nil 381 } 382 383 func (m *ApplyRequest) MarshalTo(dAtA []byte) (int, error) { 384 var i int 385 _ = i 386 var l int 387 _ = l 388 if m.Diff != nil { 389 dAtA[i] = 0xa 390 i++ 391 i = encodeVarintDiff(dAtA, i, uint64(m.Diff.Size())) 392 n1, err := m.Diff.MarshalTo(dAtA[i:]) 393 if err != nil { 394 return 0, err 395 } 396 i += n1 397 } 398 if len(m.Mounts) > 0 { 399 for _, msg := range m.Mounts { 400 dAtA[i] = 0x12 401 i++ 402 i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) 403 n, err := msg.MarshalTo(dAtA[i:]) 404 if err != nil { 405 return 0, err 406 } 407 i += n 408 } 409 } 410 if len(m.Payloads) > 0 { 411 for k, _ := range m.Payloads { 412 dAtA[i] = 0x1a 413 i++ 414 v := m.Payloads[k] 415 msgSize := 0 416 if v != nil { 417 msgSize = v.Size() 418 msgSize += 1 + sovDiff(uint64(msgSize)) 419 } 420 mapSize := 1 + len(k) + sovDiff(uint64(len(k))) + msgSize 421 i = encodeVarintDiff(dAtA, i, uint64(mapSize)) 422 dAtA[i] = 0xa 423 i++ 424 i = encodeVarintDiff(dAtA, i, uint64(len(k))) 425 i += copy(dAtA[i:], k) 426 if v != nil { 427 dAtA[i] = 0x12 428 i++ 429 i = encodeVarintDiff(dAtA, i, uint64(v.Size())) 430 n2, err := v.MarshalTo(dAtA[i:]) 431 if err != nil { 432 return 0, err 433 } 434 i += n2 435 } 436 } 437 } 438 if m.XXX_unrecognized != nil { 439 i += copy(dAtA[i:], m.XXX_unrecognized) 440 } 441 return i, nil 442 } 443 444 func (m *ApplyResponse) Marshal() (dAtA []byte, err error) { 445 size := m.Size() 446 dAtA = make([]byte, size) 447 n, err := m.MarshalTo(dAtA) 448 if err != nil { 449 return nil, err 450 } 451 return dAtA[:n], nil 452 } 453 454 func (m *ApplyResponse) MarshalTo(dAtA []byte) (int, error) { 455 var i int 456 _ = i 457 var l int 458 _ = l 459 if m.Applied != nil { 460 dAtA[i] = 0xa 461 i++ 462 i = encodeVarintDiff(dAtA, i, uint64(m.Applied.Size())) 463 n3, err := m.Applied.MarshalTo(dAtA[i:]) 464 if err != nil { 465 return 0, err 466 } 467 i += n3 468 } 469 if m.XXX_unrecognized != nil { 470 i += copy(dAtA[i:], m.XXX_unrecognized) 471 } 472 return i, nil 473 } 474 475 func (m *DiffRequest) Marshal() (dAtA []byte, err error) { 476 size := m.Size() 477 dAtA = make([]byte, size) 478 n, err := m.MarshalTo(dAtA) 479 if err != nil { 480 return nil, err 481 } 482 return dAtA[:n], nil 483 } 484 485 func (m *DiffRequest) MarshalTo(dAtA []byte) (int, error) { 486 var i int 487 _ = i 488 var l int 489 _ = l 490 if len(m.Left) > 0 { 491 for _, msg := range m.Left { 492 dAtA[i] = 0xa 493 i++ 494 i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) 495 n, err := msg.MarshalTo(dAtA[i:]) 496 if err != nil { 497 return 0, err 498 } 499 i += n 500 } 501 } 502 if len(m.Right) > 0 { 503 for _, msg := range m.Right { 504 dAtA[i] = 0x12 505 i++ 506 i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) 507 n, err := msg.MarshalTo(dAtA[i:]) 508 if err != nil { 509 return 0, err 510 } 511 i += n 512 } 513 } 514 if len(m.MediaType) > 0 { 515 dAtA[i] = 0x1a 516 i++ 517 i = encodeVarintDiff(dAtA, i, uint64(len(m.MediaType))) 518 i += copy(dAtA[i:], m.MediaType) 519 } 520 if len(m.Ref) > 0 { 521 dAtA[i] = 0x22 522 i++ 523 i = encodeVarintDiff(dAtA, i, uint64(len(m.Ref))) 524 i += copy(dAtA[i:], m.Ref) 525 } 526 if len(m.Labels) > 0 { 527 for k, _ := range m.Labels { 528 dAtA[i] = 0x2a 529 i++ 530 v := m.Labels[k] 531 mapSize := 1 + len(k) + sovDiff(uint64(len(k))) + 1 + len(v) + sovDiff(uint64(len(v))) 532 i = encodeVarintDiff(dAtA, i, uint64(mapSize)) 533 dAtA[i] = 0xa 534 i++ 535 i = encodeVarintDiff(dAtA, i, uint64(len(k))) 536 i += copy(dAtA[i:], k) 537 dAtA[i] = 0x12 538 i++ 539 i = encodeVarintDiff(dAtA, i, uint64(len(v))) 540 i += copy(dAtA[i:], v) 541 } 542 } 543 if m.XXX_unrecognized != nil { 544 i += copy(dAtA[i:], m.XXX_unrecognized) 545 } 546 return i, nil 547 } 548 549 func (m *DiffResponse) Marshal() (dAtA []byte, err error) { 550 size := m.Size() 551 dAtA = make([]byte, size) 552 n, err := m.MarshalTo(dAtA) 553 if err != nil { 554 return nil, err 555 } 556 return dAtA[:n], nil 557 } 558 559 func (m *DiffResponse) MarshalTo(dAtA []byte) (int, error) { 560 var i int 561 _ = i 562 var l int 563 _ = l 564 if m.Diff != nil { 565 dAtA[i] = 0x1a 566 i++ 567 i = encodeVarintDiff(dAtA, i, uint64(m.Diff.Size())) 568 n4, err := m.Diff.MarshalTo(dAtA[i:]) 569 if err != nil { 570 return 0, err 571 } 572 i += n4 573 } 574 if m.XXX_unrecognized != nil { 575 i += copy(dAtA[i:], m.XXX_unrecognized) 576 } 577 return i, nil 578 } 579 580 func encodeVarintDiff(dAtA []byte, offset int, v uint64) int { 581 for v >= 1<<7 { 582 dAtA[offset] = uint8(v&0x7f | 0x80) 583 v >>= 7 584 offset++ 585 } 586 dAtA[offset] = uint8(v) 587 return offset + 1 588 } 589 func (m *ApplyRequest) Size() (n int) { 590 if m == nil { 591 return 0 592 } 593 var l int 594 _ = l 595 if m.Diff != nil { 596 l = m.Diff.Size() 597 n += 1 + l + sovDiff(uint64(l)) 598 } 599 if len(m.Mounts) > 0 { 600 for _, e := range m.Mounts { 601 l = e.Size() 602 n += 1 + l + sovDiff(uint64(l)) 603 } 604 } 605 if len(m.Payloads) > 0 { 606 for k, v := range m.Payloads { 607 _ = k 608 _ = v 609 l = 0 610 if v != nil { 611 l = v.Size() 612 l += 1 + sovDiff(uint64(l)) 613 } 614 mapEntrySize := 1 + len(k) + sovDiff(uint64(len(k))) + l 615 n += mapEntrySize + 1 + sovDiff(uint64(mapEntrySize)) 616 } 617 } 618 if m.XXX_unrecognized != nil { 619 n += len(m.XXX_unrecognized) 620 } 621 return n 622 } 623 624 func (m *ApplyResponse) Size() (n int) { 625 if m == nil { 626 return 0 627 } 628 var l int 629 _ = l 630 if m.Applied != nil { 631 l = m.Applied.Size() 632 n += 1 + l + sovDiff(uint64(l)) 633 } 634 if m.XXX_unrecognized != nil { 635 n += len(m.XXX_unrecognized) 636 } 637 return n 638 } 639 640 func (m *DiffRequest) Size() (n int) { 641 if m == nil { 642 return 0 643 } 644 var l int 645 _ = l 646 if len(m.Left) > 0 { 647 for _, e := range m.Left { 648 l = e.Size() 649 n += 1 + l + sovDiff(uint64(l)) 650 } 651 } 652 if len(m.Right) > 0 { 653 for _, e := range m.Right { 654 l = e.Size() 655 n += 1 + l + sovDiff(uint64(l)) 656 } 657 } 658 l = len(m.MediaType) 659 if l > 0 { 660 n += 1 + l + sovDiff(uint64(l)) 661 } 662 l = len(m.Ref) 663 if l > 0 { 664 n += 1 + l + sovDiff(uint64(l)) 665 } 666 if len(m.Labels) > 0 { 667 for k, v := range m.Labels { 668 _ = k 669 _ = v 670 mapEntrySize := 1 + len(k) + sovDiff(uint64(len(k))) + 1 + len(v) + sovDiff(uint64(len(v))) 671 n += mapEntrySize + 1 + sovDiff(uint64(mapEntrySize)) 672 } 673 } 674 if m.XXX_unrecognized != nil { 675 n += len(m.XXX_unrecognized) 676 } 677 return n 678 } 679 680 func (m *DiffResponse) Size() (n int) { 681 if m == nil { 682 return 0 683 } 684 var l int 685 _ = l 686 if m.Diff != nil { 687 l = m.Diff.Size() 688 n += 1 + l + sovDiff(uint64(l)) 689 } 690 if m.XXX_unrecognized != nil { 691 n += len(m.XXX_unrecognized) 692 } 693 return n 694 } 695 696 func sovDiff(x uint64) (n int) { 697 for { 698 n++ 699 x >>= 7 700 if x == 0 { 701 break 702 } 703 } 704 return n 705 } 706 func sozDiff(x uint64) (n int) { 707 return sovDiff(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 708 } 709 func (this *ApplyRequest) String() string { 710 if this == nil { 711 return "nil" 712 } 713 keysForPayloads := make([]string, 0, len(this.Payloads)) 714 for k, _ := range this.Payloads { 715 keysForPayloads = append(keysForPayloads, k) 716 } 717 github_com_gogo_protobuf_sortkeys.Strings(keysForPayloads) 718 mapStringForPayloads := "map[string]*types1.Any{" 719 for _, k := range keysForPayloads { 720 mapStringForPayloads += fmt.Sprintf("%v: %v,", k, this.Payloads[k]) 721 } 722 mapStringForPayloads += "}" 723 s := strings.Join([]string{`&ApplyRequest{`, 724 `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "types.Descriptor", 1) + `,`, 725 `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`, 726 `Payloads:` + mapStringForPayloads + `,`, 727 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 728 `}`, 729 }, "") 730 return s 731 } 732 func (this *ApplyResponse) String() string { 733 if this == nil { 734 return "nil" 735 } 736 s := strings.Join([]string{`&ApplyResponse{`, 737 `Applied:` + strings.Replace(fmt.Sprintf("%v", this.Applied), "Descriptor", "types.Descriptor", 1) + `,`, 738 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 739 `}`, 740 }, "") 741 return s 742 } 743 func (this *DiffRequest) String() string { 744 if this == nil { 745 return "nil" 746 } 747 keysForLabels := make([]string, 0, len(this.Labels)) 748 for k, _ := range this.Labels { 749 keysForLabels = append(keysForLabels, k) 750 } 751 github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) 752 mapStringForLabels := "map[string]string{" 753 for _, k := range keysForLabels { 754 mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) 755 } 756 mapStringForLabels += "}" 757 s := strings.Join([]string{`&DiffRequest{`, 758 `Left:` + strings.Replace(fmt.Sprintf("%v", this.Left), "Mount", "types.Mount", 1) + `,`, 759 `Right:` + strings.Replace(fmt.Sprintf("%v", this.Right), "Mount", "types.Mount", 1) + `,`, 760 `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`, 761 `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, 762 `Labels:` + mapStringForLabels + `,`, 763 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 764 `}`, 765 }, "") 766 return s 767 } 768 func (this *DiffResponse) String() string { 769 if this == nil { 770 return "nil" 771 } 772 s := strings.Join([]string{`&DiffResponse{`, 773 `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "types.Descriptor", 1) + `,`, 774 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 775 `}`, 776 }, "") 777 return s 778 } 779 func valueToStringDiff(v interface{}) string { 780 rv := reflect.ValueOf(v) 781 if rv.IsNil() { 782 return "nil" 783 } 784 pv := reflect.Indirect(rv).Interface() 785 return fmt.Sprintf("*%v", pv) 786 } 787 func (m *ApplyRequest) Unmarshal(dAtA []byte) error { 788 l := len(dAtA) 789 iNdEx := 0 790 for iNdEx < l { 791 preIndex := iNdEx 792 var wire uint64 793 for shift := uint(0); ; shift += 7 { 794 if shift >= 64 { 795 return ErrIntOverflowDiff 796 } 797 if iNdEx >= l { 798 return io.ErrUnexpectedEOF 799 } 800 b := dAtA[iNdEx] 801 iNdEx++ 802 wire |= uint64(b&0x7F) << shift 803 if b < 0x80 { 804 break 805 } 806 } 807 fieldNum := int32(wire >> 3) 808 wireType := int(wire & 0x7) 809 if wireType == 4 { 810 return fmt.Errorf("proto: ApplyRequest: wiretype end group for non-group") 811 } 812 if fieldNum <= 0 { 813 return fmt.Errorf("proto: ApplyRequest: illegal tag %d (wire type %d)", fieldNum, wire) 814 } 815 switch fieldNum { 816 case 1: 817 if wireType != 2 { 818 return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType) 819 } 820 var msglen int 821 for shift := uint(0); ; shift += 7 { 822 if shift >= 64 { 823 return ErrIntOverflowDiff 824 } 825 if iNdEx >= l { 826 return io.ErrUnexpectedEOF 827 } 828 b := dAtA[iNdEx] 829 iNdEx++ 830 msglen |= int(b&0x7F) << shift 831 if b < 0x80 { 832 break 833 } 834 } 835 if msglen < 0 { 836 return ErrInvalidLengthDiff 837 } 838 postIndex := iNdEx + msglen 839 if postIndex < 0 { 840 return ErrInvalidLengthDiff 841 } 842 if postIndex > l { 843 return io.ErrUnexpectedEOF 844 } 845 if m.Diff == nil { 846 m.Diff = &types.Descriptor{} 847 } 848 if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 849 return err 850 } 851 iNdEx = postIndex 852 case 2: 853 if wireType != 2 { 854 return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) 855 } 856 var msglen int 857 for shift := uint(0); ; shift += 7 { 858 if shift >= 64 { 859 return ErrIntOverflowDiff 860 } 861 if iNdEx >= l { 862 return io.ErrUnexpectedEOF 863 } 864 b := dAtA[iNdEx] 865 iNdEx++ 866 msglen |= int(b&0x7F) << shift 867 if b < 0x80 { 868 break 869 } 870 } 871 if msglen < 0 { 872 return ErrInvalidLengthDiff 873 } 874 postIndex := iNdEx + msglen 875 if postIndex < 0 { 876 return ErrInvalidLengthDiff 877 } 878 if postIndex > l { 879 return io.ErrUnexpectedEOF 880 } 881 m.Mounts = append(m.Mounts, &types.Mount{}) 882 if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 883 return err 884 } 885 iNdEx = postIndex 886 case 3: 887 if wireType != 2 { 888 return fmt.Errorf("proto: wrong wireType = %d for field Payloads", wireType) 889 } 890 var msglen int 891 for shift := uint(0); ; shift += 7 { 892 if shift >= 64 { 893 return ErrIntOverflowDiff 894 } 895 if iNdEx >= l { 896 return io.ErrUnexpectedEOF 897 } 898 b := dAtA[iNdEx] 899 iNdEx++ 900 msglen |= int(b&0x7F) << shift 901 if b < 0x80 { 902 break 903 } 904 } 905 if msglen < 0 { 906 return ErrInvalidLengthDiff 907 } 908 postIndex := iNdEx + msglen 909 if postIndex < 0 { 910 return ErrInvalidLengthDiff 911 } 912 if postIndex > l { 913 return io.ErrUnexpectedEOF 914 } 915 if m.Payloads == nil { 916 m.Payloads = make(map[string]*types1.Any) 917 } 918 var mapkey string 919 var mapvalue *types1.Any 920 for iNdEx < postIndex { 921 entryPreIndex := iNdEx 922 var wire uint64 923 for shift := uint(0); ; shift += 7 { 924 if shift >= 64 { 925 return ErrIntOverflowDiff 926 } 927 if iNdEx >= l { 928 return io.ErrUnexpectedEOF 929 } 930 b := dAtA[iNdEx] 931 iNdEx++ 932 wire |= uint64(b&0x7F) << shift 933 if b < 0x80 { 934 break 935 } 936 } 937 fieldNum := int32(wire >> 3) 938 if fieldNum == 1 { 939 var stringLenmapkey uint64 940 for shift := uint(0); ; shift += 7 { 941 if shift >= 64 { 942 return ErrIntOverflowDiff 943 } 944 if iNdEx >= l { 945 return io.ErrUnexpectedEOF 946 } 947 b := dAtA[iNdEx] 948 iNdEx++ 949 stringLenmapkey |= uint64(b&0x7F) << shift 950 if b < 0x80 { 951 break 952 } 953 } 954 intStringLenmapkey := int(stringLenmapkey) 955 if intStringLenmapkey < 0 { 956 return ErrInvalidLengthDiff 957 } 958 postStringIndexmapkey := iNdEx + intStringLenmapkey 959 if postStringIndexmapkey < 0 { 960 return ErrInvalidLengthDiff 961 } 962 if postStringIndexmapkey > l { 963 return io.ErrUnexpectedEOF 964 } 965 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 966 iNdEx = postStringIndexmapkey 967 } else if fieldNum == 2 { 968 var mapmsglen int 969 for shift := uint(0); ; shift += 7 { 970 if shift >= 64 { 971 return ErrIntOverflowDiff 972 } 973 if iNdEx >= l { 974 return io.ErrUnexpectedEOF 975 } 976 b := dAtA[iNdEx] 977 iNdEx++ 978 mapmsglen |= int(b&0x7F) << shift 979 if b < 0x80 { 980 break 981 } 982 } 983 if mapmsglen < 0 { 984 return ErrInvalidLengthDiff 985 } 986 postmsgIndex := iNdEx + mapmsglen 987 if postmsgIndex < 0 { 988 return ErrInvalidLengthDiff 989 } 990 if postmsgIndex > l { 991 return io.ErrUnexpectedEOF 992 } 993 mapvalue = &types1.Any{} 994 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 995 return err 996 } 997 iNdEx = postmsgIndex 998 } else { 999 iNdEx = entryPreIndex 1000 skippy, err := skipDiff(dAtA[iNdEx:]) 1001 if err != nil { 1002 return err 1003 } 1004 if skippy < 0 { 1005 return ErrInvalidLengthDiff 1006 } 1007 if (iNdEx + skippy) > postIndex { 1008 return io.ErrUnexpectedEOF 1009 } 1010 iNdEx += skippy 1011 } 1012 } 1013 m.Payloads[mapkey] = mapvalue 1014 iNdEx = postIndex 1015 default: 1016 iNdEx = preIndex 1017 skippy, err := skipDiff(dAtA[iNdEx:]) 1018 if err != nil { 1019 return err 1020 } 1021 if skippy < 0 { 1022 return ErrInvalidLengthDiff 1023 } 1024 if (iNdEx + skippy) < 0 { 1025 return ErrInvalidLengthDiff 1026 } 1027 if (iNdEx + skippy) > l { 1028 return io.ErrUnexpectedEOF 1029 } 1030 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1031 iNdEx += skippy 1032 } 1033 } 1034 1035 if iNdEx > l { 1036 return io.ErrUnexpectedEOF 1037 } 1038 return nil 1039 } 1040 func (m *ApplyResponse) Unmarshal(dAtA []byte) error { 1041 l := len(dAtA) 1042 iNdEx := 0 1043 for iNdEx < l { 1044 preIndex := iNdEx 1045 var wire uint64 1046 for shift := uint(0); ; shift += 7 { 1047 if shift >= 64 { 1048 return ErrIntOverflowDiff 1049 } 1050 if iNdEx >= l { 1051 return io.ErrUnexpectedEOF 1052 } 1053 b := dAtA[iNdEx] 1054 iNdEx++ 1055 wire |= uint64(b&0x7F) << shift 1056 if b < 0x80 { 1057 break 1058 } 1059 } 1060 fieldNum := int32(wire >> 3) 1061 wireType := int(wire & 0x7) 1062 if wireType == 4 { 1063 return fmt.Errorf("proto: ApplyResponse: wiretype end group for non-group") 1064 } 1065 if fieldNum <= 0 { 1066 return fmt.Errorf("proto: ApplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1067 } 1068 switch fieldNum { 1069 case 1: 1070 if wireType != 2 { 1071 return fmt.Errorf("proto: wrong wireType = %d for field Applied", wireType) 1072 } 1073 var msglen int 1074 for shift := uint(0); ; shift += 7 { 1075 if shift >= 64 { 1076 return ErrIntOverflowDiff 1077 } 1078 if iNdEx >= l { 1079 return io.ErrUnexpectedEOF 1080 } 1081 b := dAtA[iNdEx] 1082 iNdEx++ 1083 msglen |= int(b&0x7F) << shift 1084 if b < 0x80 { 1085 break 1086 } 1087 } 1088 if msglen < 0 { 1089 return ErrInvalidLengthDiff 1090 } 1091 postIndex := iNdEx + msglen 1092 if postIndex < 0 { 1093 return ErrInvalidLengthDiff 1094 } 1095 if postIndex > l { 1096 return io.ErrUnexpectedEOF 1097 } 1098 if m.Applied == nil { 1099 m.Applied = &types.Descriptor{} 1100 } 1101 if err := m.Applied.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1102 return err 1103 } 1104 iNdEx = postIndex 1105 default: 1106 iNdEx = preIndex 1107 skippy, err := skipDiff(dAtA[iNdEx:]) 1108 if err != nil { 1109 return err 1110 } 1111 if skippy < 0 { 1112 return ErrInvalidLengthDiff 1113 } 1114 if (iNdEx + skippy) < 0 { 1115 return ErrInvalidLengthDiff 1116 } 1117 if (iNdEx + skippy) > l { 1118 return io.ErrUnexpectedEOF 1119 } 1120 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1121 iNdEx += skippy 1122 } 1123 } 1124 1125 if iNdEx > l { 1126 return io.ErrUnexpectedEOF 1127 } 1128 return nil 1129 } 1130 func (m *DiffRequest) Unmarshal(dAtA []byte) error { 1131 l := len(dAtA) 1132 iNdEx := 0 1133 for iNdEx < l { 1134 preIndex := iNdEx 1135 var wire uint64 1136 for shift := uint(0); ; shift += 7 { 1137 if shift >= 64 { 1138 return ErrIntOverflowDiff 1139 } 1140 if iNdEx >= l { 1141 return io.ErrUnexpectedEOF 1142 } 1143 b := dAtA[iNdEx] 1144 iNdEx++ 1145 wire |= uint64(b&0x7F) << shift 1146 if b < 0x80 { 1147 break 1148 } 1149 } 1150 fieldNum := int32(wire >> 3) 1151 wireType := int(wire & 0x7) 1152 if wireType == 4 { 1153 return fmt.Errorf("proto: DiffRequest: wiretype end group for non-group") 1154 } 1155 if fieldNum <= 0 { 1156 return fmt.Errorf("proto: DiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1157 } 1158 switch fieldNum { 1159 case 1: 1160 if wireType != 2 { 1161 return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) 1162 } 1163 var msglen int 1164 for shift := uint(0); ; shift += 7 { 1165 if shift >= 64 { 1166 return ErrIntOverflowDiff 1167 } 1168 if iNdEx >= l { 1169 return io.ErrUnexpectedEOF 1170 } 1171 b := dAtA[iNdEx] 1172 iNdEx++ 1173 msglen |= int(b&0x7F) << shift 1174 if b < 0x80 { 1175 break 1176 } 1177 } 1178 if msglen < 0 { 1179 return ErrInvalidLengthDiff 1180 } 1181 postIndex := iNdEx + msglen 1182 if postIndex < 0 { 1183 return ErrInvalidLengthDiff 1184 } 1185 if postIndex > l { 1186 return io.ErrUnexpectedEOF 1187 } 1188 m.Left = append(m.Left, &types.Mount{}) 1189 if err := m.Left[len(m.Left)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1190 return err 1191 } 1192 iNdEx = postIndex 1193 case 2: 1194 if wireType != 2 { 1195 return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) 1196 } 1197 var msglen int 1198 for shift := uint(0); ; shift += 7 { 1199 if shift >= 64 { 1200 return ErrIntOverflowDiff 1201 } 1202 if iNdEx >= l { 1203 return io.ErrUnexpectedEOF 1204 } 1205 b := dAtA[iNdEx] 1206 iNdEx++ 1207 msglen |= int(b&0x7F) << shift 1208 if b < 0x80 { 1209 break 1210 } 1211 } 1212 if msglen < 0 { 1213 return ErrInvalidLengthDiff 1214 } 1215 postIndex := iNdEx + msglen 1216 if postIndex < 0 { 1217 return ErrInvalidLengthDiff 1218 } 1219 if postIndex > l { 1220 return io.ErrUnexpectedEOF 1221 } 1222 m.Right = append(m.Right, &types.Mount{}) 1223 if err := m.Right[len(m.Right)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1224 return err 1225 } 1226 iNdEx = postIndex 1227 case 3: 1228 if wireType != 2 { 1229 return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) 1230 } 1231 var stringLen uint64 1232 for shift := uint(0); ; shift += 7 { 1233 if shift >= 64 { 1234 return ErrIntOverflowDiff 1235 } 1236 if iNdEx >= l { 1237 return io.ErrUnexpectedEOF 1238 } 1239 b := dAtA[iNdEx] 1240 iNdEx++ 1241 stringLen |= uint64(b&0x7F) << shift 1242 if b < 0x80 { 1243 break 1244 } 1245 } 1246 intStringLen := int(stringLen) 1247 if intStringLen < 0 { 1248 return ErrInvalidLengthDiff 1249 } 1250 postIndex := iNdEx + intStringLen 1251 if postIndex < 0 { 1252 return ErrInvalidLengthDiff 1253 } 1254 if postIndex > l { 1255 return io.ErrUnexpectedEOF 1256 } 1257 m.MediaType = string(dAtA[iNdEx:postIndex]) 1258 iNdEx = postIndex 1259 case 4: 1260 if wireType != 2 { 1261 return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) 1262 } 1263 var stringLen uint64 1264 for shift := uint(0); ; shift += 7 { 1265 if shift >= 64 { 1266 return ErrIntOverflowDiff 1267 } 1268 if iNdEx >= l { 1269 return io.ErrUnexpectedEOF 1270 } 1271 b := dAtA[iNdEx] 1272 iNdEx++ 1273 stringLen |= uint64(b&0x7F) << shift 1274 if b < 0x80 { 1275 break 1276 } 1277 } 1278 intStringLen := int(stringLen) 1279 if intStringLen < 0 { 1280 return ErrInvalidLengthDiff 1281 } 1282 postIndex := iNdEx + intStringLen 1283 if postIndex < 0 { 1284 return ErrInvalidLengthDiff 1285 } 1286 if postIndex > l { 1287 return io.ErrUnexpectedEOF 1288 } 1289 m.Ref = string(dAtA[iNdEx:postIndex]) 1290 iNdEx = postIndex 1291 case 5: 1292 if wireType != 2 { 1293 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 1294 } 1295 var msglen int 1296 for shift := uint(0); ; shift += 7 { 1297 if shift >= 64 { 1298 return ErrIntOverflowDiff 1299 } 1300 if iNdEx >= l { 1301 return io.ErrUnexpectedEOF 1302 } 1303 b := dAtA[iNdEx] 1304 iNdEx++ 1305 msglen |= int(b&0x7F) << shift 1306 if b < 0x80 { 1307 break 1308 } 1309 } 1310 if msglen < 0 { 1311 return ErrInvalidLengthDiff 1312 } 1313 postIndex := iNdEx + msglen 1314 if postIndex < 0 { 1315 return ErrInvalidLengthDiff 1316 } 1317 if postIndex > l { 1318 return io.ErrUnexpectedEOF 1319 } 1320 if m.Labels == nil { 1321 m.Labels = make(map[string]string) 1322 } 1323 var mapkey string 1324 var mapvalue string 1325 for iNdEx < postIndex { 1326 entryPreIndex := iNdEx 1327 var wire uint64 1328 for shift := uint(0); ; shift += 7 { 1329 if shift >= 64 { 1330 return ErrIntOverflowDiff 1331 } 1332 if iNdEx >= l { 1333 return io.ErrUnexpectedEOF 1334 } 1335 b := dAtA[iNdEx] 1336 iNdEx++ 1337 wire |= uint64(b&0x7F) << shift 1338 if b < 0x80 { 1339 break 1340 } 1341 } 1342 fieldNum := int32(wire >> 3) 1343 if fieldNum == 1 { 1344 var stringLenmapkey uint64 1345 for shift := uint(0); ; shift += 7 { 1346 if shift >= 64 { 1347 return ErrIntOverflowDiff 1348 } 1349 if iNdEx >= l { 1350 return io.ErrUnexpectedEOF 1351 } 1352 b := dAtA[iNdEx] 1353 iNdEx++ 1354 stringLenmapkey |= uint64(b&0x7F) << shift 1355 if b < 0x80 { 1356 break 1357 } 1358 } 1359 intStringLenmapkey := int(stringLenmapkey) 1360 if intStringLenmapkey < 0 { 1361 return ErrInvalidLengthDiff 1362 } 1363 postStringIndexmapkey := iNdEx + intStringLenmapkey 1364 if postStringIndexmapkey < 0 { 1365 return ErrInvalidLengthDiff 1366 } 1367 if postStringIndexmapkey > l { 1368 return io.ErrUnexpectedEOF 1369 } 1370 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1371 iNdEx = postStringIndexmapkey 1372 } else if fieldNum == 2 { 1373 var stringLenmapvalue uint64 1374 for shift := uint(0); ; shift += 7 { 1375 if shift >= 64 { 1376 return ErrIntOverflowDiff 1377 } 1378 if iNdEx >= l { 1379 return io.ErrUnexpectedEOF 1380 } 1381 b := dAtA[iNdEx] 1382 iNdEx++ 1383 stringLenmapvalue |= uint64(b&0x7F) << shift 1384 if b < 0x80 { 1385 break 1386 } 1387 } 1388 intStringLenmapvalue := int(stringLenmapvalue) 1389 if intStringLenmapvalue < 0 { 1390 return ErrInvalidLengthDiff 1391 } 1392 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 1393 if postStringIndexmapvalue < 0 { 1394 return ErrInvalidLengthDiff 1395 } 1396 if postStringIndexmapvalue > l { 1397 return io.ErrUnexpectedEOF 1398 } 1399 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 1400 iNdEx = postStringIndexmapvalue 1401 } else { 1402 iNdEx = entryPreIndex 1403 skippy, err := skipDiff(dAtA[iNdEx:]) 1404 if err != nil { 1405 return err 1406 } 1407 if skippy < 0 { 1408 return ErrInvalidLengthDiff 1409 } 1410 if (iNdEx + skippy) > postIndex { 1411 return io.ErrUnexpectedEOF 1412 } 1413 iNdEx += skippy 1414 } 1415 } 1416 m.Labels[mapkey] = mapvalue 1417 iNdEx = postIndex 1418 default: 1419 iNdEx = preIndex 1420 skippy, err := skipDiff(dAtA[iNdEx:]) 1421 if err != nil { 1422 return err 1423 } 1424 if skippy < 0 { 1425 return ErrInvalidLengthDiff 1426 } 1427 if (iNdEx + skippy) < 0 { 1428 return ErrInvalidLengthDiff 1429 } 1430 if (iNdEx + skippy) > l { 1431 return io.ErrUnexpectedEOF 1432 } 1433 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1434 iNdEx += skippy 1435 } 1436 } 1437 1438 if iNdEx > l { 1439 return io.ErrUnexpectedEOF 1440 } 1441 return nil 1442 } 1443 func (m *DiffResponse) Unmarshal(dAtA []byte) error { 1444 l := len(dAtA) 1445 iNdEx := 0 1446 for iNdEx < l { 1447 preIndex := iNdEx 1448 var wire uint64 1449 for shift := uint(0); ; shift += 7 { 1450 if shift >= 64 { 1451 return ErrIntOverflowDiff 1452 } 1453 if iNdEx >= l { 1454 return io.ErrUnexpectedEOF 1455 } 1456 b := dAtA[iNdEx] 1457 iNdEx++ 1458 wire |= uint64(b&0x7F) << shift 1459 if b < 0x80 { 1460 break 1461 } 1462 } 1463 fieldNum := int32(wire >> 3) 1464 wireType := int(wire & 0x7) 1465 if wireType == 4 { 1466 return fmt.Errorf("proto: DiffResponse: wiretype end group for non-group") 1467 } 1468 if fieldNum <= 0 { 1469 return fmt.Errorf("proto: DiffResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1470 } 1471 switch fieldNum { 1472 case 3: 1473 if wireType != 2 { 1474 return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType) 1475 } 1476 var msglen int 1477 for shift := uint(0); ; shift += 7 { 1478 if shift >= 64 { 1479 return ErrIntOverflowDiff 1480 } 1481 if iNdEx >= l { 1482 return io.ErrUnexpectedEOF 1483 } 1484 b := dAtA[iNdEx] 1485 iNdEx++ 1486 msglen |= int(b&0x7F) << shift 1487 if b < 0x80 { 1488 break 1489 } 1490 } 1491 if msglen < 0 { 1492 return ErrInvalidLengthDiff 1493 } 1494 postIndex := iNdEx + msglen 1495 if postIndex < 0 { 1496 return ErrInvalidLengthDiff 1497 } 1498 if postIndex > l { 1499 return io.ErrUnexpectedEOF 1500 } 1501 if m.Diff == nil { 1502 m.Diff = &types.Descriptor{} 1503 } 1504 if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1505 return err 1506 } 1507 iNdEx = postIndex 1508 default: 1509 iNdEx = preIndex 1510 skippy, err := skipDiff(dAtA[iNdEx:]) 1511 if err != nil { 1512 return err 1513 } 1514 if skippy < 0 { 1515 return ErrInvalidLengthDiff 1516 } 1517 if (iNdEx + skippy) < 0 { 1518 return ErrInvalidLengthDiff 1519 } 1520 if (iNdEx + skippy) > l { 1521 return io.ErrUnexpectedEOF 1522 } 1523 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1524 iNdEx += skippy 1525 } 1526 } 1527 1528 if iNdEx > l { 1529 return io.ErrUnexpectedEOF 1530 } 1531 return nil 1532 } 1533 func skipDiff(dAtA []byte) (n int, err error) { 1534 l := len(dAtA) 1535 iNdEx := 0 1536 for iNdEx < l { 1537 var wire uint64 1538 for shift := uint(0); ; shift += 7 { 1539 if shift >= 64 { 1540 return 0, ErrIntOverflowDiff 1541 } 1542 if iNdEx >= l { 1543 return 0, io.ErrUnexpectedEOF 1544 } 1545 b := dAtA[iNdEx] 1546 iNdEx++ 1547 wire |= (uint64(b) & 0x7F) << shift 1548 if b < 0x80 { 1549 break 1550 } 1551 } 1552 wireType := int(wire & 0x7) 1553 switch wireType { 1554 case 0: 1555 for shift := uint(0); ; shift += 7 { 1556 if shift >= 64 { 1557 return 0, ErrIntOverflowDiff 1558 } 1559 if iNdEx >= l { 1560 return 0, io.ErrUnexpectedEOF 1561 } 1562 iNdEx++ 1563 if dAtA[iNdEx-1] < 0x80 { 1564 break 1565 } 1566 } 1567 return iNdEx, nil 1568 case 1: 1569 iNdEx += 8 1570 return iNdEx, nil 1571 case 2: 1572 var length int 1573 for shift := uint(0); ; shift += 7 { 1574 if shift >= 64 { 1575 return 0, ErrIntOverflowDiff 1576 } 1577 if iNdEx >= l { 1578 return 0, io.ErrUnexpectedEOF 1579 } 1580 b := dAtA[iNdEx] 1581 iNdEx++ 1582 length |= (int(b) & 0x7F) << shift 1583 if b < 0x80 { 1584 break 1585 } 1586 } 1587 if length < 0 { 1588 return 0, ErrInvalidLengthDiff 1589 } 1590 iNdEx += length 1591 if iNdEx < 0 { 1592 return 0, ErrInvalidLengthDiff 1593 } 1594 return iNdEx, nil 1595 case 3: 1596 for { 1597 var innerWire uint64 1598 var start int = iNdEx 1599 for shift := uint(0); ; shift += 7 { 1600 if shift >= 64 { 1601 return 0, ErrIntOverflowDiff 1602 } 1603 if iNdEx >= l { 1604 return 0, io.ErrUnexpectedEOF 1605 } 1606 b := dAtA[iNdEx] 1607 iNdEx++ 1608 innerWire |= (uint64(b) & 0x7F) << shift 1609 if b < 0x80 { 1610 break 1611 } 1612 } 1613 innerWireType := int(innerWire & 0x7) 1614 if innerWireType == 4 { 1615 break 1616 } 1617 next, err := skipDiff(dAtA[start:]) 1618 if err != nil { 1619 return 0, err 1620 } 1621 iNdEx = start + next 1622 if iNdEx < 0 { 1623 return 0, ErrInvalidLengthDiff 1624 } 1625 } 1626 return iNdEx, nil 1627 case 4: 1628 return iNdEx, nil 1629 case 5: 1630 iNdEx += 4 1631 return iNdEx, nil 1632 default: 1633 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1634 } 1635 } 1636 panic("unreachable") 1637 } 1638 1639 var ( 1640 ErrInvalidLengthDiff = fmt.Errorf("proto: negative length found during unmarshaling") 1641 ErrIntOverflowDiff = fmt.Errorf("proto: integer overflow") 1642 )