feat(x/group): add groups by member address query (#10822)

## Description

Closes: #10566 



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
This commit is contained in:
MD Aleem
2021-12-23 07:22:42 +00:00
committed by GitHub
parent a5128e7618
commit 41da4554d3
10 changed files with 984 additions and 77 deletions
+589 -71
View File
@@ -1177,6 +1177,116 @@ func (m *QueryVotesByVoterResponse) GetPagination() *query.PageResponse {
return nil
}
// QueryGroupsByMemberRequest is the Query/GroupsByMember request type.
type QueryGroupsByMemberRequest struct {
// address is the group member address.
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// pagination defines an optional pagination for the request.
Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
func (m *QueryGroupsByMemberRequest) Reset() { *m = QueryGroupsByMemberRequest{} }
func (m *QueryGroupsByMemberRequest) String() string { return proto.CompactTextString(m) }
func (*QueryGroupsByMemberRequest) ProtoMessage() {}
func (*QueryGroupsByMemberRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ae47912b18757b1a, []int{22}
}
func (m *QueryGroupsByMemberRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryGroupsByMemberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryGroupsByMemberRequest.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 *QueryGroupsByMemberRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryGroupsByMemberRequest.Merge(m, src)
}
func (m *QueryGroupsByMemberRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryGroupsByMemberRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryGroupsByMemberRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryGroupsByMemberRequest proto.InternalMessageInfo
func (m *QueryGroupsByMemberRequest) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *QueryGroupsByMemberRequest) GetPagination() *query.PageRequest {
if m != nil {
return m.Pagination
}
return nil
}
// QueryGroupsByMemberResponse is the Query/GroupsByMember response type.
type QueryGroupsByMemberResponse struct {
// groups are the groups info with the provided group member.
Groups []*GroupInfo `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
// pagination defines the pagination in the response.
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
func (m *QueryGroupsByMemberResponse) Reset() { *m = QueryGroupsByMemberResponse{} }
func (m *QueryGroupsByMemberResponse) String() string { return proto.CompactTextString(m) }
func (*QueryGroupsByMemberResponse) ProtoMessage() {}
func (*QueryGroupsByMemberResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ae47912b18757b1a, []int{23}
}
func (m *QueryGroupsByMemberResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryGroupsByMemberResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryGroupsByMemberResponse.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 *QueryGroupsByMemberResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryGroupsByMemberResponse.Merge(m, src)
}
func (m *QueryGroupsByMemberResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryGroupsByMemberResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryGroupsByMemberResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryGroupsByMemberResponse proto.InternalMessageInfo
func (m *QueryGroupsByMemberResponse) GetGroups() []*GroupInfo {
if m != nil {
return m.Groups
}
return nil
}
func (m *QueryGroupsByMemberResponse) GetPagination() *query.PageResponse {
if m != nil {
return m.Pagination
}
return nil
}
func init() {
proto.RegisterType((*QueryGroupInfoRequest)(nil), "cosmos.group.v1beta1.QueryGroupInfoRequest")
proto.RegisterType((*QueryGroupInfoResponse)(nil), "cosmos.group.v1beta1.QueryGroupInfoResponse")
@@ -1200,82 +1310,87 @@ func init() {
proto.RegisterType((*QueryVotesByProposalResponse)(nil), "cosmos.group.v1beta1.QueryVotesByProposalResponse")
proto.RegisterType((*QueryVotesByVoterRequest)(nil), "cosmos.group.v1beta1.QueryVotesByVoterRequest")
proto.RegisterType((*QueryVotesByVoterResponse)(nil), "cosmos.group.v1beta1.QueryVotesByVoterResponse")
proto.RegisterType((*QueryGroupsByMemberRequest)(nil), "cosmos.group.v1beta1.QueryGroupsByMemberRequest")
proto.RegisterType((*QueryGroupsByMemberResponse)(nil), "cosmos.group.v1beta1.QueryGroupsByMemberResponse")
}
func init() { proto.RegisterFile("cosmos/group/v1beta1/query.proto", fileDescriptor_ae47912b18757b1a) }
var fileDescriptor_ae47912b18757b1a = []byte{
// 1109 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x41, 0x6f, 0x1b, 0x45,
0x14, 0xce, 0x94, 0xb4, 0x49, 0x5e, 0x5a, 0x8a, 0x86, 0x00, 0xce, 0x52, 0x9c, 0x74, 0xa9, 0xa0,
0x6a, 0x9a, 0xdd, 0xc4, 0x69, 0x62, 0x30, 0x05, 0x11, 0x0b, 0x51, 0x05, 0x29, 0x52, 0x71, 0x25,
0x0e, 0x70, 0x88, 0xd6, 0xf1, 0xc6, 0xac, 0xa8, 0x77, 0xdc, 0xdd, 0x75, 0x85, 0x15, 0xf9, 0x82,
0x04, 0x67, 0x44, 0x25, 0xa4, 0x82, 0x84, 0xc4, 0x01, 0x21, 0x0e, 0xdc, 0x90, 0x38, 0x70, 0x47,
0x70, 0x8b, 0x80, 0x03, 0x47, 0x94, 0xf0, 0x0b, 0xf8, 0x05, 0x68, 0x67, 0xde, 0xac, 0x77, 0xed,
0xf1, 0xee, 0x1a, 0x2c, 0xc8, 0xa9, 0xda, 0xf5, 0x7b, 0xf3, 0xbe, 0xef, 0x7b, 0x6f, 0xe7, 0x7d,
0x0d, 0x2c, 0xef, 0x33, 0xbf, 0xc5, 0x7c, 0xb3, 0xe9, 0xb1, 0x4e, 0xdb, 0xbc, 0xbf, 0x5e, 0xb7,
0x03, 0x6b, 0xdd, 0xbc, 0xd7, 0xb1, 0xbd, 0xae, 0xd1, 0xf6, 0x58, 0xc0, 0xe8, 0x82, 0x88, 0x30,
0x78, 0x84, 0x81, 0x11, 0xda, 0xa5, 0x26, 0x63, 0xcd, 0xbb, 0xb6, 0x69, 0xb5, 0x1d, 0xd3, 0x72,
0x5d, 0x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a, 0xdf, 0x78, 0xcf, 0x7c, 0x5f, 0x1c,
0x5f, 0x3f, 0xc7, 0xff, 0xce, 0xb6, 0xf1, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x64, 0xb1,
0x27, 0x28, 0x14, 0x00, 0x00,
// 1158 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5,
0x17, 0xcf, 0xf4, 0x9b, 0x36, 0xc9, 0x4b, 0xdb, 0x2f, 0x0c, 0x01, 0x9c, 0xa5, 0x38, 0xa9, 0xa9,
0xa0, 0x6a, 0x9a, 0xdd, 0xc4, 0x69, 0xe2, 0x62, 0x0a, 0x22, 0x16, 0xa2, 0x0a, 0x52, 0xa4, 0xe2,
0x4a, 0x1c, 0xe0, 0x10, 0xad, 0xe3, 0x8d, 0xb1, 0xa8, 0x77, 0xdc, 0xdd, 0x75, 0x45, 0x14, 0xf9,
0x82, 0x04, 0x67, 0x44, 0x25, 0x44, 0x41, 0x02, 0x21, 0x81, 0x10, 0x07, 0xc4, 0x05, 0x89, 0x03,
0x77, 0x04, 0xb7, 0x08, 0x38, 0x70, 0x44, 0x09, 0x7f, 0x08, 0xda, 0x99, 0x37, 0xfb, 0xcb, 0xe3,
0xdd, 0x35, 0x58, 0x90, 0x53, 0xb4, 0xeb, 0xf7, 0xe6, 0x7d, 0x3e, 0x9f, 0xf7, 0x76, 0xe6, 0x33,
0x81, 0xc5, 0x5d, 0xe6, 0x76, 0x98, 0x6b, 0xb4, 0x1c, 0xd6, 0xeb, 0x1a, 0xf7, 0x56, 0x1b, 0x96,
0x67, 0xae, 0x1a, 0x77, 0x7b, 0x96, 0xb3, 0xaf, 0x77, 0x1d, 0xe6, 0x31, 0x3a, 0x27, 0x22, 0x74,
0x1e, 0xa1, 0x63, 0x84, 0x76, 0xa1, 0xc5, 0x58, 0xeb, 0x8e, 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, 0x8e, 0xf9, 0x2a,
0x6d, 0x75, 0x84, 0x0c, 0x44, 0x7b, 0x9d, 0xa3, 0x2d, 0xd3, 0x95, 0xac, 0xbd, 0x5e, 0x1c, 0x4e,
0xe1, 0x98, 0xd7, 0x5e, 0xf8, 0xe9, 0xa8, 0x48, 0x0e, 0x8f, 0x8a, 0xe4, 0x8f, 0xa3, 0x22, 0x79,
0xff, 0xb8, 0x38, 0x71, 0x78, 0x5c, 0x9c, 0xf8, 0xfd, 0xb8, 0x38, 0xf1, 0xfa, 0xa5, 0x56, 0xdb,
0x7b, 0xb3, 0xd7, 0xd0, 0x77, 0x59, 0x47, 0xae, 0x2a, 0xfe, 0x2c, 0xbb, 0xcd, 0xb7, 0x8c, 0xb7,
0xc5, 0xa2, 0x8d, 0x33, 0xfc, 0xdf, 0xaa, 0x6b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x46, 0x16,
0x8f, 0xe9, 0x17, 0x16, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1312,6 +1427,8 @@ type QueryClient interface {
VotesByProposal(ctx context.Context, in *QueryVotesByProposalRequest, opts ...grpc.CallOption) (*QueryVotesByProposalResponse, error)
// VotesByVoter queries a vote by voter.
VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error)
// GroupsByMember queries groups by member address.
GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error)
}
type queryClient struct {
@@ -1421,6 +1538,15 @@ func (c *queryClient) VotesByVoter(ctx context.Context, in *QueryVotesByVoterReq
return out, nil
}
func (c *queryClient) GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error) {
out := new(QueryGroupsByMemberResponse)
err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupsByMember", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
type QueryServer interface {
// GroupInfo queries group info based on group id.
@@ -1445,6 +1571,8 @@ type QueryServer interface {
VotesByProposal(context.Context, *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error)
// VotesByVoter queries a vote by voter.
VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error)
// GroupsByMember queries groups by member address.
GroupsByMember(context.Context, *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
@@ -1484,6 +1612,9 @@ func (*UnimplementedQueryServer) VotesByProposal(ctx context.Context, req *Query
func (*UnimplementedQueryServer) VotesByVoter(ctx context.Context, req *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VotesByVoter not implemented")
}
func (*UnimplementedQueryServer) GroupsByMember(ctx context.Context, req *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GroupsByMember not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
@@ -1687,6 +1818,24 @@ func _Query_VotesByVoter_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _Query_GroupsByMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGroupsByMemberRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GroupsByMember(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.group.v1beta1.Query/GroupsByMember",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GroupsByMember(ctx, req.(*QueryGroupsByMemberRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "cosmos.group.v1beta1.Query",
HandlerType: (*QueryServer)(nil),
@@ -1735,6 +1884,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "VotesByVoter",
Handler: _Query_VotesByVoter_Handler,
},
{
MethodName: "GroupsByMember",
Handler: _Query_GroupsByMember_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/group/v1beta1/query.proto",
@@ -2632,6 +2785,97 @@ func (m *QueryVotesByVoterResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro
return len(dAtA) - i, nil
}
func (m *QueryGroupsByMemberRequest) 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 *QueryGroupsByMemberRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryGroupsByMemberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Pagination != nil {
{
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryGroupsByMemberResponse) 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 *QueryGroupsByMemberResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryGroupsByMemberResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Pagination != nil {
{
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Groups) > 0 {
for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v)
base := offset
@@ -2997,6 +3241,42 @@ func (m *QueryVotesByVoterResponse) Size() (n int) {
return n
}
func (m *QueryGroupsByMemberRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Address)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
if m.Pagination != nil {
l = m.Pagination.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryGroupsByMemberResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Groups) > 0 {
for _, e := range m.Groups {
l = e.Size()
n += 1 + l + sovQuery(uint64(l))
}
}
if m.Pagination != nil {
l = m.Pagination.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -5295,6 +5575,244 @@ func (m *QueryVotesByVoterResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryGroupsByMemberRequest) 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 ErrIntOverflowQuery
}
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: QueryGroupsByMemberRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryGroupsByMemberRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
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 ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Pagination == nil {
m.Pagination = &query.PageRequest{}
}
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryGroupsByMemberResponse) 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 ErrIntOverflowQuery
}
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: QueryGroupsByMemberResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryGroupsByMemberResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Groups = append(m.Groups, &GroupInfo{})
if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Pagination == nil {
m.Pagination = &query.PageResponse{}
}
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0