1 // Code generated by protoc-gen-gogo.
2 // source: resource.proto
7 import proto "github.com/gogo/protobuf/proto"
10 import _ "github.com/gogo/protobuf/gogoproto"
11 import _ "github.com/docker/swarmkit/protobuf/plugin"
13 import github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
16 context "golang.org/x/net/context"
17 grpc "google.golang.org/grpc"
20 import raftselector "github.com/docker/swarmkit/manager/raftselector"
21 import codes "google.golang.org/grpc/codes"
22 import metadata "google.golang.org/grpc/metadata"
23 import transport "google.golang.org/grpc/transport"
24 import rafttime "time"
26 import strings "strings"
27 import reflect "reflect"
31 // Reference imports to suppress errors if they are not otherwise used.
36 type AttachNetworkRequest struct {
37 Config *NetworkAttachmentConfig `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
38 ContainerID string `protobuf:"bytes,2,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
41 func (m *AttachNetworkRequest) Reset() { *m = AttachNetworkRequest{} }
42 func (*AttachNetworkRequest) ProtoMessage() {}
43 func (*AttachNetworkRequest) Descriptor() ([]byte, []int) { return fileDescriptorResource, []int{0} }
45 type AttachNetworkResponse struct {
46 AttachmentID string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
49 func (m *AttachNetworkResponse) Reset() { *m = AttachNetworkResponse{} }
50 func (*AttachNetworkResponse) ProtoMessage() {}
51 func (*AttachNetworkResponse) Descriptor() ([]byte, []int) { return fileDescriptorResource, []int{1} }
53 type DetachNetworkRequest struct {
54 AttachmentID string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
57 func (m *DetachNetworkRequest) Reset() { *m = DetachNetworkRequest{} }
58 func (*DetachNetworkRequest) ProtoMessage() {}
59 func (*DetachNetworkRequest) Descriptor() ([]byte, []int) { return fileDescriptorResource, []int{2} }
61 type DetachNetworkResponse struct {
64 func (m *DetachNetworkResponse) Reset() { *m = DetachNetworkResponse{} }
65 func (*DetachNetworkResponse) ProtoMessage() {}
66 func (*DetachNetworkResponse) Descriptor() ([]byte, []int) { return fileDescriptorResource, []int{3} }
69 proto.RegisterType((*AttachNetworkRequest)(nil), "docker.swarmkit.v1.AttachNetworkRequest")
70 proto.RegisterType((*AttachNetworkResponse)(nil), "docker.swarmkit.v1.AttachNetworkResponse")
71 proto.RegisterType((*DetachNetworkRequest)(nil), "docker.swarmkit.v1.DetachNetworkRequest")
72 proto.RegisterType((*DetachNetworkResponse)(nil), "docker.swarmkit.v1.DetachNetworkResponse")
75 type authenticatedWrapperResourceAllocatorServer struct {
76 local ResourceAllocatorServer
77 authorize func(context.Context, []string) error
80 func NewAuthenticatedWrapperResourceAllocatorServer(local ResourceAllocatorServer, authorize func(context.Context, []string) error) ResourceAllocatorServer {
81 return &authenticatedWrapperResourceAllocatorServer{
87 func (p *authenticatedWrapperResourceAllocatorServer) AttachNetwork(ctx context.Context, r *AttachNetworkRequest) (*AttachNetworkResponse, error) {
89 if err := p.authorize(ctx, []string{"swarm-worker", "swarm-manager"}); err != nil {
92 return p.local.AttachNetwork(ctx, r)
95 func (p *authenticatedWrapperResourceAllocatorServer) DetachNetwork(ctx context.Context, r *DetachNetworkRequest) (*DetachNetworkResponse, error) {
97 if err := p.authorize(ctx, []string{"swarm-worker", "swarm-manager"}); err != nil {
100 return p.local.DetachNetwork(ctx, r)
103 func (m *AttachNetworkRequest) Copy() *AttachNetworkRequest {
107 o := &AttachNetworkRequest{}
112 func (m *AttachNetworkRequest) CopyFrom(src interface{}) {
114 o := src.(*AttachNetworkRequest)
117 m.Config = &NetworkAttachmentConfig{}
118 github_com_docker_swarmkit_api_deepcopy.Copy(m.Config, o.Config)
122 func (m *AttachNetworkResponse) Copy() *AttachNetworkResponse {
126 o := &AttachNetworkResponse{}
131 func (m *AttachNetworkResponse) CopyFrom(src interface{}) {
133 o := src.(*AttachNetworkResponse)
137 func (m *DetachNetworkRequest) Copy() *DetachNetworkRequest {
141 o := &DetachNetworkRequest{}
146 func (m *DetachNetworkRequest) CopyFrom(src interface{}) {
148 o := src.(*DetachNetworkRequest)
152 func (m *DetachNetworkResponse) Copy() *DetachNetworkResponse {
156 o := &DetachNetworkResponse{}
161 func (m *DetachNetworkResponse) CopyFrom(src interface{}) {}
163 // Reference imports to suppress errors if they are not otherwise used.
164 var _ context.Context
165 var _ grpc.ClientConn
167 // This is a compile-time assertion to ensure that this generated file
168 // is compatible with the grpc package it is being compiled against.
169 const _ = grpc.SupportPackageIsVersion4
171 // Client API for ResourceAllocator service
173 type ResourceAllocatorClient interface {
174 AttachNetwork(ctx context.Context, in *AttachNetworkRequest, opts ...grpc.CallOption) (*AttachNetworkResponse, error)
175 DetachNetwork(ctx context.Context, in *DetachNetworkRequest, opts ...grpc.CallOption) (*DetachNetworkResponse, error)
178 type resourceAllocatorClient struct {
182 func NewResourceAllocatorClient(cc *grpc.ClientConn) ResourceAllocatorClient {
183 return &resourceAllocatorClient{cc}
186 func (c *resourceAllocatorClient) AttachNetwork(ctx context.Context, in *AttachNetworkRequest, opts ...grpc.CallOption) (*AttachNetworkResponse, error) {
187 out := new(AttachNetworkResponse)
188 err := grpc.Invoke(ctx, "/docker.swarmkit.v1.ResourceAllocator/AttachNetwork", in, out, c.cc, opts...)
195 func (c *resourceAllocatorClient) DetachNetwork(ctx context.Context, in *DetachNetworkRequest, opts ...grpc.CallOption) (*DetachNetworkResponse, error) {
196 out := new(DetachNetworkResponse)
197 err := grpc.Invoke(ctx, "/docker.swarmkit.v1.ResourceAllocator/DetachNetwork", in, out, c.cc, opts...)
204 // Server API for ResourceAllocator service
206 type ResourceAllocatorServer interface {
207 AttachNetwork(context.Context, *AttachNetworkRequest) (*AttachNetworkResponse, error)
208 DetachNetwork(context.Context, *DetachNetworkRequest) (*DetachNetworkResponse, error)
211 func RegisterResourceAllocatorServer(s *grpc.Server, srv ResourceAllocatorServer) {
212 s.RegisterService(&_ResourceAllocator_serviceDesc, srv)
215 func _ResourceAllocator_AttachNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
216 in := new(AttachNetworkRequest)
217 if err := dec(in); err != nil {
220 if interceptor == nil {
221 return srv.(ResourceAllocatorServer).AttachNetwork(ctx, in)
223 info := &grpc.UnaryServerInfo{
225 FullMethod: "/docker.swarmkit.v1.ResourceAllocator/AttachNetwork",
227 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
228 return srv.(ResourceAllocatorServer).AttachNetwork(ctx, req.(*AttachNetworkRequest))
230 return interceptor(ctx, in, info, handler)
233 func _ResourceAllocator_DetachNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
234 in := new(DetachNetworkRequest)
235 if err := dec(in); err != nil {
238 if interceptor == nil {
239 return srv.(ResourceAllocatorServer).DetachNetwork(ctx, in)
241 info := &grpc.UnaryServerInfo{
243 FullMethod: "/docker.swarmkit.v1.ResourceAllocator/DetachNetwork",
245 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
246 return srv.(ResourceAllocatorServer).DetachNetwork(ctx, req.(*DetachNetworkRequest))
248 return interceptor(ctx, in, info, handler)
251 var _ResourceAllocator_serviceDesc = grpc.ServiceDesc{
252 ServiceName: "docker.swarmkit.v1.ResourceAllocator",
253 HandlerType: (*ResourceAllocatorServer)(nil),
254 Methods: []grpc.MethodDesc{
256 MethodName: "AttachNetwork",
257 Handler: _ResourceAllocator_AttachNetwork_Handler,
260 MethodName: "DetachNetwork",
261 Handler: _ResourceAllocator_DetachNetwork_Handler,
264 Streams: []grpc.StreamDesc{},
265 Metadata: "resource.proto",
268 func (m *AttachNetworkRequest) Marshal() (dAtA []byte, err error) {
270 dAtA = make([]byte, size)
271 n, err := m.MarshalTo(dAtA)
278 func (m *AttachNetworkRequest) MarshalTo(dAtA []byte) (int, error) {
286 i = encodeVarintResource(dAtA, i, uint64(m.Config.Size()))
287 n1, err := m.Config.MarshalTo(dAtA[i:])
293 if len(m.ContainerID) > 0 {
296 i = encodeVarintResource(dAtA, i, uint64(len(m.ContainerID)))
297 i += copy(dAtA[i:], m.ContainerID)
302 func (m *AttachNetworkResponse) Marshal() (dAtA []byte, err error) {
304 dAtA = make([]byte, size)
305 n, err := m.MarshalTo(dAtA)
312 func (m *AttachNetworkResponse) MarshalTo(dAtA []byte) (int, error) {
317 if len(m.AttachmentID) > 0 {
320 i = encodeVarintResource(dAtA, i, uint64(len(m.AttachmentID)))
321 i += copy(dAtA[i:], m.AttachmentID)
326 func (m *DetachNetworkRequest) Marshal() (dAtA []byte, err error) {
328 dAtA = make([]byte, size)
329 n, err := m.MarshalTo(dAtA)
336 func (m *DetachNetworkRequest) MarshalTo(dAtA []byte) (int, error) {
341 if len(m.AttachmentID) > 0 {
344 i = encodeVarintResource(dAtA, i, uint64(len(m.AttachmentID)))
345 i += copy(dAtA[i:], m.AttachmentID)
350 func (m *DetachNetworkResponse) Marshal() (dAtA []byte, err error) {
352 dAtA = make([]byte, size)
353 n, err := m.MarshalTo(dAtA)
360 func (m *DetachNetworkResponse) MarshalTo(dAtA []byte) (int, error) {
368 func encodeFixed64Resource(dAtA []byte, offset int, v uint64) int {
369 dAtA[offset] = uint8(v)
370 dAtA[offset+1] = uint8(v >> 8)
371 dAtA[offset+2] = uint8(v >> 16)
372 dAtA[offset+3] = uint8(v >> 24)
373 dAtA[offset+4] = uint8(v >> 32)
374 dAtA[offset+5] = uint8(v >> 40)
375 dAtA[offset+6] = uint8(v >> 48)
376 dAtA[offset+7] = uint8(v >> 56)
379 func encodeFixed32Resource(dAtA []byte, offset int, v uint32) int {
380 dAtA[offset] = uint8(v)
381 dAtA[offset+1] = uint8(v >> 8)
382 dAtA[offset+2] = uint8(v >> 16)
383 dAtA[offset+3] = uint8(v >> 24)
386 func encodeVarintResource(dAtA []byte, offset int, v uint64) int {
388 dAtA[offset] = uint8(v&0x7f | 0x80)
392 dAtA[offset] = uint8(v)
396 type raftProxyResourceAllocatorServer struct {
397 local ResourceAllocatorServer
398 connSelector raftselector.ConnProvider
399 localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error)
402 func NewRaftProxyResourceAllocatorServer(local ResourceAllocatorServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) ResourceAllocatorServer {
403 redirectChecker := func(ctx context.Context) (context.Context, error) {
404 s, ok := transport.StreamFromContext(ctx)
406 return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
408 addr := s.ServerTransport().RemoteAddr().String()
409 md, ok := metadata.FromContext(ctx)
410 if ok && len(md["redirect"]) != 0 {
411 return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
414 md = metadata.New(map[string]string{})
416 md["redirect"] = append(md["redirect"], addr)
417 return metadata.NewContext(ctx, md), nil
419 remoteMods := []func(context.Context) (context.Context, error){redirectChecker}
420 remoteMods = append(remoteMods, remoteCtxMod)
422 var localMods []func(context.Context) (context.Context, error)
423 if localCtxMod != nil {
424 localMods = []func(context.Context) (context.Context, error){localCtxMod}
427 return &raftProxyResourceAllocatorServer{
429 connSelector: connSelector,
430 localCtxMods: localMods,
431 remoteCtxMods: remoteMods,
434 func (p *raftProxyResourceAllocatorServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
436 for _, mod := range ctxMods {
444 func (p *raftProxyResourceAllocatorServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
445 ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
450 conn, err := p.connSelector.LeaderConn(ctx)
455 client := NewHealthClient(conn)
457 resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
458 if err != nil || resp.Status != HealthCheckResponse_SERVING {
463 return nil, ctx.Err()
468 func (p *raftProxyResourceAllocatorServer) AttachNetwork(ctx context.Context, r *AttachNetworkRequest) (*AttachNetworkResponse, error) {
470 conn, err := p.connSelector.LeaderConn(ctx)
472 if err == raftselector.ErrIsLeader {
473 ctx, err = p.runCtxMods(ctx, p.localCtxMods)
477 return p.local.AttachNetwork(ctx, r)
481 modCtx, err := p.runCtxMods(ctx, p.remoteCtxMods)
486 resp, err := NewResourceAllocatorClient(conn).AttachNetwork(modCtx, r)
488 if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
491 conn, err := p.pollNewLeaderConn(ctx)
493 if err == raftselector.ErrIsLeader {
494 return p.local.AttachNetwork(ctx, r)
498 return NewResourceAllocatorClient(conn).AttachNetwork(modCtx, r)
503 func (p *raftProxyResourceAllocatorServer) DetachNetwork(ctx context.Context, r *DetachNetworkRequest) (*DetachNetworkResponse, error) {
505 conn, err := p.connSelector.LeaderConn(ctx)
507 if err == raftselector.ErrIsLeader {
508 ctx, err = p.runCtxMods(ctx, p.localCtxMods)
512 return p.local.DetachNetwork(ctx, r)
516 modCtx, err := p.runCtxMods(ctx, p.remoteCtxMods)
521 resp, err := NewResourceAllocatorClient(conn).DetachNetwork(modCtx, r)
523 if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
526 conn, err := p.pollNewLeaderConn(ctx)
528 if err == raftselector.ErrIsLeader {
529 return p.local.DetachNetwork(ctx, r)
533 return NewResourceAllocatorClient(conn).DetachNetwork(modCtx, r)
538 func (m *AttachNetworkRequest) Size() (n int) {
543 n += 1 + l + sovResource(uint64(l))
545 l = len(m.ContainerID)
547 n += 1 + l + sovResource(uint64(l))
552 func (m *AttachNetworkResponse) Size() (n int) {
555 l = len(m.AttachmentID)
557 n += 1 + l + sovResource(uint64(l))
562 func (m *DetachNetworkRequest) Size() (n int) {
565 l = len(m.AttachmentID)
567 n += 1 + l + sovResource(uint64(l))
572 func (m *DetachNetworkResponse) Size() (n int) {
578 func sovResource(x uint64) (n int) {
588 func sozResource(x uint64) (n int) {
589 return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63))))
591 func (this *AttachNetworkRequest) String() string {
595 s := strings.Join([]string{`&AttachNetworkRequest{`,
596 `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "NetworkAttachmentConfig", "NetworkAttachmentConfig", 1) + `,`,
597 `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
602 func (this *AttachNetworkResponse) String() string {
606 s := strings.Join([]string{`&AttachNetworkResponse{`,
607 `AttachmentID:` + fmt.Sprintf("%v", this.AttachmentID) + `,`,
612 func (this *DetachNetworkRequest) String() string {
616 s := strings.Join([]string{`&DetachNetworkRequest{`,
617 `AttachmentID:` + fmt.Sprintf("%v", this.AttachmentID) + `,`,
622 func (this *DetachNetworkResponse) String() string {
626 s := strings.Join([]string{`&DetachNetworkResponse{`,
631 func valueToStringResource(v interface{}) string {
632 rv := reflect.ValueOf(v)
636 pv := reflect.Indirect(rv).Interface()
637 return fmt.Sprintf("*%v", pv)
639 func (m *AttachNetworkRequest) Unmarshal(dAtA []byte) error {
645 for shift := uint(0); ; shift += 7 {
647 return ErrIntOverflowResource
650 return io.ErrUnexpectedEOF
654 wire |= (uint64(b) & 0x7F) << shift
659 fieldNum := int32(wire >> 3)
660 wireType := int(wire & 0x7)
662 return fmt.Errorf("proto: AttachNetworkRequest: wiretype end group for non-group")
665 return fmt.Errorf("proto: AttachNetworkRequest: illegal tag %d (wire type %d)", fieldNum, wire)
670 return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
673 for shift := uint(0); ; shift += 7 {
675 return ErrIntOverflowResource
678 return io.ErrUnexpectedEOF
682 msglen |= (int(b) & 0x7F) << shift
688 return ErrInvalidLengthResource
690 postIndex := iNdEx + msglen
692 return io.ErrUnexpectedEOF
695 m.Config = &NetworkAttachmentConfig{}
697 if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
703 return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
706 for shift := uint(0); ; shift += 7 {
708 return ErrIntOverflowResource
711 return io.ErrUnexpectedEOF
715 stringLen |= (uint64(b) & 0x7F) << shift
720 intStringLen := int(stringLen)
721 if intStringLen < 0 {
722 return ErrInvalidLengthResource
724 postIndex := iNdEx + intStringLen
726 return io.ErrUnexpectedEOF
728 m.ContainerID = string(dAtA[iNdEx:postIndex])
732 skippy, err := skipResource(dAtA[iNdEx:])
737 return ErrInvalidLengthResource
739 if (iNdEx + skippy) > l {
740 return io.ErrUnexpectedEOF
747 return io.ErrUnexpectedEOF
751 func (m *AttachNetworkResponse) Unmarshal(dAtA []byte) error {
757 for shift := uint(0); ; shift += 7 {
759 return ErrIntOverflowResource
762 return io.ErrUnexpectedEOF
766 wire |= (uint64(b) & 0x7F) << shift
771 fieldNum := int32(wire >> 3)
772 wireType := int(wire & 0x7)
774 return fmt.Errorf("proto: AttachNetworkResponse: wiretype end group for non-group")
777 return fmt.Errorf("proto: AttachNetworkResponse: illegal tag %d (wire type %d)", fieldNum, wire)
782 return fmt.Errorf("proto: wrong wireType = %d for field AttachmentID", wireType)
785 for shift := uint(0); ; shift += 7 {
787 return ErrIntOverflowResource
790 return io.ErrUnexpectedEOF
794 stringLen |= (uint64(b) & 0x7F) << shift
799 intStringLen := int(stringLen)
800 if intStringLen < 0 {
801 return ErrInvalidLengthResource
803 postIndex := iNdEx + intStringLen
805 return io.ErrUnexpectedEOF
807 m.AttachmentID = string(dAtA[iNdEx:postIndex])
811 skippy, err := skipResource(dAtA[iNdEx:])
816 return ErrInvalidLengthResource
818 if (iNdEx + skippy) > l {
819 return io.ErrUnexpectedEOF
826 return io.ErrUnexpectedEOF
830 func (m *DetachNetworkRequest) Unmarshal(dAtA []byte) error {
836 for shift := uint(0); ; shift += 7 {
838 return ErrIntOverflowResource
841 return io.ErrUnexpectedEOF
845 wire |= (uint64(b) & 0x7F) << shift
850 fieldNum := int32(wire >> 3)
851 wireType := int(wire & 0x7)
853 return fmt.Errorf("proto: DetachNetworkRequest: wiretype end group for non-group")
856 return fmt.Errorf("proto: DetachNetworkRequest: illegal tag %d (wire type %d)", fieldNum, wire)
861 return fmt.Errorf("proto: wrong wireType = %d for field AttachmentID", wireType)
864 for shift := uint(0); ; shift += 7 {
866 return ErrIntOverflowResource
869 return io.ErrUnexpectedEOF
873 stringLen |= (uint64(b) & 0x7F) << shift
878 intStringLen := int(stringLen)
879 if intStringLen < 0 {
880 return ErrInvalidLengthResource
882 postIndex := iNdEx + intStringLen
884 return io.ErrUnexpectedEOF
886 m.AttachmentID = string(dAtA[iNdEx:postIndex])
890 skippy, err := skipResource(dAtA[iNdEx:])
895 return ErrInvalidLengthResource
897 if (iNdEx + skippy) > l {
898 return io.ErrUnexpectedEOF
905 return io.ErrUnexpectedEOF
909 func (m *DetachNetworkResponse) Unmarshal(dAtA []byte) error {
915 for shift := uint(0); ; shift += 7 {
917 return ErrIntOverflowResource
920 return io.ErrUnexpectedEOF
924 wire |= (uint64(b) & 0x7F) << shift
929 fieldNum := int32(wire >> 3)
930 wireType := int(wire & 0x7)
932 return fmt.Errorf("proto: DetachNetworkResponse: wiretype end group for non-group")
935 return fmt.Errorf("proto: DetachNetworkResponse: illegal tag %d (wire type %d)", fieldNum, wire)
940 skippy, err := skipResource(dAtA[iNdEx:])
945 return ErrInvalidLengthResource
947 if (iNdEx + skippy) > l {
948 return io.ErrUnexpectedEOF
955 return io.ErrUnexpectedEOF
959 func skipResource(dAtA []byte) (n int, err error) {
964 for shift := uint(0); ; shift += 7 {
966 return 0, ErrIntOverflowResource
969 return 0, io.ErrUnexpectedEOF
973 wire |= (uint64(b) & 0x7F) << shift
978 wireType := int(wire & 0x7)
981 for shift := uint(0); ; shift += 7 {
983 return 0, ErrIntOverflowResource
986 return 0, io.ErrUnexpectedEOF
989 if dAtA[iNdEx-1] < 0x80 {
999 for shift := uint(0); ; shift += 7 {
1001 return 0, ErrIntOverflowResource
1004 return 0, io.ErrUnexpectedEOF
1008 length |= (int(b) & 0x7F) << shift
1015 return 0, ErrInvalidLengthResource
1020 var innerWire uint64
1021 var start int = iNdEx
1022 for shift := uint(0); ; shift += 7 {
1024 return 0, ErrIntOverflowResource
1027 return 0, io.ErrUnexpectedEOF
1031 innerWire |= (uint64(b) & 0x7F) << shift
1036 innerWireType := int(innerWire & 0x7)
1037 if innerWireType == 4 {
1040 next, err := skipResource(dAtA[start:])
1044 iNdEx = start + next
1053 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
1056 panic("unreachable")
1060 ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling")
1061 ErrIntOverflowResource = fmt.Errorf("proto: integer overflow")
1064 func init() { proto.RegisterFile("resource.proto", fileDescriptorResource) }
1066 var fileDescriptorResource = []byte{
1067 // 368 bytes of a gzipped FileDescriptorProto
1068 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x4a, 0x2d, 0xce,
1069 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4a, 0xc9, 0x4f, 0xce,
1070 0x4e, 0x2d, 0xd2, 0x2b, 0x2e, 0x4f, 0x2c, 0xca, 0xcd, 0xce, 0x2c, 0xd1, 0x2b, 0x33, 0x94, 0xe2,
1071 0x2e, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x28, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x33, 0xf5,
1072 0x41, 0x2c, 0xa8, 0xa8, 0x70, 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x9e, 0x3e, 0x84, 0x82, 0x08, 0x2a,
1073 0xf5, 0x33, 0x72, 0x89, 0x38, 0x96, 0x94, 0x24, 0x26, 0x67, 0xf8, 0xa5, 0x96, 0x94, 0xe7, 0x17,
1074 0x65, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x39, 0x73, 0xb1, 0x25, 0xe7, 0xe7, 0xa5,
1075 0x65, 0xa6, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x69, 0xeb, 0x61, 0xda, 0xaa, 0x07, 0xd5,
1076 0x03, 0x31, 0x20, 0x37, 0x35, 0xaf, 0xc4, 0x19, 0xac, 0x25, 0x08, 0xaa, 0x55, 0xc8, 0x88, 0x8b,
1077 0x27, 0x39, 0x3f, 0xaf, 0x24, 0x31, 0x33, 0x2f, 0xb5, 0x28, 0x3e, 0x33, 0x45, 0x82, 0x49, 0x81,
1078 0x51, 0x83, 0xd3, 0x89, 0xff, 0xd1, 0x3d, 0x79, 0x6e, 0x67, 0x98, 0xb8, 0xa7, 0x4b, 0x10, 0x37,
1079 0x5c, 0x91, 0x67, 0x8a, 0x92, 0x1f, 0x97, 0x28, 0x9a, 0x83, 0x8a, 0x0b, 0xf2, 0xf3, 0x8a, 0x53,
1080 0x85, 0x4c, 0xb9, 0x78, 0x13, 0xe1, 0x16, 0x81, 0x4c, 0x63, 0x04, 0x9b, 0x26, 0xf0, 0xe8, 0x9e,
1081 0x3c, 0x0f, 0xc2, 0x05, 0x9e, 0x2e, 0x41, 0x3c, 0x08, 0x65, 0x9e, 0x29, 0x4a, 0xbe, 0x5c, 0x22,
1082 0x2e, 0xa9, 0x58, 0x3c, 0x48, 0xa6, 0x71, 0xe2, 0x5c, 0xa2, 0x68, 0xc6, 0x41, 0x9c, 0x67, 0xb4,
1083 0x9a, 0x89, 0x4b, 0x30, 0x08, 0x1a, 0x51, 0x8e, 0x39, 0x39, 0xf9, 0xc9, 0x89, 0x25, 0xf9, 0x45,
1084 0x42, 0x9d, 0x8c, 0x5c, 0xbc, 0x28, 0xde, 0x11, 0xd2, 0xc0, 0x16, 0x90, 0xd8, 0xa2, 0x40, 0x4a,
1085 0x93, 0x08, 0x95, 0x10, 0xcb, 0x95, 0x94, 0x4f, 0xad, 0x7b, 0x37, 0x83, 0x49, 0x96, 0x8b, 0x07,
1086 0xac, 0x54, 0x17, 0x24, 0x97, 0x5a, 0xc4, 0xc5, 0x0b, 0xe1, 0xe5, 0x26, 0xe6, 0x25, 0xa6, 0xa7,
1087 0x42, 0xdc, 0x82, 0xe2, 0x76, 0xec, 0x6e, 0xc1, 0x16, 0x5a, 0xd8, 0xdd, 0x82, 0x35, 0x20, 0x88,
1088 0x72, 0x8b, 0x93, 0xc4, 0x89, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, 0x34, 0x3c, 0x92, 0x63,
1089 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x93, 0xd8, 0xc0,
1090 0x09, 0xd3, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x48, 0x12, 0x41, 0xf6, 0x02, 0x00, 0x00,