feat(app): 添加C端用户管理相关接口和消息定义
- 新增C端用户分页查询、详情获取、强制登出、修改密码、修改信息、修改头像及修改状态接口 - 定义UpdateUserAvatarReq和UpdateUserPcPasswordReq消息结构 - 更新App服务接口,增加对应的gRPC方法声明和实现 - 扩展用户相关的proto消息类型索引和依赖关系 - 在app.go中暴露新添加的用户管理方法
This commit is contained in:
parent
c3406ce964
commit
884df461f1
|
|
@ -131,8 +131,6 @@ type (
|
||||||
Data []UserInfo `json:"data"`
|
Data []UserInfo `json:"data"`
|
||||||
}
|
}
|
||||||
OauthAuthorizeReq {}
|
OauthAuthorizeReq {}
|
||||||
|
|
||||||
|
|
||||||
OauthAuthorizeResp {
|
OauthAuthorizeResp {
|
||||||
BaseMsgResp
|
BaseMsgResp
|
||||||
}
|
}
|
||||||
|
|
@ -142,9 +140,6 @@ type (
|
||||||
// Password
|
// Password
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
|
|
@ -187,7 +182,7 @@ service App {
|
||||||
|
|
||||||
// Logout | 退出登录 不传参数,默认使用请求头的token
|
// Logout | 退出登录 不传参数,默认使用请求头的token
|
||||||
@handler logout
|
@handler logout
|
||||||
post /user/logout () returns (BaseMsgResp)
|
post /user/logout returns (BaseMsgResp)
|
||||||
|
|
||||||
// PassWordReset | 修改密码
|
// PassWordReset | 修改密码
|
||||||
@handler passWordReset
|
@handler passWordReset
|
||||||
|
|
@ -200,7 +195,5 @@ service App {
|
||||||
//OauthAuthorize | 第三方登录接口
|
//OauthAuthorize | 第三方登录接口
|
||||||
@handler oauthAuthorize
|
@handler oauthAuthorize
|
||||||
post /user/oauthAuthorize (OauthAuthorizeReq) returns (OauthAuthorizeResp)
|
post /user/oauthAuthorize (OauthAuthorizeReq) returns (OauthAuthorizeResp)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,10 @@ message UUIDsReq {
|
||||||
repeated string ids = 1;
|
repeated string ids = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message UpdateUserAvatarReq {}
|
||||||
|
|
||||||
|
message UpdateUserPcPasswordReq {}
|
||||||
|
|
||||||
message UserInfo {
|
message UserInfo {
|
||||||
optional uint64 id = 1;
|
optional uint64 id = 1;
|
||||||
optional string username = 2;
|
optional string username = 2;
|
||||||
|
|
@ -233,5 +237,26 @@ service App {
|
||||||
rpc LogoutUser(UserToken) returns (LogoutUserRequest);
|
rpc LogoutUser(UserToken) returns (LogoutUserRequest);
|
||||||
// group: base
|
// group: base
|
||||||
rpc InitDatabase(Empty) returns (BaseResp);
|
rpc InitDatabase(Empty) returns (BaseResp);
|
||||||
|
// C端用户分页查询
|
||||||
|
// group: user
|
||||||
|
rpc queryUserPagePc(PageUserRequest) returns (PageUserResponse);
|
||||||
|
// C端用户详情
|
||||||
|
// group: user
|
||||||
|
rpc getUserPc(IDReq) returns (UserInfo);
|
||||||
|
// C端用户强制登出
|
||||||
|
// group: user
|
||||||
|
rpc forceLogoutPc(IDReq) returns (BaseResp);
|
||||||
|
// C端用户修改密码
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcPassword(UpdateUserPcPasswordReq) returns (BaseResp);
|
||||||
|
// C端用户修改信息
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcInfo(UserInfo) returns (BaseResp);
|
||||||
|
// C端用户修改头像
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcAvatar(UpdateUserAvatarReq) returns (BaseResp);
|
||||||
|
// C端用户修改状态
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcStatus(IDReq) returns (BaseResp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,168 @@
|
||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
// Source: app.proto
|
||||||
|
|
||||||
|
package app
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
AuthInfoResp = pc.AuthInfoResp
|
||||||
|
AuthReq = pc.AuthReq
|
||||||
|
AuthToken = pc.AuthToken
|
||||||
|
BaseIDResp = pc.BaseIDResp
|
||||||
|
BaseMsg = pc.BaseMsg
|
||||||
|
BaseResp = pc.BaseResp
|
||||||
|
BaseUUIDResp = pc.BaseUUIDResp
|
||||||
|
ClaimStrings = pc.ClaimStrings
|
||||||
|
Empty = pc.Empty
|
||||||
|
IDReq = pc.IDReq
|
||||||
|
IDsReq = pc.IDsReq
|
||||||
|
LoginRequest = pc.LoginRequest
|
||||||
|
LoginResponse = pc.LoginResponse
|
||||||
|
LogoutUserRequest = pc.LogoutUserRequest
|
||||||
|
NumericDate = pc.NumericDate
|
||||||
|
PageInfoReq = pc.PageInfoReq
|
||||||
|
PageUserRequest = pc.PageUserRequest
|
||||||
|
PageUserResponse = pc.PageUserResponse
|
||||||
|
RegisterUserRequest = pc.RegisterUserRequest
|
||||||
|
RegisterUserResponse = pc.RegisterUserResponse
|
||||||
|
RegisteredClaims = pc.RegisteredClaims
|
||||||
|
UUIDReq = pc.UUIDReq
|
||||||
|
UUIDsReq = pc.UUIDsReq
|
||||||
|
UpdateUserAvatarReq = pc.UpdateUserAvatarReq
|
||||||
|
UpdateUserPcPasswordReq = pc.UpdateUserPcPasswordReq
|
||||||
|
UserInfo = pc.UserInfo
|
||||||
|
UserToken = pc.UserToken
|
||||||
|
VerifyCodeReq = pc.VerifyCodeReq
|
||||||
|
VerifyCodeResp = pc.VerifyCodeResp
|
||||||
|
|
||||||
|
App interface {
|
||||||
|
// 校验token
|
||||||
|
AuthToken(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthInfoResp, error)
|
||||||
|
// 获取验证码
|
||||||
|
GetVerifyCode(ctx context.Context, in *VerifyCodeReq, opts ...grpc.CallOption) (*VerifyCodeResp, error)
|
||||||
|
// 用户注册
|
||||||
|
RegisterUser(ctx context.Context, in *RegisterUserRequest, opts ...grpc.CallOption) (*RegisterUserResponse, error)
|
||||||
|
// 用户登录
|
||||||
|
LoginUser(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
||||||
|
// 分页查询用户信息
|
||||||
|
ListUsers(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error)
|
||||||
|
// 用户退出登录
|
||||||
|
LogoutUser(ctx context.Context, in *UserToken, opts ...grpc.CallOption) (*LogoutUserRequest, error)
|
||||||
|
InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户分页查询
|
||||||
|
QueryUserPagePc(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error)
|
||||||
|
// C端用户详情
|
||||||
|
GetUserPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*UserInfo, error)
|
||||||
|
// C端用户强制登出
|
||||||
|
ForceLogoutPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改密码
|
||||||
|
UpdateUserPcPassword(ctx context.Context, in *UpdateUserPcPasswordReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改信息
|
||||||
|
UpdateUserPcInfo(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改头像
|
||||||
|
UpdateUserPcAvatar(ctx context.Context, in *UpdateUserAvatarReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改状态
|
||||||
|
UpdateUserPcStatus(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultApp struct {
|
||||||
|
cli zrpc.Client
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewApp(cli zrpc.Client) App {
|
||||||
|
return &defaultApp{
|
||||||
|
cli: cli,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验token
|
||||||
|
func (m *defaultApp) AuthToken(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthInfoResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.AuthToken(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取验证码
|
||||||
|
func (m *defaultApp) GetVerifyCode(ctx context.Context, in *VerifyCodeReq, opts ...grpc.CallOption) (*VerifyCodeResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.GetVerifyCode(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户注册
|
||||||
|
func (m *defaultApp) RegisterUser(ctx context.Context, in *RegisterUserRequest, opts ...grpc.CallOption) (*RegisterUserResponse, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.RegisterUser(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户登录
|
||||||
|
func (m *defaultApp) LoginUser(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.LoginUser(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页查询用户信息
|
||||||
|
func (m *defaultApp) ListUsers(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.ListUsers(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户退出登录
|
||||||
|
func (m *defaultApp) LogoutUser(ctx context.Context, in *UserToken, opts ...grpc.CallOption) (*LogoutUserRequest, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.LogoutUser(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultApp) InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.InitDatabase(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户分页查询
|
||||||
|
func (m *defaultApp) QueryUserPagePc(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.QueryUserPagePc(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户详情
|
||||||
|
func (m *defaultApp) GetUserPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*UserInfo, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.GetUserPc(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户强制登出
|
||||||
|
func (m *defaultApp) ForceLogoutPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.ForceLogoutPc(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改密码
|
||||||
|
func (m *defaultApp) UpdateUserPcPassword(ctx context.Context, in *UpdateUserPcPasswordReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcPassword(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改信息
|
||||||
|
func (m *defaultApp) UpdateUserPcInfo(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcInfo(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改头像
|
||||||
|
func (m *defaultApp) UpdateUserPcAvatar(ctx context.Context, in *UpdateUserAvatarReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcAvatar(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改状态
|
||||||
|
func (m *defaultApp) UpdateUserPcStatus(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := pc.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcStatus(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
@ -36,6 +36,8 @@ type (
|
||||||
RegisteredClaims = app.RegisteredClaims
|
RegisteredClaims = app.RegisteredClaims
|
||||||
UUIDReq = app.UUIDReq
|
UUIDReq = app.UUIDReq
|
||||||
UUIDsReq = app.UUIDsReq
|
UUIDsReq = app.UUIDsReq
|
||||||
|
UpdateUserAvatarReq = app.UpdateUserAvatarReq
|
||||||
|
UpdateUserPcPasswordReq = app.UpdateUserPcPasswordReq
|
||||||
UserInfo = app.UserInfo
|
UserInfo = app.UserInfo
|
||||||
UserToken = app.UserToken
|
UserToken = app.UserToken
|
||||||
VerifyCodeReq = app.VerifyCodeReq
|
VerifyCodeReq = app.VerifyCodeReq
|
||||||
|
|
@ -55,6 +57,20 @@ type (
|
||||||
// 用户退出登录
|
// 用户退出登录
|
||||||
LogoutUser(ctx context.Context, in *UserToken, opts ...grpc.CallOption) (*LogoutUserRequest, error)
|
LogoutUser(ctx context.Context, in *UserToken, opts ...grpc.CallOption) (*LogoutUserRequest, error)
|
||||||
InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error)
|
InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户分页查询
|
||||||
|
QueryUserPagePc(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error)
|
||||||
|
// C端用户详情
|
||||||
|
GetUserPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*UserInfo, error)
|
||||||
|
// C端用户强制登出
|
||||||
|
ForceLogoutPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改密码
|
||||||
|
UpdateUserPcPassword(ctx context.Context, in *UpdateUserPcPasswordReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改信息
|
||||||
|
UpdateUserPcInfo(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改头像
|
||||||
|
UpdateUserPcAvatar(ctx context.Context, in *UpdateUserAvatarReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改状态
|
||||||
|
UpdateUserPcStatus(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultApp struct {
|
defaultApp struct {
|
||||||
|
|
@ -108,3 +124,45 @@ func (m *defaultApp) InitDatabase(ctx context.Context, in *Empty, opts ...grpc.C
|
||||||
client := app.NewAppClient(m.cli.Conn())
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
return client.InitDatabase(ctx, in, opts...)
|
return client.InitDatabase(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// C端用户分页查询
|
||||||
|
func (m *defaultApp) QueryUserPagePc(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error) {
|
||||||
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
|
return client.QueryUserPagePc(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户详情
|
||||||
|
func (m *defaultApp) GetUserPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*UserInfo, error) {
|
||||||
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
|
return client.GetUserPc(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户强制登出
|
||||||
|
func (m *defaultApp) ForceLogoutPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
|
return client.ForceLogoutPc(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改密码
|
||||||
|
func (m *defaultApp) UpdateUserPcPassword(ctx context.Context, in *UpdateUserPcPasswordReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcPassword(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改信息
|
||||||
|
func (m *defaultApp) UpdateUserPcInfo(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcInfo(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改头像
|
||||||
|
func (m *defaultApp) UpdateUserPcAvatar(ctx context.Context, in *UpdateUserAvatarReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcAvatar(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改状态
|
||||||
|
func (m *defaultApp) UpdateUserPcStatus(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
client := app.NewAppClient(m.cli.Conn())
|
||||||
|
return client.UpdateUserPcStatus(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,13 @@ message UserToken {
|
||||||
message LogoutUserRequest {
|
message LogoutUserRequest {
|
||||||
string access_token = 1;
|
string access_token = 1;
|
||||||
}
|
}
|
||||||
|
message UpdateUserPcPasswordReq{
|
||||||
|
|
||||||
|
}
|
||||||
|
message UpdateUserAvatarReq{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// App 服务定义
|
// App 服务定义
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package app;
|
||||||
|
option go_package = "./app";
|
||||||
|
import "google/protobuf/struct.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// PC端 服务定义
|
||||||
|
service App {
|
||||||
|
// C端用户分页查询
|
||||||
|
// group: user
|
||||||
|
rpc queryUserPagePc(PageUserRequest) returns (PageUserResponse);
|
||||||
|
// C端用户详情
|
||||||
|
// group: user
|
||||||
|
rpc getUserPc(IDReq) returns (UserInfo);
|
||||||
|
// C端用户强制登出
|
||||||
|
// group: user
|
||||||
|
rpc forceLogoutPc(IDReq) returns (BaseResp);
|
||||||
|
// C端用户修改密码
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcPassword(UpdateUserPcPasswordReq) returns (BaseResp);
|
||||||
|
// C端用户修改信息
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcInfo(UserInfo) returns (BaseResp);
|
||||||
|
// C端用户修改头像
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcAvatar(UpdateUserAvatarReq) returns (BaseResp);
|
||||||
|
// C端用户修改状态
|
||||||
|
// group: user
|
||||||
|
rpc updateUserPcStatus(IDReq) returns (BaseResp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/internal/svc"
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ForceLogoutPcLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewForceLogoutPcLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ForceLogoutPcLogic {
|
||||||
|
return &ForceLogoutPcLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户强制登出
|
||||||
|
func (l *ForceLogoutPcLogic) ForceLogoutPc(in *app.IDReq) (*app.BaseResp, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &app.BaseResp{}, nil
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/internal/svc"
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetUserPcLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetUserPcLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserPcLogic {
|
||||||
|
return &GetUserPcLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户详情
|
||||||
|
func (l *GetUserPcLogic) GetUserPc(in *app.IDReq) (*app.UserInfo, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &app.UserInfo{}, nil
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/internal/svc"
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type QueryUserPagePcLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewQueryUserPagePcLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryUserPagePcLogic {
|
||||||
|
return &QueryUserPagePcLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户分页查询
|
||||||
|
func (l *QueryUserPagePcLogic) QueryUserPagePc(in *app.PageUserRequest) (*app.PageUserResponse, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &app.PageUserResponse{}, nil
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/internal/svc"
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UpdateUserPcAvatarLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewUpdateUserPcAvatarLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserPcAvatarLogic {
|
||||||
|
return &UpdateUserPcAvatarLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改头像
|
||||||
|
func (l *UpdateUserPcAvatarLogic) UpdateUserPcAvatar(in *app.UpdateUserAvatarReq) (*app.BaseResp, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &app.BaseResp{}, nil
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/internal/svc"
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UpdateUserPcInfoLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewUpdateUserPcInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserPcInfoLogic {
|
||||||
|
return &UpdateUserPcInfoLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改信息
|
||||||
|
func (l *UpdateUserPcInfoLogic) UpdateUserPcInfo(in *app.UserInfo) (*app.BaseResp, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &app.BaseResp{}, nil
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/internal/svc"
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UpdateUserPcPasswordLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewUpdateUserPcPasswordLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserPcPasswordLogic {
|
||||||
|
return &UpdateUserPcPasswordLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改密码
|
||||||
|
func (l *UpdateUserPcPasswordLogic) UpdateUserPcPassword(in *app.UpdateUserPcPasswordReq) (*app.BaseResp, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &app.BaseResp{}, nil
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"mingyang-admin-app-rpc/internal/svc"
|
||||||
|
"mingyang-admin-app-rpc/types/app"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UpdateUserPcStatusLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewUpdateUserPcStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserPcStatusLogic {
|
||||||
|
return &UpdateUserPcStatusLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改状态
|
||||||
|
func (l *UpdateUserPcStatusLogic) UpdateUserPcStatus(in *app.IDReq) (*app.BaseResp, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &app.BaseResp{}, nil
|
||||||
|
}
|
||||||
|
|
@ -65,3 +65,45 @@ func (s *AppServer) InitDatabase(ctx context.Context, in *app.Empty) (*app.BaseR
|
||||||
l := base.NewInitDatabaseLogic(ctx, s.svcCtx)
|
l := base.NewInitDatabaseLogic(ctx, s.svcCtx)
|
||||||
return l.InitDatabase(in)
|
return l.InitDatabase(in)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// C端用户分页查询
|
||||||
|
func (s *AppServer) QueryUserPagePc(ctx context.Context, in *app.PageUserRequest) (*app.PageUserResponse, error) {
|
||||||
|
l := user.NewQueryUserPagePcLogic(ctx, s.svcCtx)
|
||||||
|
return l.QueryUserPagePc(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户详情
|
||||||
|
func (s *AppServer) GetUserPc(ctx context.Context, in *app.IDReq) (*app.UserInfo, error) {
|
||||||
|
l := user.NewGetUserPcLogic(ctx, s.svcCtx)
|
||||||
|
return l.GetUserPc(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户强制登出
|
||||||
|
func (s *AppServer) ForceLogoutPc(ctx context.Context, in *app.IDReq) (*app.BaseResp, error) {
|
||||||
|
l := user.NewForceLogoutPcLogic(ctx, s.svcCtx)
|
||||||
|
return l.ForceLogoutPc(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改密码
|
||||||
|
func (s *AppServer) UpdateUserPcPassword(ctx context.Context, in *app.UpdateUserPcPasswordReq) (*app.BaseResp, error) {
|
||||||
|
l := user.NewUpdateUserPcPasswordLogic(ctx, s.svcCtx)
|
||||||
|
return l.UpdateUserPcPassword(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改信息
|
||||||
|
func (s *AppServer) UpdateUserPcInfo(ctx context.Context, in *app.UserInfo) (*app.BaseResp, error) {
|
||||||
|
l := user.NewUpdateUserPcInfoLogic(ctx, s.svcCtx)
|
||||||
|
return l.UpdateUserPcInfo(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改头像
|
||||||
|
func (s *AppServer) UpdateUserPcAvatar(ctx context.Context, in *app.UpdateUserAvatarReq) (*app.BaseResp, error) {
|
||||||
|
l := user.NewUpdateUserPcAvatarLogic(ctx, s.svcCtx)
|
||||||
|
return l.UpdateUserPcAvatar(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// C端用户修改状态
|
||||||
|
func (s *AppServer) UpdateUserPcStatus(ctx context.Context, in *app.IDReq) (*app.BaseResp, error) {
|
||||||
|
l := user.NewUpdateUserPcStatusLogic(ctx, s.svcCtx)
|
||||||
|
return l.UpdateUserPcStatus(in)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1478,6 +1478,78 @@ func (x *UUIDsReq) GetIds() []string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UpdateUserAvatarReq struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateUserAvatarReq) Reset() {
|
||||||
|
*x = UpdateUserAvatarReq{}
|
||||||
|
mi := &file_app_proto_msgTypes[23]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateUserAvatarReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateUserAvatarReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UpdateUserAvatarReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_app_proto_msgTypes[23]
|
||||||
|
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 UpdateUserAvatarReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UpdateUserAvatarReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_app_proto_rawDescGZIP(), []int{23}
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateUserPcPasswordReq struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateUserPcPasswordReq) Reset() {
|
||||||
|
*x = UpdateUserPcPasswordReq{}
|
||||||
|
mi := &file_app_proto_msgTypes[24]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateUserPcPasswordReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateUserPcPasswordReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UpdateUserPcPasswordReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_app_proto_msgTypes[24]
|
||||||
|
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 UpdateUserPcPasswordReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UpdateUserPcPasswordReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_app_proto_rawDescGZIP(), []int{24}
|
||||||
|
}
|
||||||
|
|
||||||
type UserInfo struct {
|
type UserInfo struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Id *uint64 `protobuf:"varint,1,opt,name=id,proto3,oneof" json:"id"`
|
Id *uint64 `protobuf:"varint,1,opt,name=id,proto3,oneof" json:"id"`
|
||||||
|
|
@ -1508,7 +1580,7 @@ type UserInfo struct {
|
||||||
|
|
||||||
func (x *UserInfo) Reset() {
|
func (x *UserInfo) Reset() {
|
||||||
*x = UserInfo{}
|
*x = UserInfo{}
|
||||||
mi := &file_app_proto_msgTypes[23]
|
mi := &file_app_proto_msgTypes[25]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -1520,7 +1592,7 @@ func (x *UserInfo) String() string {
|
||||||
func (*UserInfo) ProtoMessage() {}
|
func (*UserInfo) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UserInfo) ProtoReflect() protoreflect.Message {
|
func (x *UserInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proto_msgTypes[23]
|
mi := &file_app_proto_msgTypes[25]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -1533,7 +1605,7 @@ func (x *UserInfo) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.
|
||||||
func (*UserInfo) Descriptor() ([]byte, []int) {
|
func (*UserInfo) Descriptor() ([]byte, []int) {
|
||||||
return file_app_proto_rawDescGZIP(), []int{23}
|
return file_app_proto_rawDescGZIP(), []int{25}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserInfo) GetId() uint64 {
|
func (x *UserInfo) GetId() uint64 {
|
||||||
|
|
@ -1700,7 +1772,7 @@ type UserToken struct {
|
||||||
|
|
||||||
func (x *UserToken) Reset() {
|
func (x *UserToken) Reset() {
|
||||||
*x = UserToken{}
|
*x = UserToken{}
|
||||||
mi := &file_app_proto_msgTypes[24]
|
mi := &file_app_proto_msgTypes[26]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -1712,7 +1784,7 @@ func (x *UserToken) String() string {
|
||||||
func (*UserToken) ProtoMessage() {}
|
func (*UserToken) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UserToken) ProtoReflect() protoreflect.Message {
|
func (x *UserToken) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proto_msgTypes[24]
|
mi := &file_app_proto_msgTypes[26]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -1725,7 +1797,7 @@ func (x *UserToken) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use UserToken.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UserToken.ProtoReflect.Descriptor instead.
|
||||||
func (*UserToken) Descriptor() ([]byte, []int) {
|
func (*UserToken) Descriptor() ([]byte, []int) {
|
||||||
return file_app_proto_rawDescGZIP(), []int{24}
|
return file_app_proto_rawDescGZIP(), []int{26}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserToken) GetAccessToken() string {
|
func (x *UserToken) GetAccessToken() string {
|
||||||
|
|
@ -1753,7 +1825,7 @@ type VerifyCodeReq struct {
|
||||||
|
|
||||||
func (x *VerifyCodeReq) Reset() {
|
func (x *VerifyCodeReq) Reset() {
|
||||||
*x = VerifyCodeReq{}
|
*x = VerifyCodeReq{}
|
||||||
mi := &file_app_proto_msgTypes[25]
|
mi := &file_app_proto_msgTypes[27]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -1765,7 +1837,7 @@ func (x *VerifyCodeReq) String() string {
|
||||||
func (*VerifyCodeReq) ProtoMessage() {}
|
func (*VerifyCodeReq) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *VerifyCodeReq) ProtoReflect() protoreflect.Message {
|
func (x *VerifyCodeReq) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proto_msgTypes[25]
|
mi := &file_app_proto_msgTypes[27]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -1778,7 +1850,7 @@ func (x *VerifyCodeReq) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use VerifyCodeReq.ProtoReflect.Descriptor instead.
|
// Deprecated: Use VerifyCodeReq.ProtoReflect.Descriptor instead.
|
||||||
func (*VerifyCodeReq) Descriptor() ([]byte, []int) {
|
func (*VerifyCodeReq) Descriptor() ([]byte, []int) {
|
||||||
return file_app_proto_rawDescGZIP(), []int{25}
|
return file_app_proto_rawDescGZIP(), []int{27}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *VerifyCodeReq) GetType() VerifyCodeType {
|
func (x *VerifyCodeReq) GetType() VerifyCodeType {
|
||||||
|
|
@ -1812,7 +1884,7 @@ type VerifyCodeResp struct {
|
||||||
|
|
||||||
func (x *VerifyCodeResp) Reset() {
|
func (x *VerifyCodeResp) Reset() {
|
||||||
*x = VerifyCodeResp{}
|
*x = VerifyCodeResp{}
|
||||||
mi := &file_app_proto_msgTypes[26]
|
mi := &file_app_proto_msgTypes[28]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -1824,7 +1896,7 @@ func (x *VerifyCodeResp) String() string {
|
||||||
func (*VerifyCodeResp) ProtoMessage() {}
|
func (*VerifyCodeResp) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *VerifyCodeResp) ProtoReflect() protoreflect.Message {
|
func (x *VerifyCodeResp) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_app_proto_msgTypes[26]
|
mi := &file_app_proto_msgTypes[28]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -1837,7 +1909,7 @@ func (x *VerifyCodeResp) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use VerifyCodeResp.ProtoReflect.Descriptor instead.
|
// Deprecated: Use VerifyCodeResp.ProtoReflect.Descriptor instead.
|
||||||
func (*VerifyCodeResp) Descriptor() ([]byte, []int) {
|
func (*VerifyCodeResp) Descriptor() ([]byte, []int) {
|
||||||
return file_app_proto_rawDescGZIP(), []int{26}
|
return file_app_proto_rawDescGZIP(), []int{28}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *VerifyCodeResp) GetCaptchaCode() string {
|
func (x *VerifyCodeResp) GetCaptchaCode() string {
|
||||||
|
|
@ -1971,7 +2043,9 @@ const file_app_proto_rawDesc = "" +
|
||||||
"\aUUIDReq\x12\x0e\n" +
|
"\aUUIDReq\x12\x0e\n" +
|
||||||
"\x02id\x18\x01 \x01(\tR\x02id\"\x1c\n" +
|
"\x02id\x18\x01 \x01(\tR\x02id\"\x1c\n" +
|
||||||
"\bUUIDsReq\x12\x10\n" +
|
"\bUUIDsReq\x12\x10\n" +
|
||||||
"\x03ids\x18\x01 \x03(\tR\x03ids\"\x91\t\n" +
|
"\x03ids\x18\x01 \x03(\tR\x03ids\"\x15\n" +
|
||||||
|
"\x13UpdateUserAvatarReq\"\x19\n" +
|
||||||
|
"\x17UpdateUserPcPasswordReq\"\x91\t\n" +
|
||||||
"\bUserInfo\x12\x13\n" +
|
"\bUserInfo\x12\x13\n" +
|
||||||
"\x02id\x18\x01 \x01(\x04H\x00R\x02id\x88\x01\x01\x12\x1f\n" +
|
"\x02id\x18\x01 \x01(\x04H\x00R\x02id\x88\x01\x01\x12\x1f\n" +
|
||||||
"\busername\x18\x02 \x01(\tH\x01R\busername\x88\x01\x01\x12\x19\n" +
|
"\busername\x18\x02 \x01(\tH\x01R\busername\x88\x01\x01\x12\x19\n" +
|
||||||
|
|
@ -2048,7 +2122,7 @@ const file_app_proto_rawDesc = "" +
|
||||||
"\fUPDATE_PHONE\x10\x05\x12\x10\n" +
|
"\fUPDATE_PHONE\x10\x05\x12\x10\n" +
|
||||||
"\fUPDATE_EMAIL\x10\x06\x12\f\n" +
|
"\fUPDATE_EMAIL\x10\x06\x12\f\n" +
|
||||||
"\bWITHDRAW\x10\a\x12\x17\n" +
|
"\bWITHDRAW\x10\a\x12\x17\n" +
|
||||||
"\x13CHANGE_PAY_PASSWORD\x10\b2\x81\x03\n" +
|
"\x13CHANGE_PAY_PASSWORD\x10\b2\xfc\x05\n" +
|
||||||
"\x03App\x12,\n" +
|
"\x03App\x12,\n" +
|
||||||
"\tAuthToken\x12\f.app.AuthReq\x1a\x11.app.AuthInfoResp\x128\n" +
|
"\tAuthToken\x12\f.app.AuthReq\x1a\x11.app.AuthInfoResp\x128\n" +
|
||||||
"\rGetVerifyCode\x12\x12.app.VerifyCodeReq\x1a\x13.app.VerifyCodeResp\x12C\n" +
|
"\rGetVerifyCode\x12\x12.app.VerifyCodeReq\x1a\x13.app.VerifyCodeResp\x12C\n" +
|
||||||
|
|
@ -2058,7 +2132,17 @@ const file_app_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"LogoutUser\x12\x0e.app.UserToken\x1a\x16.app.LogoutUserRequest\x12)\n" +
|
"LogoutUser\x12\x0e.app.UserToken\x1a\x16.app.LogoutUserRequest\x12)\n" +
|
||||||
"\fInitDatabase\x12\n" +
|
"\fInitDatabase\x12\n" +
|
||||||
".app.Empty\x1a\r.app.BaseRespB\aZ\x05./appb\x06proto3"
|
".app.Empty\x1a\r.app.BaseResp\x12>\n" +
|
||||||
|
"\x0fqueryUserPagePc\x12\x14.app.PageUserRequest\x1a\x15.app.PageUserResponse\x12&\n" +
|
||||||
|
"\tgetUserPc\x12\n" +
|
||||||
|
".app.IDReq\x1a\r.app.UserInfo\x12*\n" +
|
||||||
|
"\rforceLogoutPc\x12\n" +
|
||||||
|
".app.IDReq\x1a\r.app.BaseResp\x12C\n" +
|
||||||
|
"\x14updateUserPcPassword\x12\x1c.app.UpdateUserPcPasswordReq\x1a\r.app.BaseResp\x120\n" +
|
||||||
|
"\x10updateUserPcInfo\x12\r.app.UserInfo\x1a\r.app.BaseResp\x12=\n" +
|
||||||
|
"\x12updateUserPcAvatar\x12\x18.app.UpdateUserAvatarReq\x1a\r.app.BaseResp\x12/\n" +
|
||||||
|
"\x12updateUserPcStatus\x12\n" +
|
||||||
|
".app.IDReq\x1a\r.app.BaseRespB\aZ\x05./appb\x06proto3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_app_proto_rawDescOnce sync.Once
|
file_app_proto_rawDescOnce sync.Once
|
||||||
|
|
@ -2073,7 +2157,7 @@ func file_app_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_app_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_app_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
var file_app_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
|
var file_app_proto_msgTypes = make([]protoimpl.MessageInfo, 29)
|
||||||
var file_app_proto_goTypes = []any{
|
var file_app_proto_goTypes = []any{
|
||||||
(AccountType)(0), // 0: app.AccountType
|
(AccountType)(0), // 0: app.AccountType
|
||||||
(VerifyCodeType)(0), // 1: app.VerifyCodeType
|
(VerifyCodeType)(0), // 1: app.VerifyCodeType
|
||||||
|
|
@ -2100,47 +2184,63 @@ var file_app_proto_goTypes = []any{
|
||||||
(*RegisteredClaims)(nil), // 22: app.RegisteredClaims
|
(*RegisteredClaims)(nil), // 22: app.RegisteredClaims
|
||||||
(*UUIDReq)(nil), // 23: app.UUIDReq
|
(*UUIDReq)(nil), // 23: app.UUIDReq
|
||||||
(*UUIDsReq)(nil), // 24: app.UUIDsReq
|
(*UUIDsReq)(nil), // 24: app.UUIDsReq
|
||||||
(*UserInfo)(nil), // 25: app.UserInfo
|
(*UpdateUserAvatarReq)(nil), // 25: app.UpdateUserAvatarReq
|
||||||
(*UserToken)(nil), // 26: app.UserToken
|
(*UpdateUserPcPasswordReq)(nil), // 26: app.UpdateUserPcPasswordReq
|
||||||
(*VerifyCodeReq)(nil), // 27: app.VerifyCodeReq
|
(*UserInfo)(nil), // 27: app.UserInfo
|
||||||
(*VerifyCodeResp)(nil), // 28: app.VerifyCodeResp
|
(*UserToken)(nil), // 28: app.UserToken
|
||||||
(*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp
|
(*VerifyCodeReq)(nil), // 29: app.VerifyCodeReq
|
||||||
(*structpb.Struct)(nil), // 30: google.protobuf.Struct
|
(*VerifyCodeResp)(nil), // 30: app.VerifyCodeResp
|
||||||
|
(*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp
|
||||||
|
(*structpb.Struct)(nil), // 32: google.protobuf.Struct
|
||||||
}
|
}
|
||||||
var file_app_proto_depIdxs = []int32{
|
var file_app_proto_depIdxs = []int32{
|
||||||
22, // 0: app.AuthInfoResp.claims:type_name -> app.RegisteredClaims
|
22, // 0: app.AuthInfoResp.claims:type_name -> app.RegisteredClaims
|
||||||
29, // 1: app.AuthReq.time:type_name -> google.protobuf.Timestamp
|
31, // 1: app.AuthReq.time:type_name -> google.protobuf.Timestamp
|
||||||
29, // 2: app.AuthToken.access_token_expires:type_name -> google.protobuf.Timestamp
|
31, // 2: app.AuthToken.access_token_expires:type_name -> google.protobuf.Timestamp
|
||||||
29, // 3: app.AuthToken.refresh_token_expires:type_name -> google.protobuf.Timestamp
|
31, // 3: app.AuthToken.refresh_token_expires:type_name -> google.protobuf.Timestamp
|
||||||
25, // 4: app.LoginResponse.user:type_name -> app.UserInfo
|
27, // 4: app.LoginResponse.user:type_name -> app.UserInfo
|
||||||
4, // 5: app.LoginResponse.auth_token:type_name -> app.AuthToken
|
4, // 5: app.LoginResponse.auth_token:type_name -> app.AuthToken
|
||||||
29, // 6: app.NumericDate.timestamp:type_name -> google.protobuf.Timestamp
|
31, // 6: app.NumericDate.timestamp:type_name -> google.protobuf.Timestamp
|
||||||
25, // 7: app.PageUserResponse.data:type_name -> app.UserInfo
|
27, // 7: app.PageUserResponse.data:type_name -> app.UserInfo
|
||||||
25, // 8: app.RegisterUserResponse.user:type_name -> app.UserInfo
|
27, // 8: app.RegisterUserResponse.user:type_name -> app.UserInfo
|
||||||
4, // 9: app.RegisterUserResponse.auth_token:type_name -> app.AuthToken
|
4, // 9: app.RegisterUserResponse.auth_token:type_name -> app.AuthToken
|
||||||
9, // 10: app.RegisteredClaims.audience:type_name -> app.ClaimStrings
|
9, // 10: app.RegisteredClaims.audience:type_name -> app.ClaimStrings
|
||||||
16, // 11: app.RegisteredClaims.expires_at:type_name -> app.NumericDate
|
16, // 11: app.RegisteredClaims.expires_at:type_name -> app.NumericDate
|
||||||
16, // 12: app.RegisteredClaims.not_before:type_name -> app.NumericDate
|
16, // 12: app.RegisteredClaims.not_before:type_name -> app.NumericDate
|
||||||
16, // 13: app.RegisteredClaims.issued_at:type_name -> app.NumericDate
|
16, // 13: app.RegisteredClaims.issued_at:type_name -> app.NumericDate
|
||||||
30, // 14: app.UserInfo.metadata:type_name -> google.protobuf.Struct
|
32, // 14: app.UserInfo.metadata:type_name -> google.protobuf.Struct
|
||||||
1, // 15: app.VerifyCodeReq.type:type_name -> app.VerifyCodeType
|
1, // 15: app.VerifyCodeReq.type:type_name -> app.VerifyCodeType
|
||||||
0, // 16: app.VerifyCodeReq.account_type:type_name -> app.AccountType
|
0, // 16: app.VerifyCodeReq.account_type:type_name -> app.AccountType
|
||||||
3, // 17: app.App.AuthToken:input_type -> app.AuthReq
|
3, // 17: app.App.AuthToken:input_type -> app.AuthReq
|
||||||
27, // 18: app.App.GetVerifyCode:input_type -> app.VerifyCodeReq
|
29, // 18: app.App.GetVerifyCode:input_type -> app.VerifyCodeReq
|
||||||
20, // 19: app.App.RegisterUser:input_type -> app.RegisterUserRequest
|
20, // 19: app.App.RegisterUser:input_type -> app.RegisterUserRequest
|
||||||
13, // 20: app.App.LoginUser:input_type -> app.LoginRequest
|
13, // 20: app.App.LoginUser:input_type -> app.LoginRequest
|
||||||
18, // 21: app.App.ListUsers:input_type -> app.PageUserRequest
|
18, // 21: app.App.ListUsers:input_type -> app.PageUserRequest
|
||||||
26, // 22: app.App.LogoutUser:input_type -> app.UserToken
|
28, // 22: app.App.LogoutUser:input_type -> app.UserToken
|
||||||
10, // 23: app.App.InitDatabase:input_type -> app.Empty
|
10, // 23: app.App.InitDatabase:input_type -> app.Empty
|
||||||
2, // 24: app.App.AuthToken:output_type -> app.AuthInfoResp
|
18, // 24: app.App.queryUserPagePc:input_type -> app.PageUserRequest
|
||||||
28, // 25: app.App.GetVerifyCode:output_type -> app.VerifyCodeResp
|
11, // 25: app.App.getUserPc:input_type -> app.IDReq
|
||||||
21, // 26: app.App.RegisterUser:output_type -> app.RegisterUserResponse
|
11, // 26: app.App.forceLogoutPc:input_type -> app.IDReq
|
||||||
14, // 27: app.App.LoginUser:output_type -> app.LoginResponse
|
26, // 27: app.App.updateUserPcPassword:input_type -> app.UpdateUserPcPasswordReq
|
||||||
19, // 28: app.App.ListUsers:output_type -> app.PageUserResponse
|
27, // 28: app.App.updateUserPcInfo:input_type -> app.UserInfo
|
||||||
15, // 29: app.App.LogoutUser:output_type -> app.LogoutUserRequest
|
25, // 29: app.App.updateUserPcAvatar:input_type -> app.UpdateUserAvatarReq
|
||||||
7, // 30: app.App.InitDatabase:output_type -> app.BaseResp
|
11, // 30: app.App.updateUserPcStatus:input_type -> app.IDReq
|
||||||
24, // [24:31] is the sub-list for method output_type
|
2, // 31: app.App.AuthToken:output_type -> app.AuthInfoResp
|
||||||
17, // [17:24] is the sub-list for method input_type
|
30, // 32: app.App.GetVerifyCode:output_type -> app.VerifyCodeResp
|
||||||
|
21, // 33: app.App.RegisterUser:output_type -> app.RegisterUserResponse
|
||||||
|
14, // 34: app.App.LoginUser:output_type -> app.LoginResponse
|
||||||
|
19, // 35: app.App.ListUsers:output_type -> app.PageUserResponse
|
||||||
|
15, // 36: app.App.LogoutUser:output_type -> app.LogoutUserRequest
|
||||||
|
7, // 37: app.App.InitDatabase:output_type -> app.BaseResp
|
||||||
|
19, // 38: app.App.queryUserPagePc:output_type -> app.PageUserResponse
|
||||||
|
27, // 39: app.App.getUserPc:output_type -> app.UserInfo
|
||||||
|
7, // 40: app.App.forceLogoutPc:output_type -> app.BaseResp
|
||||||
|
7, // 41: app.App.updateUserPcPassword:output_type -> app.BaseResp
|
||||||
|
7, // 42: app.App.updateUserPcInfo:output_type -> app.BaseResp
|
||||||
|
7, // 43: app.App.updateUserPcAvatar:output_type -> app.BaseResp
|
||||||
|
7, // 44: app.App.updateUserPcStatus:output_type -> app.BaseResp
|
||||||
|
31, // [31:45] is the sub-list for method output_type
|
||||||
|
17, // [17:31] is the sub-list for method input_type
|
||||||
17, // [17:17] is the sub-list for extension type_name
|
17, // [17:17] is the sub-list for extension type_name
|
||||||
17, // [17:17] is the sub-list for extension extendee
|
17, // [17:17] is the sub-list for extension extendee
|
||||||
0, // [0:17] is the sub-list for field type_name
|
0, // [0:17] is the sub-list for field type_name
|
||||||
|
|
@ -2154,14 +2254,14 @@ func file_app_proto_init() {
|
||||||
file_app_proto_msgTypes[11].OneofWrappers = []any{}
|
file_app_proto_msgTypes[11].OneofWrappers = []any{}
|
||||||
file_app_proto_msgTypes[16].OneofWrappers = []any{}
|
file_app_proto_msgTypes[16].OneofWrappers = []any{}
|
||||||
file_app_proto_msgTypes[18].OneofWrappers = []any{}
|
file_app_proto_msgTypes[18].OneofWrappers = []any{}
|
||||||
file_app_proto_msgTypes[23].OneofWrappers = []any{}
|
file_app_proto_msgTypes[25].OneofWrappers = []any{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_proto_rawDesc), len(file_app_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_proto_rawDesc), len(file_app_proto_rawDesc)),
|
||||||
NumEnums: 2,
|
NumEnums: 2,
|
||||||
NumMessages: 27,
|
NumMessages: 29,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,13 @@ const (
|
||||||
App_ListUsers_FullMethodName = "/app.App/ListUsers"
|
App_ListUsers_FullMethodName = "/app.App/ListUsers"
|
||||||
App_LogoutUser_FullMethodName = "/app.App/LogoutUser"
|
App_LogoutUser_FullMethodName = "/app.App/LogoutUser"
|
||||||
App_InitDatabase_FullMethodName = "/app.App/InitDatabase"
|
App_InitDatabase_FullMethodName = "/app.App/InitDatabase"
|
||||||
|
App_QueryUserPagePc_FullMethodName = "/app.App/queryUserPagePc"
|
||||||
|
App_GetUserPc_FullMethodName = "/app.App/getUserPc"
|
||||||
|
App_ForceLogoutPc_FullMethodName = "/app.App/forceLogoutPc"
|
||||||
|
App_UpdateUserPcPassword_FullMethodName = "/app.App/updateUserPcPassword"
|
||||||
|
App_UpdateUserPcInfo_FullMethodName = "/app.App/updateUserPcInfo"
|
||||||
|
App_UpdateUserPcAvatar_FullMethodName = "/app.App/updateUserPcAvatar"
|
||||||
|
App_UpdateUserPcStatus_FullMethodName = "/app.App/updateUserPcStatus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AppClient is the client API for App service.
|
// AppClient is the client API for App service.
|
||||||
|
|
@ -54,6 +61,27 @@ type AppClient interface {
|
||||||
LogoutUser(ctx context.Context, in *UserToken, opts ...grpc.CallOption) (*LogoutUserRequest, error)
|
LogoutUser(ctx context.Context, in *UserToken, opts ...grpc.CallOption) (*LogoutUserRequest, error)
|
||||||
// group: base
|
// group: base
|
||||||
InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error)
|
InitDatabase(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户分页查询
|
||||||
|
// group: user
|
||||||
|
QueryUserPagePc(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error)
|
||||||
|
// C端用户详情
|
||||||
|
// group: user
|
||||||
|
GetUserPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*UserInfo, error)
|
||||||
|
// C端用户强制登出
|
||||||
|
// group: user
|
||||||
|
ForceLogoutPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改密码
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcPassword(ctx context.Context, in *UpdateUserPcPasswordReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改信息
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcInfo(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改头像
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcAvatar(ctx context.Context, in *UpdateUserAvatarReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
|
// C端用户修改状态
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcStatus(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type appClient struct {
|
type appClient struct {
|
||||||
|
|
@ -134,6 +162,76 @@ func (c *appClient) InitDatabase(ctx context.Context, in *Empty, opts ...grpc.Ca
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *appClient) QueryUserPagePc(ctx context.Context, in *PageUserRequest, opts ...grpc.CallOption) (*PageUserResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(PageUserResponse)
|
||||||
|
err := c.cc.Invoke(ctx, App_QueryUserPagePc_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *appClient) GetUserPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*UserInfo, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(UserInfo)
|
||||||
|
err := c.cc.Invoke(ctx, App_GetUserPc_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *appClient) ForceLogoutPc(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(BaseResp)
|
||||||
|
err := c.cc.Invoke(ctx, App_ForceLogoutPc_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *appClient) UpdateUserPcPassword(ctx context.Context, in *UpdateUserPcPasswordReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(BaseResp)
|
||||||
|
err := c.cc.Invoke(ctx, App_UpdateUserPcPassword_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *appClient) UpdateUserPcInfo(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(BaseResp)
|
||||||
|
err := c.cc.Invoke(ctx, App_UpdateUserPcInfo_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *appClient) UpdateUserPcAvatar(ctx context.Context, in *UpdateUserAvatarReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(BaseResp)
|
||||||
|
err := c.cc.Invoke(ctx, App_UpdateUserPcAvatar_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *appClient) UpdateUserPcStatus(ctx context.Context, in *IDReq, opts ...grpc.CallOption) (*BaseResp, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(BaseResp)
|
||||||
|
err := c.cc.Invoke(ctx, App_UpdateUserPcStatus_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// AppServer is the server API for App service.
|
// AppServer is the server API for App service.
|
||||||
// All implementations must embed UnimplementedAppServer
|
// All implementations must embed UnimplementedAppServer
|
||||||
// for forward compatibility.
|
// for forward compatibility.
|
||||||
|
|
@ -160,6 +258,27 @@ type AppServer interface {
|
||||||
LogoutUser(context.Context, *UserToken) (*LogoutUserRequest, error)
|
LogoutUser(context.Context, *UserToken) (*LogoutUserRequest, error)
|
||||||
// group: base
|
// group: base
|
||||||
InitDatabase(context.Context, *Empty) (*BaseResp, error)
|
InitDatabase(context.Context, *Empty) (*BaseResp, error)
|
||||||
|
// C端用户分页查询
|
||||||
|
// group: user
|
||||||
|
QueryUserPagePc(context.Context, *PageUserRequest) (*PageUserResponse, error)
|
||||||
|
// C端用户详情
|
||||||
|
// group: user
|
||||||
|
GetUserPc(context.Context, *IDReq) (*UserInfo, error)
|
||||||
|
// C端用户强制登出
|
||||||
|
// group: user
|
||||||
|
ForceLogoutPc(context.Context, *IDReq) (*BaseResp, error)
|
||||||
|
// C端用户修改密码
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcPassword(context.Context, *UpdateUserPcPasswordReq) (*BaseResp, error)
|
||||||
|
// C端用户修改信息
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcInfo(context.Context, *UserInfo) (*BaseResp, error)
|
||||||
|
// C端用户修改头像
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcAvatar(context.Context, *UpdateUserAvatarReq) (*BaseResp, error)
|
||||||
|
// C端用户修改状态
|
||||||
|
// group: user
|
||||||
|
UpdateUserPcStatus(context.Context, *IDReq) (*BaseResp, error)
|
||||||
mustEmbedUnimplementedAppServer()
|
mustEmbedUnimplementedAppServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -191,6 +310,27 @@ func (UnimplementedAppServer) LogoutUser(context.Context, *UserToken) (*LogoutUs
|
||||||
func (UnimplementedAppServer) InitDatabase(context.Context, *Empty) (*BaseResp, error) {
|
func (UnimplementedAppServer) InitDatabase(context.Context, *Empty) (*BaseResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method InitDatabase not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method InitDatabase not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedAppServer) QueryUserPagePc(context.Context, *PageUserRequest) (*PageUserResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method QueryUserPagePc not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAppServer) GetUserPc(context.Context, *IDReq) (*UserInfo, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserPc not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAppServer) ForceLogoutPc(context.Context, *IDReq) (*BaseResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ForceLogoutPc not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAppServer) UpdateUserPcPassword(context.Context, *UpdateUserPcPasswordReq) (*BaseResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserPcPassword not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAppServer) UpdateUserPcInfo(context.Context, *UserInfo) (*BaseResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserPcInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAppServer) UpdateUserPcAvatar(context.Context, *UpdateUserAvatarReq) (*BaseResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserPcAvatar not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAppServer) UpdateUserPcStatus(context.Context, *IDReq) (*BaseResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserPcStatus not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedAppServer) mustEmbedUnimplementedAppServer() {}
|
func (UnimplementedAppServer) mustEmbedUnimplementedAppServer() {}
|
||||||
func (UnimplementedAppServer) testEmbeddedByValue() {}
|
func (UnimplementedAppServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
|
@ -338,6 +478,132 @@ func _App_InitDatabase_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _App_QueryUserPagePc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PageUserRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AppServer).QueryUserPagePc(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: App_QueryUserPagePc_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AppServer).QueryUserPagePc(ctx, req.(*PageUserRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _App_GetUserPc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(IDReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AppServer).GetUserPc(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: App_GetUserPc_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AppServer).GetUserPc(ctx, req.(*IDReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _App_ForceLogoutPc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(IDReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AppServer).ForceLogoutPc(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: App_ForceLogoutPc_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AppServer).ForceLogoutPc(ctx, req.(*IDReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _App_UpdateUserPcPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateUserPcPasswordReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AppServer).UpdateUserPcPassword(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: App_UpdateUserPcPassword_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AppServer).UpdateUserPcPassword(ctx, req.(*UpdateUserPcPasswordReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _App_UpdateUserPcInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UserInfo)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AppServer).UpdateUserPcInfo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: App_UpdateUserPcInfo_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AppServer).UpdateUserPcInfo(ctx, req.(*UserInfo))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _App_UpdateUserPcAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateUserAvatarReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AppServer).UpdateUserPcAvatar(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: App_UpdateUserPcAvatar_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AppServer).UpdateUserPcAvatar(ctx, req.(*UpdateUserAvatarReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _App_UpdateUserPcStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(IDReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AppServer).UpdateUserPcStatus(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: App_UpdateUserPcStatus_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AppServer).UpdateUserPcStatus(ctx, req.(*IDReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// App_ServiceDesc is the grpc.ServiceDesc for App service.
|
// App_ServiceDesc is the grpc.ServiceDesc for App service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
|
@ -373,6 +639,34 @@ var App_ServiceDesc = grpc.ServiceDesc{
|
||||||
MethodName: "InitDatabase",
|
MethodName: "InitDatabase",
|
||||||
Handler: _App_InitDatabase_Handler,
|
Handler: _App_InitDatabase_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "queryUserPagePc",
|
||||||
|
Handler: _App_QueryUserPagePc_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "getUserPc",
|
||||||
|
Handler: _App_GetUserPc_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "forceLogoutPc",
|
||||||
|
Handler: _App_ForceLogoutPc_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "updateUserPcPassword",
|
||||||
|
Handler: _App_UpdateUserPcPassword_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "updateUserPcInfo",
|
||||||
|
Handler: _App_UpdateUserPcInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "updateUserPcAvatar",
|
||||||
|
Handler: _App_UpdateUserPcAvatar_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "updateUserPcStatus",
|
||||||
|
Handler: _App_UpdateUserPcStatus_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "app.proto",
|
Metadata: "app.proto",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue