add: user auth accomplished
This commit is contained in:
+309
-51
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.9
|
||||
// protoc v6.32.0
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v5.29.6
|
||||
// source: users.proto
|
||||
|
||||
package pb
|
||||
@@ -24,7 +24,7 @@ const (
|
||||
// --------------------------------users--------------------------------
|
||||
type Users struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` //username
|
||||
Passwd string `protobuf:"bytes,3,opt,name=passwd,proto3" json:"passwd,omitempty"` //passwd
|
||||
Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"` //nickname
|
||||
@@ -69,11 +69,11 @@ func (*Users) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Users) GetUserId() string {
|
||||
func (x *Users) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Users) GetUsername() string {
|
||||
@@ -148,7 +148,7 @@ func (x *Users) GetDeletedAt() int64 {
|
||||
|
||||
type AddUsersReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` //username
|
||||
Passwd string `protobuf:"bytes,3,opt,name=passwd,proto3" json:"passwd,omitempty"` //passwd
|
||||
Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"` //nickname
|
||||
@@ -193,11 +193,11 @@ func (*AddUsersReq) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AddUsersReq) GetUserId() string {
|
||||
func (x *AddUsersReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AddUsersReq) GetUsername() string {
|
||||
@@ -308,7 +308,7 @@ func (*AddUsersResp) Descriptor() ([]byte, []int) {
|
||||
|
||||
type UpdateUsersReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` //username
|
||||
Passwd string `protobuf:"bytes,3,opt,name=passwd,proto3" json:"passwd,omitempty"` //passwd
|
||||
Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"` //nickname
|
||||
@@ -353,11 +353,11 @@ func (*UpdateUsersReq) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *UpdateUsersReq) GetUserId() string {
|
||||
func (x *UpdateUsersReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateUsersReq) GetUsername() string {
|
||||
@@ -638,7 +638,7 @@ type SearchUsersReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page
|
||||
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
|
||||
UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` //username
|
||||
Passwd string `protobuf:"bytes,5,opt,name=passwd,proto3" json:"passwd,omitempty"` //passwd
|
||||
Nickname string `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname,omitempty"` //nickname
|
||||
@@ -697,11 +697,11 @@ func (x *SearchUsersReq) GetLimit() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUsersReq) GetUserId() string {
|
||||
func (x *SearchUsersReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUsersReq) GetUsername() string {
|
||||
@@ -961,6 +961,9 @@ func (x *LoginReq) GetPasswd() string {
|
||||
type LoginResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
||||
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
|
||||
Id int64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -1002,10 +1005,31 @@ func (x *LoginResp) GetToken() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginResp) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginResp) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginResp) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ValidateTokenReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // JWT token
|
||||
UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // JWT token
|
||||
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -1047,18 +1071,18 @@ func (x *ValidateTokenReq) GetToken() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ValidateTokenReq) GetUserId() string {
|
||||
func (x *ValidateTokenReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type ValidateTokenResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` // token 是否有效(不在黑名单中)
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 验证失败原因
|
||||
UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
RoleType int64 `protobuf:"varint,4,opt,name=roleType,proto3" json:"roleType,omitempty"` // 用户角色
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -1108,11 +1132,11 @@ func (x *ValidateTokenResp) GetMessage() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ValidateTokenResp) GetUserId() string {
|
||||
func (x *ValidateTokenResp) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ValidateTokenResp) GetRoleType() int64 {
|
||||
@@ -1124,7 +1148,7 @@ func (x *ValidateTokenResp) GetRoleType() int64 {
|
||||
|
||||
type CheckPermissionReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` // 资源 ID
|
||||
Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` // 操作类型: read/write/delete
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -1161,11 +1185,11 @@ func (*CheckPermissionReq) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{17}
|
||||
}
|
||||
|
||||
func (x *CheckPermissionReq) GetUserId() string {
|
||||
func (x *CheckPermissionReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CheckPermissionReq) GetResource() string {
|
||||
@@ -1234,13 +1258,221 @@ func (x *CheckPermissionResp) GetMessage() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type RegisterReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
||||
Passwd string `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,omitempty"`
|
||||
Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
Vcode int32 `protobuf:"varint,4,opt,name=vcode,proto3" json:"vcode,omitempty"`
|
||||
Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
|
||||
RequestId string `protobuf:"bytes,6,opt,name=requestId,proto3" json:"requestId,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RegisterReq) Reset() {
|
||||
*x = RegisterReq{}
|
||||
mi := &file_users_proto_msgTypes[19]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RegisterReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegisterReq) ProtoMessage() {}
|
||||
|
||||
func (x *RegisterReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_users_proto_msgTypes[19]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
|
||||
func (*RegisterReq) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{19}
|
||||
}
|
||||
|
||||
func (x *RegisterReq) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RegisterReq) GetPasswd() string {
|
||||
if x != nil {
|
||||
return x.Passwd
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RegisterReq) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RegisterReq) GetVcode() int32 {
|
||||
if x != nil {
|
||||
return x.Vcode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RegisterReq) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RegisterReq) GetRequestId() string {
|
||||
if x != nil {
|
||||
return x.RequestId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RegisterResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Res string `protobuf:"bytes,1,opt,name=res,proto3" json:"res,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RegisterResp) Reset() {
|
||||
*x = RegisterResp{}
|
||||
mi := &file_users_proto_msgTypes[20]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RegisterResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegisterResp) ProtoMessage() {}
|
||||
|
||||
func (x *RegisterResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_users_proto_msgTypes[20]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.
|
||||
func (*RegisterResp) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{20}
|
||||
}
|
||||
|
||||
func (x *RegisterResp) GetRes() string {
|
||||
if x != nil {
|
||||
return x.Res
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LogoutReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LogoutReq) Reset() {
|
||||
*x = LogoutReq{}
|
||||
mi := &file_users_proto_msgTypes[21]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LogoutReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LogoutReq) ProtoMessage() {}
|
||||
|
||||
func (x *LogoutReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_users_proto_msgTypes[21]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LogoutReq.ProtoReflect.Descriptor instead.
|
||||
func (*LogoutReq) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{21}
|
||||
}
|
||||
|
||||
func (x *LogoutReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type LogoutResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LogoutResp) Reset() {
|
||||
*x = LogoutResp{}
|
||||
mi := &file_users_proto_msgTypes[22]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LogoutResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LogoutResp) ProtoMessage() {}
|
||||
|
||||
func (x *LogoutResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_users_proto_msgTypes[22]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LogoutResp.ProtoReflect.Descriptor instead.
|
||||
func (*LogoutResp) Descriptor() ([]byte, []int) {
|
||||
return file_users_proto_rawDescGZIP(), []int{22}
|
||||
}
|
||||
|
||||
var File_users_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_users_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\vusers.proto\x12\x02pb\"\xb1\x02\n" +
|
||||
"\x05Users\x12\x16\n" +
|
||||
"\x06userId\x18\x01 \x01(\tR\x06userId\x12\x1a\n" +
|
||||
"\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\x12\x16\n" +
|
||||
"\x06passwd\x18\x03 \x01(\tR\x06passwd\x12\x1a\n" +
|
||||
"\bnickname\x18\x04 \x01(\tR\bnickname\x12\x14\n" +
|
||||
@@ -1255,7 +1487,7 @@ const file_users_proto_rawDesc = "" +
|
||||
" \x01(\x03R\tupdatedAt\x12\x1c\n" +
|
||||
"\tdeletedAt\x18\v \x01(\x03R\tdeletedAt\"\xb7\x02\n" +
|
||||
"\vAddUsersReq\x12\x16\n" +
|
||||
"\x06userId\x18\x01 \x01(\tR\x06userId\x12\x1a\n" +
|
||||
"\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\x12\x16\n" +
|
||||
"\x06passwd\x18\x03 \x01(\tR\x06passwd\x12\x1a\n" +
|
||||
"\bnickname\x18\x04 \x01(\tR\bnickname\x12\x14\n" +
|
||||
@@ -1271,7 +1503,7 @@ const file_users_proto_rawDesc = "" +
|
||||
"\tdeletedAt\x18\v \x01(\x03R\tdeletedAt\"\x0e\n" +
|
||||
"\fAddUsersResp\"\xba\x02\n" +
|
||||
"\x0eUpdateUsersReq\x12\x16\n" +
|
||||
"\x06userId\x18\x01 \x01(\tR\x06userId\x12\x1a\n" +
|
||||
"\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\x12\x16\n" +
|
||||
"\x06passwd\x18\x03 \x01(\tR\x06passwd\x12\x1a\n" +
|
||||
"\bnickname\x18\x04 \x01(\tR\bnickname\x12\x14\n" +
|
||||
@@ -1296,7 +1528,7 @@ const file_users_proto_rawDesc = "" +
|
||||
"\x0eSearchUsersReq\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
|
||||
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" +
|
||||
"\x06userId\x18\x03 \x01(\tR\x06userId\x12\x1a\n" +
|
||||
"\x06userId\x18\x03 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\busername\x18\x04 \x01(\tR\busername\x12\x16\n" +
|
||||
"\x06passwd\x18\x05 \x01(\tR\x06passwd\x12\x1a\n" +
|
||||
"\bnickname\x18\x06 \x01(\tR\bnickname\x12\x14\n" +
|
||||
@@ -1318,24 +1550,40 @@ const file_users_proto_rawDesc = "" +
|
||||
"\x05users\x18\x01 \x01(\v2\t.pb.UsersR\x05users\">\n" +
|
||||
"\bLoginReq\x12\x1a\n" +
|
||||
"\busername\x18\x01 \x01(\tR\busername\x12\x16\n" +
|
||||
"\x06passwd\x18\x02 \x01(\tR\x06passwd\"!\n" +
|
||||
"\x06passwd\x18\x02 \x01(\tR\x06passwd\"c\n" +
|
||||
"\tLoginResp\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\"@\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\x12\x14\n" +
|
||||
"\x05email\x18\x03 \x01(\tR\x05email\x12\x0e\n" +
|
||||
"\x02id\x18\x04 \x01(\x03R\x02id\"@\n" +
|
||||
"\x10ValidateTokenReq\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12\x16\n" +
|
||||
"\x06userId\x18\x02 \x01(\tR\x06userId\"w\n" +
|
||||
"\x06userId\x18\x02 \x01(\x03R\x06userId\"w\n" +
|
||||
"\x11ValidateTokenResp\x12\x14\n" +
|
||||
"\x05valid\x18\x01 \x01(\bR\x05valid\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\x12\x16\n" +
|
||||
"\x06userId\x18\x03 \x01(\tR\x06userId\x12\x1a\n" +
|
||||
"\x06userId\x18\x03 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\broleType\x18\x04 \x01(\x03R\broleType\"`\n" +
|
||||
"\x12CheckPermissionReq\x12\x16\n" +
|
||||
"\x06userId\x18\x01 \x01(\tR\x06userId\x12\x1a\n" +
|
||||
"\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\bresource\x18\x02 \x01(\tR\bresource\x12\x16\n" +
|
||||
"\x06action\x18\x03 \x01(\tR\x06action\"I\n" +
|
||||
"\x13CheckPermissionResp\x12\x18\n" +
|
||||
"\aallowed\x18\x01 \x01(\bR\aallowed\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage2\x87\x04\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\"\xa1\x01\n" +
|
||||
"\vRegisterReq\x12\x1a\n" +
|
||||
"\busername\x18\x01 \x01(\tR\busername\x12\x16\n" +
|
||||
"\x06passwd\x18\x02 \x01(\tR\x06passwd\x12\x14\n" +
|
||||
"\x05phone\x18\x03 \x01(\tR\x05phone\x12\x14\n" +
|
||||
"\x05vcode\x18\x04 \x01(\x05R\x05vcode\x12\x14\n" +
|
||||
"\x05email\x18\x05 \x01(\tR\x05email\x12\x1c\n" +
|
||||
"\trequestId\x18\x06 \x01(\tR\trequestId\" \n" +
|
||||
"\fRegisterResp\x12\x10\n" +
|
||||
"\x03res\x18\x01 \x01(\tR\x03res\"#\n" +
|
||||
"\tLogoutReq\x12\x16\n" +
|
||||
"\x06userId\x18\x01 \x01(\x03R\x06userId\"\f\n" +
|
||||
"\n" +
|
||||
"LogoutResp2\xdf\x04\n" +
|
||||
"\n" +
|
||||
"usercenter\x12-\n" +
|
||||
"\bAddUsers\x12\x0f.pb.AddUsersReq\x1a\x10.pb.AddUsersResp\x126\n" +
|
||||
@@ -1344,9 +1592,11 @@ const file_users_proto_rawDesc = "" +
|
||||
"\fGetUsersById\x12\x13.pb.GetUsersByIdReq\x1a\x14.pb.GetUsersByIdResp\x12H\n" +
|
||||
"\x11GetUserByUsername\x12\x18.pb.GetUserByUsernameReq\x1a\x19.pb.GetUserByUsernameResp\x126\n" +
|
||||
"\vSearchUsers\x12\x12.pb.SearchUsersReq\x1a\x13.pb.SearchUsersResp\x12$\n" +
|
||||
"\x05Login\x12\f.pb.LoginReq\x1a\r.pb.LoginResp\x12<\n" +
|
||||
"\x05Login\x12\f.pb.LoginReq\x1a\r.pb.LoginResp\x12-\n" +
|
||||
"\bRegister\x12\x0f.pb.RegisterReq\x1a\x10.pb.RegisterResp\x12<\n" +
|
||||
"\rValidateToken\x12\x14.pb.ValidateTokenReq\x1a\x15.pb.ValidateTokenResp\x12B\n" +
|
||||
"\x0fCheckPermission\x12\x16.pb.CheckPermissionReq\x1a\x17.pb.CheckPermissionRespB\x06Z\x04./pbb\x06proto3"
|
||||
"\x0fCheckPermission\x12\x16.pb.CheckPermissionReq\x1a\x17.pb.CheckPermissionResp\x12'\n" +
|
||||
"\x06Logout\x12\r.pb.LogoutReq\x1a\x0e.pb.LogoutRespB\x06Z\x04./pbb\x06proto3"
|
||||
|
||||
var (
|
||||
file_users_proto_rawDescOnce sync.Once
|
||||
@@ -1360,7 +1610,7 @@ func file_users_proto_rawDescGZIP() []byte {
|
||||
return file_users_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_users_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
|
||||
var file_users_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
|
||||
var file_users_proto_goTypes = []any{
|
||||
(*Users)(nil), // 0: pb.Users
|
||||
(*AddUsersReq)(nil), // 1: pb.AddUsersReq
|
||||
@@ -1381,6 +1631,10 @@ var file_users_proto_goTypes = []any{
|
||||
(*ValidateTokenResp)(nil), // 16: pb.ValidateTokenResp
|
||||
(*CheckPermissionReq)(nil), // 17: pb.CheckPermissionReq
|
||||
(*CheckPermissionResp)(nil), // 18: pb.CheckPermissionResp
|
||||
(*RegisterReq)(nil), // 19: pb.RegisterReq
|
||||
(*RegisterResp)(nil), // 20: pb.RegisterResp
|
||||
(*LogoutReq)(nil), // 21: pb.LogoutReq
|
||||
(*LogoutResp)(nil), // 22: pb.LogoutResp
|
||||
}
|
||||
var file_users_proto_depIdxs = []int32{
|
||||
0, // 0: pb.GetUsersByIdResp.users:type_name -> pb.Users
|
||||
@@ -1393,19 +1647,23 @@ var file_users_proto_depIdxs = []int32{
|
||||
11, // 7: pb.usercenter.GetUserByUsername:input_type -> pb.GetUserByUsernameReq
|
||||
9, // 8: pb.usercenter.SearchUsers:input_type -> pb.SearchUsersReq
|
||||
13, // 9: pb.usercenter.Login:input_type -> pb.LoginReq
|
||||
15, // 10: pb.usercenter.ValidateToken:input_type -> pb.ValidateTokenReq
|
||||
17, // 11: pb.usercenter.CheckPermission:input_type -> pb.CheckPermissionReq
|
||||
2, // 12: pb.usercenter.AddUsers:output_type -> pb.AddUsersResp
|
||||
4, // 13: pb.usercenter.UpdateUsers:output_type -> pb.UpdateUsersResp
|
||||
6, // 14: pb.usercenter.DelUsers:output_type -> pb.DelUsersResp
|
||||
8, // 15: pb.usercenter.GetUsersById:output_type -> pb.GetUsersByIdResp
|
||||
12, // 16: pb.usercenter.GetUserByUsername:output_type -> pb.GetUserByUsernameResp
|
||||
10, // 17: pb.usercenter.SearchUsers:output_type -> pb.SearchUsersResp
|
||||
14, // 18: pb.usercenter.Login:output_type -> pb.LoginResp
|
||||
16, // 19: pb.usercenter.ValidateToken:output_type -> pb.ValidateTokenResp
|
||||
18, // 20: pb.usercenter.CheckPermission:output_type -> pb.CheckPermissionResp
|
||||
12, // [12:21] is the sub-list for method output_type
|
||||
3, // [3:12] is the sub-list for method input_type
|
||||
19, // 10: pb.usercenter.Register:input_type -> pb.RegisterReq
|
||||
15, // 11: pb.usercenter.ValidateToken:input_type -> pb.ValidateTokenReq
|
||||
17, // 12: pb.usercenter.CheckPermission:input_type -> pb.CheckPermissionReq
|
||||
21, // 13: pb.usercenter.Logout:input_type -> pb.LogoutReq
|
||||
2, // 14: pb.usercenter.AddUsers:output_type -> pb.AddUsersResp
|
||||
4, // 15: pb.usercenter.UpdateUsers:output_type -> pb.UpdateUsersResp
|
||||
6, // 16: pb.usercenter.DelUsers:output_type -> pb.DelUsersResp
|
||||
8, // 17: pb.usercenter.GetUsersById:output_type -> pb.GetUsersByIdResp
|
||||
12, // 18: pb.usercenter.GetUserByUsername:output_type -> pb.GetUserByUsernameResp
|
||||
10, // 19: pb.usercenter.SearchUsers:output_type -> pb.SearchUsersResp
|
||||
14, // 20: pb.usercenter.Login:output_type -> pb.LoginResp
|
||||
20, // 21: pb.usercenter.Register:output_type -> pb.RegisterResp
|
||||
16, // 22: pb.usercenter.ValidateToken:output_type -> pb.ValidateTokenResp
|
||||
18, // 23: pb.usercenter.CheckPermission:output_type -> pb.CheckPermissionResp
|
||||
22, // 24: pb.usercenter.Logout:output_type -> pb.LogoutResp
|
||||
14, // [14:25] is the sub-list for method output_type
|
||||
3, // [3:14] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
@@ -1422,7 +1680,7 @@ func file_users_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_users_proto_rawDesc), len(file_users_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 19,
|
||||
NumMessages: 23,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user