add management interface

This commit is contained in:
Gordon
2021-09-22 20:10:38 +08:00
parent 68eaa51ebe
commit 66c1b19696
23 changed files with 1434 additions and 507 deletions
File diff suppressed because it is too large Load Diff
+12
View File
@@ -40,6 +40,16 @@ message AddFriendReq{
}
message ImportFriendReq{
string uid = 1;
string OperationID = 2;
string Token = 3;
string OwnerUid = 4;
}
message GetFriendApplyReq{
string OperationID = 1;
string Token = 2;
@@ -91,6 +101,7 @@ message AddBlacklistReq{
string uid = 1;
string OperationID = 2;
string Token = 3;
string OwnerUid = 4;
}
@@ -167,4 +178,5 @@ service friend{
rpc deleteFriend(DeleteFriendReq) returns(CommonResp);
rpc addFriendResponse(AddFriendResponseReq) returns(CommonResp);
rpc setFriendComment(SetFriendCommentReq) returns(CommonResp);
rpc ImportFriend(ImportFriendReq) returns(CommonResp);
}
+373 -114
View File
@@ -1,16 +1,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: user/user.proto
package user
package user // import "user"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
@@ -22,11 +21,11 @@ var _ = math.Inf
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type CommonResp struct {
ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"`
ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"`
ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -36,17 +35,16 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ed89022014131a74, []int{0}
return fileDescriptor_user_9367ac00c24112e8, []int{0}
}
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
}
func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic)
}
func (m *CommonResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommonResp.Merge(m, src)
func (dst *CommonResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommonResp.Merge(dst, src)
}
func (m *CommonResp) XXX_Size() int {
return xxx_messageInfo_CommonResp.Size(m)
@@ -71,10 +69,202 @@ func (m *CommonResp) GetErrorMsg() string {
return ""
}
type DeleteUsersResp struct {
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
FailedUidList []string `protobuf:"bytes,2,rep,name=failedUidList" json:"failedUidList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} }
func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) }
func (*DeleteUsersResp) ProtoMessage() {}
func (*DeleteUsersResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_9367ac00c24112e8, []int{1}
}
func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b)
}
func (m *DeleteUsersResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteUsersResp.Marshal(b, m, deterministic)
}
func (dst *DeleteUsersResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteUsersResp.Merge(dst, src)
}
func (m *DeleteUsersResp) XXX_Size() int {
return xxx_messageInfo_DeleteUsersResp.Size(m)
}
func (m *DeleteUsersResp) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteUsersResp.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteUsersResp proto.InternalMessageInfo
func (m *DeleteUsersResp) GetCommonResp() *CommonResp {
if m != nil {
return m.CommonResp
}
return nil
}
func (m *DeleteUsersResp) GetFailedUidList() []string {
if m != nil {
return m.FailedUidList
}
return nil
}
type DeleteUsersReq struct {
DeleteUidList []string `protobuf:"bytes,2,rep,name=deleteUidList" json:"deleteUidList,omitempty"`
Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"`
OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} }
func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) }
func (*DeleteUsersReq) ProtoMessage() {}
func (*DeleteUsersReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_9367ac00c24112e8, []int{2}
}
func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b)
}
func (m *DeleteUsersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteUsersReq.Marshal(b, m, deterministic)
}
func (dst *DeleteUsersReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteUsersReq.Merge(dst, src)
}
func (m *DeleteUsersReq) XXX_Size() int {
return xxx_messageInfo_DeleteUsersReq.Size(m)
}
func (m *DeleteUsersReq) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteUsersReq.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteUsersReq proto.InternalMessageInfo
func (m *DeleteUsersReq) GetDeleteUidList() []string {
if m != nil {
return m.DeleteUidList
}
return nil
}
func (m *DeleteUsersReq) GetToken() string {
if m != nil {
return m.Token
}
return ""
}
func (m *DeleteUsersReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
type GetAllUsersUidReq struct {
Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetAllUsersUidReq) Reset() { *m = GetAllUsersUidReq{} }
func (m *GetAllUsersUidReq) String() string { return proto.CompactTextString(m) }
func (*GetAllUsersUidReq) ProtoMessage() {}
func (*GetAllUsersUidReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_9367ac00c24112e8, []int{3}
}
func (m *GetAllUsersUidReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUsersUidReq.Unmarshal(m, b)
}
func (m *GetAllUsersUidReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetAllUsersUidReq.Marshal(b, m, deterministic)
}
func (dst *GetAllUsersUidReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetAllUsersUidReq.Merge(dst, src)
}
func (m *GetAllUsersUidReq) XXX_Size() int {
return xxx_messageInfo_GetAllUsersUidReq.Size(m)
}
func (m *GetAllUsersUidReq) XXX_DiscardUnknown() {
xxx_messageInfo_GetAllUsersUidReq.DiscardUnknown(m)
}
var xxx_messageInfo_GetAllUsersUidReq proto.InternalMessageInfo
func (m *GetAllUsersUidReq) GetToken() string {
if m != nil {
return m.Token
}
return ""
}
func (m *GetAllUsersUidReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
type GetAllUsersUidResp struct {
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
UidList []string `protobuf:"bytes,2,rep,name=uidList" json:"uidList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetAllUsersUidResp) Reset() { *m = GetAllUsersUidResp{} }
func (m *GetAllUsersUidResp) String() string { return proto.CompactTextString(m) }
func (*GetAllUsersUidResp) ProtoMessage() {}
func (*GetAllUsersUidResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_9367ac00c24112e8, []int{4}
}
func (m *GetAllUsersUidResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUsersUidResp.Unmarshal(m, b)
}
func (m *GetAllUsersUidResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetAllUsersUidResp.Marshal(b, m, deterministic)
}
func (dst *GetAllUsersUidResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetAllUsersUidResp.Merge(dst, src)
}
func (m *GetAllUsersUidResp) XXX_Size() int {
return xxx_messageInfo_GetAllUsersUidResp.Size(m)
}
func (m *GetAllUsersUidResp) XXX_DiscardUnknown() {
xxx_messageInfo_GetAllUsersUidResp.DiscardUnknown(m)
}
var xxx_messageInfo_GetAllUsersUidResp proto.InternalMessageInfo
func (m *GetAllUsersUidResp) GetCommonResp() *CommonResp {
if m != nil {
return m.CommonResp
}
return nil
}
func (m *GetAllUsersUidResp) GetUidList() []string {
if m != nil {
return m.UidList
}
return nil
}
type GetUserInfoReq struct {
UserIDList []string `protobuf:"bytes,1,rep,name=userIDList,proto3" json:"userIDList,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
OperationID string `protobuf:"bytes,3,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
UserIDList []string `protobuf:"bytes,1,rep,name=userIDList" json:"userIDList,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -84,17 +274,16 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} }
func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetUserInfoReq) ProtoMessage() {}
func (*GetUserInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ed89022014131a74, []int{1}
return fileDescriptor_user_9367ac00c24112e8, []int{5}
}
func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b)
}
func (m *GetUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserInfoReq.Marshal(b, m, deterministic)
}
func (m *GetUserInfoReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserInfoReq.Merge(m, src)
func (dst *GetUserInfoReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserInfoReq.Merge(dst, src)
}
func (m *GetUserInfoReq) XXX_Size() int {
return xxx_messageInfo_GetUserInfoReq.Size(m)
@@ -127,9 +316,9 @@ func (m *GetUserInfoReq) GetOperationID() string {
}
type GetUserInfoResp struct {
ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"`
Data []*UserInfo `protobuf:"bytes,3,rep,name=Data,proto3" json:"Data,omitempty"`
ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"`
ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"`
Data []*UserInfo `protobuf:"bytes,3,rep,name=Data" json:"Data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -139,17 +328,16 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} }
func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetUserInfoResp) ProtoMessage() {}
func (*GetUserInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ed89022014131a74, []int{2}
return fileDescriptor_user_9367ac00c24112e8, []int{6}
}
func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b)
}
func (m *GetUserInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserInfoResp.Marshal(b, m, deterministic)
}
func (m *GetUserInfoResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserInfoResp.Merge(m, src)
func (dst *GetUserInfoResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserInfoResp.Merge(dst, src)
}
func (m *GetUserInfoResp) XXX_Size() int {
return xxx_messageInfo_GetUserInfoResp.Size(m)
@@ -182,14 +370,14 @@ func (m *GetUserInfoResp) GetData() []*UserInfo {
}
type UserInfo struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"`
Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"`
Mobile string `protobuf:"bytes,5,opt,name=mobile,proto3" json:"mobile,omitempty"`
Birth string `protobuf:"bytes,6,opt,name=birth,proto3" json:"birth,omitempty"`
Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
Ex string `protobuf:"bytes,8,opt,name=ex,proto3" json:"ex,omitempty"`
Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Icon string `protobuf:"bytes,3,opt,name=icon" json:"icon,omitempty"`
Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"`
Mobile string `protobuf:"bytes,5,opt,name=mobile" json:"mobile,omitempty"`
Birth string `protobuf:"bytes,6,opt,name=birth" json:"birth,omitempty"`
Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"`
Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -199,17 +387,16 @@ func (m *UserInfo) Reset() { *m = UserInfo{} }
func (m *UserInfo) String() string { return proto.CompactTextString(m) }
func (*UserInfo) ProtoMessage() {}
func (*UserInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ed89022014131a74, []int{3}
return fileDescriptor_user_9367ac00c24112e8, []int{7}
}
func (m *UserInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInfo.Unmarshal(m, b)
}
func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic)
}
func (m *UserInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserInfo.Merge(m, src)
func (dst *UserInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserInfo.Merge(dst, src)
}
func (m *UserInfo) XXX_Size() int {
return xxx_messageInfo_UserInfo.Size(m)
@@ -277,8 +464,8 @@ func (m *UserInfo) GetEx() string {
}
type LogoutReq struct {
OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -288,17 +475,16 @@ func (m *LogoutReq) Reset() { *m = LogoutReq{} }
func (m *LogoutReq) String() string { return proto.CompactTextString(m) }
func (*LogoutReq) ProtoMessage() {}
func (*LogoutReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ed89022014131a74, []int{4}
return fileDescriptor_user_9367ac00c24112e8, []int{8}
}
func (m *LogoutReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LogoutReq.Unmarshal(m, b)
}
func (m *LogoutReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LogoutReq.Marshal(b, m, deterministic)
}
func (m *LogoutReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogoutReq.Merge(m, src)
func (dst *LogoutReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogoutReq.Merge(dst, src)
}
func (m *LogoutReq) XXX_Size() int {
return xxx_messageInfo_LogoutReq.Size(m)
@@ -324,15 +510,16 @@ func (m *LogoutReq) GetToken() string {
}
type UpdateUserInfoReq struct {
Icon string `protobuf:"bytes,1,opt,name=icon,proto3" json:"icon,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Gender int32 `protobuf:"varint,3,opt,name=gender,proto3" json:"gender,omitempty"`
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"`
Birth string `protobuf:"bytes,5,opt,name=birth,proto3" json:"birth,omitempty"`
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
Ex string `protobuf:"bytes,7,opt,name=ex,proto3" json:"ex,omitempty"`
Token string `protobuf:"bytes,8,opt,name=token,proto3" json:"token,omitempty"`
OperationID string `protobuf:"bytes,9,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
Icon string `protobuf:"bytes,1,opt,name=icon" json:"icon,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Gender int32 `protobuf:"varint,3,opt,name=gender" json:"gender,omitempty"`
Mobile string `protobuf:"bytes,4,opt,name=mobile" json:"mobile,omitempty"`
Birth string `protobuf:"bytes,5,opt,name=birth" json:"birth,omitempty"`
Email string `protobuf:"bytes,6,opt,name=email" json:"email,omitempty"`
Ex string `protobuf:"bytes,7,opt,name=ex" json:"ex,omitempty"`
Token string `protobuf:"bytes,8,opt,name=token" json:"token,omitempty"`
OperationID string `protobuf:"bytes,9,opt,name=OperationID" json:"OperationID,omitempty"`
Uid string `protobuf:"bytes,10,opt,name=Uid" json:"Uid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -342,17 +529,16 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} }
func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInfoReq) ProtoMessage() {}
func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ed89022014131a74, []int{5}
return fileDescriptor_user_9367ac00c24112e8, []int{9}
}
func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b)
}
func (m *UpdateUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateUserInfoReq.Marshal(b, m, deterministic)
}
func (m *UpdateUserInfoReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateUserInfoReq.Merge(m, src)
func (dst *UpdateUserInfoReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateUserInfoReq.Merge(dst, src)
}
func (m *UpdateUserInfoReq) XXX_Size() int {
return xxx_messageInfo_UpdateUserInfoReq.Size(m)
@@ -426,8 +612,19 @@ func (m *UpdateUserInfoReq) GetOperationID() string {
return ""
}
func (m *UpdateUserInfoReq) GetUid() string {
if m != nil {
return m.Uid
}
return ""
}
func init() {
proto.RegisterType((*CommonResp)(nil), "user.CommonResp")
proto.RegisterType((*DeleteUsersResp)(nil), "user.DeleteUsersResp")
proto.RegisterType((*DeleteUsersReq)(nil), "user.DeleteUsersReq")
proto.RegisterType((*GetAllUsersUidReq)(nil), "user.GetAllUsersUidReq")
proto.RegisterType((*GetAllUsersUidResp)(nil), "user.GetAllUsersUidResp")
proto.RegisterType((*GetUserInfoReq)(nil), "user.GetUserInfoReq")
proto.RegisterType((*GetUserInfoResp)(nil), "user.GetUserInfoResp")
proto.RegisterType((*UserInfo)(nil), "user.UserInfo")
@@ -435,67 +632,34 @@ func init() {
proto.RegisterType((*UpdateUserInfoReq)(nil), "user.UpdateUserInfoReq")
}
func init() {
proto.RegisterFile("user/user.proto", fileDescriptor_ed89022014131a74)
}
var fileDescriptor_ed89022014131a74 = []byte{
// 416 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4d, 0x8b, 0xd4, 0x40,
0x10, 0xa5, 0x27, 0x1f, 0x9b, 0x54, 0x20, 0xbb, 0x16, 0xab, 0x36, 0x83, 0x48, 0xc8, 0x29, 0xa7,
0x15, 0xd6, 0x9b, 0x7b, 0x73, 0x06, 0x65, 0x60, 0x45, 0x08, 0xec, 0xc5, 0x5b, 0xc6, 0x94, 0x99,
0xe0, 0x24, 0x1d, 0x3b, 0x3d, 0x30, 0x37, 0xff, 0x92, 0xff, 0xc8, 0xbf, 0x22, 0xdd, 0xc9, 0x4c,
0x32, 0x33, 0xd1, 0x8b, 0x97, 0x50, 0xef, 0x75, 0xa8, 0xaa, 0xf7, 0xaa, 0x0a, 0xae, 0x77, 0x2d,
0xc9, 0x37, 0xfa, 0x73, 0xd7, 0x48, 0xa1, 0x04, 0xda, 0x3a, 0x8e, 0x3f, 0x00, 0x2c, 0x44, 0x55,
0x89, 0x3a, 0xa5, 0xb6, 0xc1, 0x57, 0xe0, 0x93, 0x94, 0x42, 0x2e, 0x44, 0x4e, 0x9c, 0x45, 0x2c,
0x71, 0xd2, 0x81, 0xc0, 0x39, 0x78, 0x06, 0x7c,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x65, 0x17,
0x96, 0x4e, 0x8f, 0x22, 0xfe, 0xcd, 0xe0, 0xd9, 0x53, 0x93, 0x67, 0x8a, 0xc6, 0x63, 0x3d, 0x48,
0x63, 0x23, 0x69, 0x53, 0x16, 0x0c, 0x72, 0xad, 0xbf, 0xc8, 0xb5, 0xa7, 0xe5, 0x3a, 0x93, 0x72,
0xdd, 0x4b, 0xb9, 0x57, 0x07, 0xb9, 0x43, 0xff, 0xde, 0x3f, 0x56, 0xc9, 0xbf, 0xd0, 0x7d, 0xff,
0x13, 0xcc, 0x11, 0xe0, 0x3b, 0x08, 0x8a, 0x61, 0xa5, 0xf0, 0xb6, 0x5b, 0x83, 0xd3, 0x7d, 0x9e,
0x3f, 0x9f, 0x60, 0xdb, 0x06, 0x1f, 0x20, 0x3c, 0x35, 0x09, 0x5f, 0xf6, 0x5b, 0x74, 0x6e, 0xdd,
0xfc, 0xa6, 0x7b, 0x18, 0xee, 0xed, 0x7d, 0xf0, 0xc5, 0xd7, 0xd4, 0x83, 0xfe, 0xac, 0x5d, 0x73,
0x97, 0x6f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x6d, 0x34, 0xa2, 0xaa, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
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.SupportPackageIsVersion6
const _ = grpc.SupportPackageIsVersion4
// Client API for User service
// UserClient is the client API for User service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type UserClient interface {
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*CommonResp, error)
DeleteUsers(ctx context.Context, in *DeleteUsersReq, opts ...grpc.CallOption) (*DeleteUsersResp, error)
GetAllUsersUid(ctx context.Context, in *GetAllUsersUidReq, opts ...grpc.CallOption) (*GetAllUsersUidResp, error)
}
type userClient struct {
cc grpc.ClientConnInterface
cc *grpc.ClientConn
}
func NewUserClient(cc grpc.ClientConnInterface) UserClient {
func NewUserClient(cc *grpc.ClientConn) UserClient {
return &userClient{cc}
}
func (c *userClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) {
out := new(GetUserInfoResp)
err := c.cc.Invoke(ctx, "/user.user/getUserInfo", in, out, opts...)
err := grpc.Invoke(ctx, "/user.user/getUserInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
@@ -504,28 +668,38 @@ func (c *userClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts .
func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*CommonResp, error) {
out := new(CommonResp)
err := c.cc.Invoke(ctx, "/user.user/UpdateUserInfo", in, out, opts...)
err := grpc.Invoke(ctx, "/user.user/UpdateUserInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServer is the server API for User service.
func (c *userClient) DeleteUsers(ctx context.Context, in *DeleteUsersReq, opts ...grpc.CallOption) (*DeleteUsersResp, error) {
out := new(DeleteUsersResp)
err := grpc.Invoke(ctx, "/user.user/DeleteUsers", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userClient) GetAllUsersUid(ctx context.Context, in *GetAllUsersUidReq, opts ...grpc.CallOption) (*GetAllUsersUidResp, error) {
out := new(GetAllUsersUidResp)
err := grpc.Invoke(ctx, "/user.user/GetAllUsersUid", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for User service
type UserServer interface {
GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*CommonResp, error)
}
// UnimplementedUserServer can be embedded to have forward compatible implementations.
type UnimplementedUserServer struct {
}
func (*UnimplementedUserServer) GetUserInfo(ctx context.Context, req *GetUserInfoReq) (*GetUserInfoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
}
func (*UnimplementedUserServer) UpdateUserInfo(ctx context.Context, req *UpdateUserInfoReq) (*CommonResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInfo not implemented")
DeleteUsers(context.Context, *DeleteUsersReq) (*DeleteUsersResp, error)
GetAllUsersUid(context.Context, *GetAllUsersUidReq) (*GetAllUsersUidResp, error)
}
func RegisterUserServer(s *grpc.Server, srv UserServer) {
@@ -568,6 +742,42 @@ func _User_UpdateUserInfo_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _User_DeleteUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteUsersReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServer).DeleteUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/user.user/DeleteUsers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServer).DeleteUsers(ctx, req.(*DeleteUsersReq))
}
return interceptor(ctx, in, info, handler)
}
func _User_GetAllUsersUid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAllUsersUidReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServer).GetAllUsersUid(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/user.user/GetAllUsersUid",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServer).GetAllUsersUid(ctx, req.(*GetAllUsersUidReq))
}
return interceptor(ctx, in, info, handler)
}
var _User_serviceDesc = grpc.ServiceDesc{
ServiceName: "user.user",
HandlerType: (*UserServer)(nil),
@@ -580,7 +790,56 @@ var _User_serviceDesc = grpc.ServiceDesc{
MethodName: "UpdateUserInfo",
Handler: _User_UpdateUserInfo_Handler,
},
{
MethodName: "DeleteUsers",
Handler: _User_DeleteUsers_Handler,
},
{
MethodName: "GetAllUsersUid",
Handler: _User_GetAllUsersUid_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto",
}
func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9367ac00c24112e8) }
var fileDescriptor_user_9367ac00c24112e8 = []byte{
// 560 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0x95, 0xed, 0x7c, 0x79, 0x22, 0x92, 0x74, 0x55, 0x60, 0x15, 0x21, 0x14, 0x59, 0x1c, 0x72,
0x2a, 0x28, 0xdc, 0xe8, 0x09, 0x12, 0x51, 0x45, 0x14, 0x55, 0xb2, 0xe4, 0x0b, 0x27, 0x9c, 0xee,
0x34, 0x5d, 0xe1, 0x78, 0x8d, 0xbd, 0x91, 0x7a, 0xe4, 0x27, 0xf1, 0xd7, 0xf8, 0x07, 0x68, 0xc7,
0x71, 0xe2, 0xaf, 0x72, 0xa0, 0x17, 0x6b, 0xe7, 0xed, 0xfa, 0xbd, 0x7d, 0x33, 0xb3, 0x03, 0xe3,
0x7d, 0x86, 0xe9, 0x5b, 0xf3, 0xb9, 0x48, 0x52, 0xa5, 0x15, 0xeb, 0x98, 0xb5, 0xf7, 0x19, 0x60,
0xa9, 0x76, 0x3b, 0x15, 0xfb, 0x98, 0x25, 0xec, 0x15, 0xb8, 0x98, 0xa6, 0x2a, 0x5d, 0x2a, 0x81,
0xdc, 0x9a, 0x59, 0xf3, 0xae, 0x7f, 0x02, 0xd8, 0x14, 0x06, 0x14, 0x7c, 0xcd, 0xb6, 0xdc, 0x9e,
0x59, 0x73, 0x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x56, 0x3d, 0x9b, 0xd3, 0xc6, 0x73, 0x33, 0xc2, 0xa5, 0x39, 0x53, 0x08, 0x57,
0x47, 0x4f, 0x21, 0x5c, 0x9f, 0x7d, 0x4b, 0x7a, 0x84, 0xa5, 0x67, 0x5e, 0x08, 0x37, 0x26, 0xc9,
0x94, 0xb7, 0x6f, 0x64, 0xc9, 0xa7, 0xe1, 0x37, 0xd7, 0x6c, 0x5d, 0x9a, 0xcf, 0xa6, 0x47, 0x53,
0xfb, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x0f, 0x5a, 0xd9, 0xc8, 0x05, 0x00, 0x00,
}
+21
View File
@@ -6,7 +6,25 @@ message CommonResp{
int32 errorCode = 1;
string errorMsg = 2;
}
message DeleteUsersResp{
CommonResp commonResp = 1;
repeated string failedUidList = 2;
}
message DeleteUsersReq{
repeated string deleteUidList = 2;
string token = 3;
string OperationID = 4;
}
message GetAllUsersUidReq{
string token = 2;
string operationID = 3;
}
message GetAllUsersUidResp{
CommonResp commonResp = 1;
repeated string uidList = 2;
}
message GetUserInfoReq{
repeated string userIDList = 1;
string token = 2;
@@ -44,9 +62,12 @@ message UpdateUserInfoReq{
string ex = 7;
string token = 8;
string OperationID = 9;
string Uid = 10;
}
service user {
rpc getUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
rpc UpdateUserInfo(UpdateUserInfoReq) returns(CommonResp);
rpc DeleteUsers(DeleteUsersReq)returns(DeleteUsersResp);
rpc GetAllUsersUid(GetAllUsersUidReq)returns(GetAllUsersUidResp);
}