-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add new query APIs #399
Conversation
proto/greenfield/storage/query.proto
Outdated
} | ||
|
||
message QueryGroupMembersExistResponse { | ||
repeated bool are_members = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better not only boolean, but response the accordingly accounts as well.
proto/greenfield/storage/query.proto
Outdated
|
||
message QueryGroupsExistRequest { | ||
repeated string group_names = 1; | ||
repeated string group_owners = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group_owners
is not repeated I think
proto/greenfield/storage/query.proto
Outdated
|
||
// Queries whether some groups are exist. | ||
rpc QueryGroupsExist(QueryGroupsExistRequest) returns (QueryGroupsExistResponse) { | ||
option (google.api.http).get = "/greenfield/storage/groups_exist/{group_names}/{group_owners}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Query multiple groups under one user at once
- Query multiple groups under multiple users at once
Shall we use a more generic ways to support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep things simple, I think we'd better only support Query multiple groups under one user at once
.
repeated string group_ids = 1; | ||
} | ||
|
||
message QueryGroupsExistResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we unify the name of the API? E,g. HeadGroup
, HeadGroups
, HeadGroupById
, HeadGroupsByIds
, HeadGroupMember
, HeanGroupMemebers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The methods you mentioned are all existed. These new APIs are just used to query if the object exists
65f8f6c
to
cfc32de
Compare
3c38e1b
to
96bbaf3
Compare
Description
This pr is to add some new query APIs for group and group member.
Changes
Notable changes: