// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cosmos/base/grpc/v2/service.proto package grpc import ( context "context" fmt "fmt" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" any "github.com/cosmos/gogoproto/types/any" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" io "io" math "math" math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryRequest is the request for the Query method type QueryRequest struct { Request *any.Any `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` } func (m *QueryRequest) Reset() { *m = QueryRequest{} } func (m *QueryRequest) String() string { return proto.CompactTextString(m) } func (*QueryRequest) ProtoMessage() {} func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d2a65dd0225af870, []int{0} } func (m *QueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *QueryRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRequest.Merge(m, src) } func (m *QueryRequest) XXX_Size() int { return m.Size() } func (m *QueryRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryRequest.DiscardUnknown(m) } var xxx_messageInfo_QueryRequest proto.InternalMessageInfo func (m *QueryRequest) GetRequest() *any.Any { if m != nil { return m.Request } return nil } // QueryResponse is the response for the Query method type QueryResponse struct { Response *any.Any `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` } func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (m *QueryResponse) String() string { return proto.CompactTextString(m) } func (*QueryResponse) ProtoMessage() {} func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d2a65dd0225af870, []int{1} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *QueryResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryResponse.Merge(m, src) } func (m *QueryResponse) XXX_Size() int { return m.Size() } func (m *QueryResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryResponse.DiscardUnknown(m) } var xxx_messageInfo_QueryResponse proto.InternalMessageInfo func (m *QueryResponse) GetResponse() *any.Any { if m != nil { return m.Response } return nil } // ListQueryHandlersRequest is the request for the ListQueryHandlers method type ListQueryHandlersRequest struct { } func (m *ListQueryHandlersRequest) Reset() { *m = ListQueryHandlersRequest{} } func (m *ListQueryHandlersRequest) String() string { return proto.CompactTextString(m) } func (*ListQueryHandlersRequest) ProtoMessage() {} func (*ListQueryHandlersRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d2a65dd0225af870, []int{2} } func (m *ListQueryHandlersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ListQueryHandlersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ListQueryHandlersRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ListQueryHandlersRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ListQueryHandlersRequest.Merge(m, src) } func (m *ListQueryHandlersRequest) XXX_Size() int { return m.Size() } func (m *ListQueryHandlersRequest) XXX_DiscardUnknown() { xxx_messageInfo_ListQueryHandlersRequest.DiscardUnknown(m) } var xxx_messageInfo_ListQueryHandlersRequest proto.InternalMessageInfo // ListQueryHandlersResponse is the response for the ListQueryHandlers method type ListQueryHandlersResponse struct { Handlers []*Handler `protobuf:"bytes,1,rep,name=handlers,proto3" json:"handlers,omitempty"` } func (m *ListQueryHandlersResponse) Reset() { *m = ListQueryHandlersResponse{} } func (m *ListQueryHandlersResponse) String() string { return proto.CompactTextString(m) } func (*ListQueryHandlersResponse) ProtoMessage() {} func (*ListQueryHandlersResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d2a65dd0225af870, []int{3} } func (m *ListQueryHandlersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ListQueryHandlersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ListQueryHandlersResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ListQueryHandlersResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ListQueryHandlersResponse.Merge(m, src) } func (m *ListQueryHandlersResponse) XXX_Size() int { return m.Size() } func (m *ListQueryHandlersResponse) XXX_DiscardUnknown() { xxx_messageInfo_ListQueryHandlersResponse.DiscardUnknown(m) } var xxx_messageInfo_ListQueryHandlersResponse proto.InternalMessageInfo func (m *ListQueryHandlersResponse) GetHandlers() []*Handler { if m != nil { return m.Handlers } return nil } // Handler defines a query handler type Handler struct { RequestName string `protobuf:"bytes,1,opt,name=request_name,json=requestName,proto3" json:"request_name,omitempty"` ResponseName string `protobuf:"bytes,2,opt,name=response_name,json=responseName,proto3" json:"response_name,omitempty"` } func (m *Handler) Reset() { *m = Handler{} } func (m *Handler) String() string { return proto.CompactTextString(m) } func (*Handler) ProtoMessage() {} func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptor_d2a65dd0225af870, []int{4} } func (m *Handler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Handler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Handler.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Handler) XXX_Merge(src proto.Message) { xxx_messageInfo_Handler.Merge(m, src) } func (m *Handler) XXX_Size() int { return m.Size() } func (m *Handler) XXX_DiscardUnknown() { xxx_messageInfo_Handler.DiscardUnknown(m) } var xxx_messageInfo_Handler proto.InternalMessageInfo func (m *Handler) GetRequestName() string { if m != nil { return m.RequestName } return "" } func (m *Handler) GetResponseName() string { if m != nil { return m.ResponseName } return "" } func init() { proto.RegisterType((*QueryRequest)(nil), "cosmos.base.grpc.v2.QueryRequest") proto.RegisterType((*QueryResponse)(nil), "cosmos.base.grpc.v2.QueryResponse") proto.RegisterType((*ListQueryHandlersRequest)(nil), "cosmos.base.grpc.v2.ListQueryHandlersRequest") proto.RegisterType((*ListQueryHandlersResponse)(nil), "cosmos.base.grpc.v2.ListQueryHandlersResponse") proto.RegisterType((*Handler)(nil), "cosmos.base.grpc.v2.Handler") } func init() { proto.RegisterFile("cosmos/base/grpc/v2/service.proto", fileDescriptor_d2a65dd0225af870) } var fileDescriptor_d2a65dd0225af870 = []byte{ // 352 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xc2, 0x40, 0x14, 0xc7, 0x7b, 0x1a, 0x05, 0x1f, 0x30, 0x78, 0x3a, 0x40, 0x63, 0x2a, 0xd4, 0x85, 0xc5, 0x57, 0x53, 0x17, 0x5d, 0x4c, 0x70, 0x72, 0x30, 0x46, 0x6a, 0x5c, 0x5c, 0x4c, 0x81, 0x13, 0x1b, 0xa1, 0x57, 0xef, 0x0a, 0x09, 0xdf, 0xc2, 0x8f, 0xe5, 0x88, 0x9b, 0xa3, 0x81, 0x2f, 0x62, 0x7a, 0x77, 0x25, 0x26, 0x56, 0xe2, 0x76, 0x79, 0xf7, 0xfb, 0xbf, 0xfb, 0xdf, 0xff, 0x3d, 0x68, 0xf5, 0xb9, 0x1c, 0x73, 0xe9, 0xf5, 0x42, 0xc9, 0xbc, 0xa1, 0x48, 0xfa, 0xde, 0xd4, 0xf7, 0x24, 0x13, 0xd3, 0xa8, 0xcf, 0x30, 0x11, 0x3c, 0xe5, 0x74, 0x4f, 0x23, 0x98, 0x21, 0x98, 0x21, 0x38, 0xf5, 0xed, 0xc6, 0x90, 0xf3, 0xe1, 0x88, 0x79, 0x0a, 0xe9, 0x4d, 0x9e, 0xbc, 0x30, 0x9e, 0x69, 0xde, 0xbd, 0x80, 0x6a, 0x77, 0xc2, 0xc4, 0x2c, 0x60, 0xaf, 0x13, 0x26, 0x53, 0x8a, 0x50, 0x12, 0xfa, 0x58, 0x27, 0x4d, 0xd2, 0xae, 0xf8, 0xfb, 0xa8, 0xc5, 0x98, 0x8b, 0xb1, 0x13, 0xcf, 0x82, 0x1c, 0x72, 0x3b, 0x50, 0x33, 0x7a, 0x99, 0xf0, 0x58, 0x32, 0x7a, 0x02, 0x65, 0x61, 0xce, 0x6b, 0x3b, 0xac, 0x28, 0xd7, 0x86, 0xfa, 0x75, 0x24, 0x53, 0xd5, 0xe6, 0x2a, 0x8c, 0x07, 0x23, 0x26, 0xa4, 0xb1, 0xe3, 0xde, 0x43, 0xa3, 0xe0, 0xce, 0x3c, 0x75, 0x06, 0xe5, 0x67, 0x53, 0xab, 0x93, 0xe6, 0x66, 0xbb, 0xe2, 0x1f, 0x60, 0xc1, 0xf7, 0xd1, 0x08, 0x83, 0x15, 0xed, 0x76, 0xa1, 0x64, 0x8a, 0xb4, 0x05, 0x55, 0xf3, 0x97, 0xc7, 0x38, 0x1c, 0x6b, 0xcf, 0x3b, 0x41, 0xc5, 0xd4, 0x6e, 0xc2, 0x31, 0xa3, 0x47, 0x50, 0xcb, 0xcd, 0x6a, 0x66, 0x43, 0x31, 0xd5, 0xbc, 0x98, 0x41, 0xfe, 0x07, 0x81, 0xd2, 0x9d, 0x1e, 0x05, 0xbd, 0x85, 0x2d, 0xe5, 0x98, 0xb6, 0x0a, 0xfd, 0xfc, 0x0c, 0xdc, 0x76, 0xd7, 0x21, 0x26, 0x21, 0x8b, 0xa6, 0xb0, 0xfb, 0x2b, 0x07, 0x7a, 0x5c, 0x28, 0xfd, 0x2b, 0x4b, 0x1b, 0xff, 0x8b, 0xe7, 0xaf, 0x5e, 0x9e, 0xbf, 0x2f, 0x1c, 0x32, 0x5f, 0x38, 0xe4, 0x6b, 0xe1, 0x90, 0xb7, 0xa5, 0x63, 0xcd, 0x97, 0x8e, 0xf5, 0xb9, 0x74, 0xac, 0x87, 0x43, 0xdd, 0x4a, 0x0e, 0x5e, 0x30, 0xe2, 0x6a, 0x05, 0x99, 0xc8, 0x96, 0x31, 0x4c, 0x22, 0xb5, 0x98, 0xbd, 0x6d, 0x35, 0xec, 0xd3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x00, 0xa2, 0x0d, 0xb3, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // ServiceClient is the client API for Service service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ServiceClient interface { // Query queries the server with a request, the request can be any sdk Msg. Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // ListQueryHandlers lists all the available query handlers. ListQueryHandlers(ctx context.Context, in *ListQueryHandlersRequest, opts ...grpc.CallOption) (*ListQueryHandlersResponse, error) } type serviceClient struct { cc grpc1.ClientConn } func NewServiceClient(cc grpc1.ClientConn) ServiceClient { return &serviceClient{cc} } func (c *serviceClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { out := new(QueryResponse) err := c.cc.Invoke(ctx, "/cosmos.base.grpc.v2.Service/Query", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *serviceClient) ListQueryHandlers(ctx context.Context, in *ListQueryHandlersRequest, opts ...grpc.CallOption) (*ListQueryHandlersResponse, error) { out := new(ListQueryHandlersResponse) err := c.cc.Invoke(ctx, "/cosmos.base.grpc.v2.Service/ListQueryHandlers", in, out, opts...) if err != nil { return nil, err } return out, nil } // ServiceServer is the server API for Service service. type ServiceServer interface { // Query queries the server with a request, the request can be any sdk Msg. Query(context.Context, *QueryRequest) (*QueryResponse, error) // ListQueryHandlers lists all the available query handlers. ListQueryHandlers(context.Context, *ListQueryHandlersRequest) (*ListQueryHandlersResponse, error) } // UnimplementedServiceServer can be embedded to have forward compatible implementations. type UnimplementedServiceServer struct { } func (*UnimplementedServiceServer) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") } func (*UnimplementedServiceServer) ListQueryHandlers(ctx context.Context, req *ListQueryHandlersRequest) (*ListQueryHandlersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListQueryHandlers not implemented") } func RegisterServiceServer(s grpc1.Server, srv ServiceServer) { s.RegisterService(&_Service_serviceDesc, srv) } func _Service_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ServiceServer).Query(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/cosmos.base.grpc.v2.Service/Query", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ServiceServer).Query(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Service_ListQueryHandlers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListQueryHandlersRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ServiceServer).ListQueryHandlers(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/cosmos.base.grpc.v2.Service/ListQueryHandlers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ServiceServer).ListQueryHandlers(ctx, req.(*ListQueryHandlersRequest)) } return interceptor(ctx, in, info, handler) } var Service_serviceDesc = _Service_serviceDesc var _Service_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.base.grpc.v2.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Query", Handler: _Service_Query_Handler, }, { MethodName: "ListQueryHandlers", Handler: _Service_ListQueryHandlers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/base/grpc/v2/service.proto", } func (m *QueryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Request != nil { { size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintService(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *QueryResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Response != nil { { size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintService(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ListQueryHandlersRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListQueryHandlersRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ListQueryHandlersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *ListQueryHandlersResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListQueryHandlersResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ListQueryHandlersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Handlers) > 0 { for iNdEx := len(m.Handlers) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Handlers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintService(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Handler) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Handler) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Handler) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ResponseName) > 0 { i -= len(m.ResponseName) copy(dAtA[i:], m.ResponseName) i = encodeVarintService(dAtA, i, uint64(len(m.ResponseName))) i-- dAtA[i] = 0x12 } if len(m.RequestName) > 0 { i -= len(m.RequestName) copy(dAtA[i:], m.RequestName) i = encodeVarintService(dAtA, i, uint64(len(m.RequestName))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintService(dAtA []byte, offset int, v uint64) int { offset -= sovService(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *QueryRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Request != nil { l = m.Request.Size() n += 1 + l + sovService(uint64(l)) } return n } func (m *QueryResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Response != nil { l = m.Response.Size() n += 1 + l + sovService(uint64(l)) } return n } func (m *ListQueryHandlersRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *ListQueryHandlersResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Handlers) > 0 { for _, e := range m.Handlers { l = e.Size() n += 1 + l + sovService(uint64(l)) } } return n } func (m *Handler) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.RequestName) if l > 0 { n += 1 + l + sovService(uint64(l)) } l = len(m.ResponseName) if l > 0 { n += 1 + l + sovService(uint64(l)) } return n } func sovService(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozService(x uint64) (n int) { return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *QueryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: QueryRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthService } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthService } if postIndex > l { return io.ErrUnexpectedEOF } if m.Request == nil { m.Request = &any.Any{} } if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthService } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *QueryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: QueryResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: QueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthService } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthService } if postIndex > l { return io.ErrUnexpectedEOF } if m.Response == nil { m.Response = &any.Any{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthService } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListQueryHandlersRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListQueryHandlersRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListQueryHandlersRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthService } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListQueryHandlersResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListQueryHandlersResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListQueryHandlersResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Handlers", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthService } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthService } if postIndex > l { return io.ErrUnexpectedEOF } m.Handlers = append(m.Handlers, &Handler{}) if err := m.Handlers[len(m.Handlers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthService } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Handler) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Handler: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Handler: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthService } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthService } if postIndex > l { return io.ErrUnexpectedEOF } m.RequestName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ResponseName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowService } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthService } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthService } if postIndex > l { return io.ErrUnexpectedEOF } m.ResponseName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthService } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipService(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowService } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowService } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowService } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthService } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupService } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthService } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowService = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") )