Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

test-errcode
wangchuxiao 2 years ago
commit cbe6005212

@ -449,13 +449,13 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetGroupMembersInfoReq) (*pbGroup.GetGroupMembersInfoResp, error) {
resp := &pbGroup.GetGroupMembersInfoResp{}
if len(req.Members) == 0 {
return nil, errs.ErrArgs.Wrap("members empty")
if len(req.UserIDs) == 0 {
return nil, errs.ErrArgs.Wrap("userIDs empty")
}
if req.GroupID == "" {
return nil, errs.ErrArgs.Wrap("groupID empty")
}
members, err := s.GroupDatabase.FindGroupMember(ctx, []string{req.GroupID}, req.Members, nil)
members, err := s.GroupDatabase.FindGroupMember(ctx, []string{req.GroupID}, req.UserIDs, nil)
if err != nil {
return nil, err
}

@ -1071,7 +1071,7 @@ type GetGroupMembersInfoReq struct {
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members"`
UserIDs []string `protobuf:"bytes,2,rep,name=userIDs,proto3" json:"userIDs"`
}
func (x *GetGroupMembersInfoReq) Reset() {
@ -1113,9 +1113,9 @@ func (x *GetGroupMembersInfoReq) GetGroupID() string {
return ""
}
func (x *GetGroupMembersInfoReq) GetMembers() []string {
func (x *GetGroupMembersInfoReq) GetUserIDs() []string {
if x != nil {
return x.Members
return x.UserIDs
}
return nil
}
@ -3319,8 +3319,8 @@ var file_group_group_proto_rawDesc = []byte{
0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x18, 0x0a,
0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x72,
0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x73, 0x70, 0x12, 0x41, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76,

@ -104,7 +104,7 @@ message GetGroupMemberListResp {
message GetGroupMembersInfoReq {
string groupID = 1;
repeated string members = 2;
repeated string userIDs = 2;
}
message GetGroupMembersInfoResp {

@ -42,6 +42,69 @@ func Bytes(value []byte) *BytesValue {
return &BytesValue{Value: value}
}
func DoublePtr(value *float64) *DoubleValue {
if value == nil {
return nil
}
return &DoubleValue{Value: *value}
}
func FloatPtr(value *float32) *FloatValue {
if value == nil {
return nil
}
return &FloatValue{Value: *value}
}
func Int64Ptr(value *int64) *Int64Value {
if value == nil {
return nil
}
return &Int64Value{Value: *value}
}
func UInt64Ptr(value *uint64) *UInt64Value {
if value == nil {
return nil
}
return &UInt64Value{Value: *value}
}
func Int32Ptr(value *int32) *Int32Value {
if value == nil {
return nil
}
return &Int32Value{Value: *value}
}
func UInt32Ptr(value *uint32) *UInt32Value {
if value == nil {
return nil
}
return &UInt32Value{Value: *value}
}
func BoolPtr(value *bool) *BoolValue {
if value == nil {
return nil
}
return &BoolValue{Value: *value}
}
func StringPtr(value *string) *StringValue {
if value == nil {
return nil
}
return &StringValue{Value: *value}
}
func BytesPtr(value *[]byte) *BytesValue {
if value == nil {
return nil
}
return &BytesValue{Value: *value}
}
func (m *DoubleValue) UnmarshalJSON(p []byte) error {
value, err := strconv.ParseFloat(string(p), 64)
if err != nil {
@ -160,3 +223,66 @@ func (m *BytesValue) UnmarshalJSON(p []byte) error {
func (m *BytesValue) MarshalJSON() ([]byte, error) {
return []byte(`"` + base64.StdEncoding.EncodeToString(m.Value) + `"`), nil
}
func (m *DoubleValue) GetValuePtr() *float64 {
if m == nil {
return nil
}
return &m.Value
}
func (m *FloatValue) GetValuePtr() *float32 {
if m == nil {
return nil
}
return &m.Value
}
func (m *Int64Value) GetValuePtr() *int64 {
if m == nil {
return nil
}
return &m.Value
}
func (m *UInt64Value) GetValuePtr() *uint64 {
if m == nil {
return nil
}
return &m.Value
}
func (m *Int32Value) GetValuePtr() *int32 {
if m == nil {
return nil
}
return &m.Value
}
func (m *UInt32Value) GetValuePtr() *uint32 {
if m == nil {
return nil
}
return &m.Value
}
func (m *BoolValue) GetValuePtr() *bool {
if m == nil {
return nil
}
return &m.Value
}
func (m *StringValue) GetValuePtr() *string {
if m == nil {
return nil
}
return &m.Value
}
func (m *BytesValue) GetValuePtr() *[]byte {
if m == nil {
return nil
}
return &m.Value
}

Loading…
Cancel
Save