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
+35
View File
@@ -493,6 +493,8 @@
- [QueryGroupMembersResponse](#cosmos.group.v1beta1.QueryGroupMembersResponse)
- [QueryGroupsByAdminRequest](#cosmos.group.v1beta1.QueryGroupsByAdminRequest)
- [QueryGroupsByAdminResponse](#cosmos.group.v1beta1.QueryGroupsByAdminResponse)
- [QueryGroupsByMemberRequest](#cosmos.group.v1beta1.QueryGroupsByMemberRequest)
- [QueryGroupsByMemberResponse](#cosmos.group.v1beta1.QueryGroupsByMemberResponse)
- [QueryProposalRequest](#cosmos.group.v1beta1.QueryProposalRequest)
- [QueryProposalResponse](#cosmos.group.v1beta1.QueryProposalResponse)
- [QueryProposalsByGroupAccountRequest](#cosmos.group.v1beta1.QueryProposalsByGroupAccountRequest)
@@ -7314,6 +7316,38 @@ QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type.
<a name="cosmos.group.v1beta1.QueryGroupsByMemberRequest"></a>
### QueryGroupsByMemberRequest
QueryGroupsByMemberRequest is the Query/GroupsByMember request type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `address` | [string](#string) | | address is the group member address. |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
<a name="cosmos.group.v1beta1.QueryGroupsByMemberResponse"></a>
### QueryGroupsByMemberResponse
QueryGroupsByMemberResponse is the Query/GroupsByMember response type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `groups` | [GroupInfo](#cosmos.group.v1beta1.GroupInfo) | repeated | groups are the groups info with the provided group member. |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
<a name="cosmos.group.v1beta1.QueryProposalRequest"></a>
### QueryProposalRequest
@@ -7495,6 +7529,7 @@ Query is the cosmos.group.v1beta1 Query service.
| `VoteByProposalVoter` | [QueryVoteByProposalVoterRequest](#cosmos.group.v1beta1.QueryVoteByProposalVoterRequest) | [QueryVoteByProposalVoterResponse](#cosmos.group.v1beta1.QueryVoteByProposalVoterResponse) | VoteByProposalVoter queries a vote by proposal id and voter. | GET|/cosmos/group/v1beta1/vote_by_proposal_voter/{proposal_id}/{voter}|
| `VotesByProposal` | [QueryVotesByProposalRequest](#cosmos.group.v1beta1.QueryVotesByProposalRequest) | [QueryVotesByProposalResponse](#cosmos.group.v1beta1.QueryVotesByProposalResponse) | VotesByProposal queries a vote by proposal. | GET|/cosmos/group/v1beta1/votes_by_proposal/{proposal_id}|
| `VotesByVoter` | [QueryVotesByVoterRequest](#cosmos.group.v1beta1.QueryVotesByVoterRequest) | [QueryVotesByVoterResponse](#cosmos.group.v1beta1.QueryVotesByVoterResponse) | VotesByVoter queries a vote by voter. | GET|/cosmos/group/v1beta1/votes_by_voter/{voter}|
| `GroupsByMember` | [QueryGroupsByMemberRequest](#cosmos.group.v1beta1.QueryGroupsByMemberRequest) | [QueryGroupsByMemberResponse](#cosmos.group.v1beta1.QueryGroupsByMemberResponse) | GroupsByMember queries groups by member address. | GET|/cosmos/group/v1beta1/groups_by_member/{address}|
<!-- end services -->