feat: analysis admin

This commit is contained in:
zzw
2026-11-02 10:06:20 +08:00
parent 5d20c150f4
commit f77913f8a7
34 changed files with 2302 additions and 139 deletions
+38
View File
@@ -42,6 +42,7 @@ const (
User_InternalGetUserInfo_FullMethodName = "/user.User/InternalGetUserInfo"
User_InternalVerifyPassword_FullMethodName = "/user.User/InternalVerifyPassword"
User_InternalUsersByBiz_FullMethodName = "/user.User/InternalUsersByBiz"
User_InternalLoginByUserId_FullMethodName = "/user.User/InternalLoginByUserId"
)
// UserClient is the client API for User service.
@@ -71,6 +72,7 @@ type UserClient interface {
InternalGetUserInfo(ctx context.Context, in *InternalGetUserInfoReq, opts ...grpc.CallOption) (*InternalGetUserInfoData, error)
InternalVerifyPassword(ctx context.Context, in *InternalVerifyPasswordReq, opts ...grpc.CallOption) (*InternalVerifyPasswordData, error)
InternalUsersByBiz(ctx context.Context, in *InternalUsersByBizReq, opts ...grpc.CallOption) (*InternalUsersByBizData, error)
InternalLoginByUserId(ctx context.Context, in *InternalLoginByUserIdReq, opts ...grpc.CallOption) (*InternalLoginByUserIdData, error)
}
type userClient struct {
@@ -311,6 +313,16 @@ func (c *userClient) InternalUsersByBiz(ctx context.Context, in *InternalUsersBy
return out, nil
}
func (c *userClient) InternalLoginByUserId(ctx context.Context, in *InternalLoginByUserIdReq, opts ...grpc.CallOption) (*InternalLoginByUserIdData, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(InternalLoginByUserIdData)
err := c.cc.Invoke(ctx, User_InternalLoginByUserId_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServer is the server API for User service.
// All implementations must embed UnimplementedUserServer
// for forward compatibility.
@@ -338,6 +350,7 @@ type UserServer interface {
InternalGetUserInfo(context.Context, *InternalGetUserInfoReq) (*InternalGetUserInfoData, error)
InternalVerifyPassword(context.Context, *InternalVerifyPasswordReq) (*InternalVerifyPasswordData, error)
InternalUsersByBiz(context.Context, *InternalUsersByBizReq) (*InternalUsersByBizData, error)
InternalLoginByUserId(context.Context, *InternalLoginByUserIdReq) (*InternalLoginByUserIdData, error)
mustEmbedUnimplementedUserServer()
}
@@ -417,6 +430,9 @@ func (UnimplementedUserServer) InternalVerifyPassword(context.Context, *Internal
func (UnimplementedUserServer) InternalUsersByBiz(context.Context, *InternalUsersByBizReq) (*InternalUsersByBizData, error) {
return nil, status.Error(codes.Unimplemented, "method InternalUsersByBiz not implemented")
}
func (UnimplementedUserServer) InternalLoginByUserId(context.Context, *InternalLoginByUserIdReq) (*InternalLoginByUserIdData, error) {
return nil, status.Error(codes.Unimplemented, "method InternalLoginByUserId not implemented")
}
func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
func (UnimplementedUserServer) testEmbeddedByValue() {}
@@ -852,6 +868,24 @@ func _User_InternalUsersByBiz_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _User_InternalLoginByUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InternalLoginByUserIdReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServer).InternalLoginByUserId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: User_InternalLoginByUserId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServer).InternalLoginByUserId(ctx, req.(*InternalLoginByUserIdReq))
}
return interceptor(ctx, in, info, handler)
}
// User_ServiceDesc is the grpc.ServiceDesc for User service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -951,6 +985,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
MethodName: "InternalUsersByBiz",
Handler: _User_InternalUsersByBiz_Handler,
},
{
MethodName: "InternalLoginByUserId",
Handler: _User_InternalLoginByUserId_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto",