feat 废弃jwt

This commit is contained in:
2026-02-06 22:22:43 +08:00
parent 5dc5391b07
commit 44ebbe4449
7 changed files with 756 additions and 123 deletions

View File

@@ -46,6 +46,11 @@ type QgdzsClient interface {
GetRecord(ctx context.Context, in *GetRecordReq, opts ...grpc.CallOption) (*GetRecordResp, error)
// 获取具体的题目
GetQuestionInfo(ctx context.Context, in *GetQuestionInfoReq, opts ...grpc.CallOption) (*GetQuestionInfoResp, error)
// ---------- 学识分 ----------
// 获取学识分获取记录
GetPointRecord(ctx context.Context, in *GetPointRecordReq, opts ...grpc.CallOption) (*GetPointRecordResp, error)
// 获取学识分
GetPoint(ctx context.Context, in *GetPointReq, opts ...grpc.CallOption) (*GetPointResp, error)
}
type qgdzsClient struct {
@@ -146,6 +151,24 @@ func (c *qgdzsClient) GetQuestionInfo(ctx context.Context, in *GetQuestionInfoRe
return out, nil
}
func (c *qgdzsClient) GetPointRecord(ctx context.Context, in *GetPointRecordReq, opts ...grpc.CallOption) (*GetPointRecordResp, error) {
out := new(GetPointRecordResp)
err := c.cc.Invoke(ctx, "/Qgdzs/GetPointRecord", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *qgdzsClient) GetPoint(ctx context.Context, in *GetPointReq, opts ...grpc.CallOption) (*GetPointResp, error) {
out := new(GetPointResp)
err := c.cc.Invoke(ctx, "/Qgdzs/GetPoint", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QgdzsServer is the server API for Qgdzs service.
// All implementations must embed UnimplementedQgdzsServer
// for forward compatibility
@@ -174,6 +197,11 @@ type QgdzsServer interface {
GetRecord(context.Context, *GetRecordReq) (*GetRecordResp, error)
// 获取具体的题目
GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error)
// ---------- 学识分 ----------
// 获取学识分获取记录
GetPointRecord(context.Context, *GetPointRecordReq) (*GetPointRecordResp, error)
// 获取学识分
GetPoint(context.Context, *GetPointReq) (*GetPointResp, error)
mustEmbedUnimplementedQgdzsServer()
}
@@ -211,6 +239,12 @@ func (UnimplementedQgdzsServer) GetRecord(context.Context, *GetRecordReq) (*GetR
func (UnimplementedQgdzsServer) GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetQuestionInfo not implemented")
}
func (UnimplementedQgdzsServer) GetPointRecord(context.Context, *GetPointRecordReq) (*GetPointRecordResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPointRecord not implemented")
}
func (UnimplementedQgdzsServer) GetPoint(context.Context, *GetPointReq) (*GetPointResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPoint not implemented")
}
func (UnimplementedQgdzsServer) mustEmbedUnimplementedQgdzsServer() {}
// UnsafeQgdzsServer may be embedded to opt out of forward compatibility for this service.
@@ -404,6 +438,42 @@ func _Qgdzs_GetQuestionInfo_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
func _Qgdzs_GetPointRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPointRecordReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QgdzsServer).GetPointRecord(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Qgdzs/GetPointRecord",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QgdzsServer).GetPointRecord(ctx, req.(*GetPointRecordReq))
}
return interceptor(ctx, in, info, handler)
}
func _Qgdzs_GetPoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPointReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QgdzsServer).GetPoint(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Qgdzs/GetPoint",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QgdzsServer).GetPoint(ctx, req.(*GetPointReq))
}
return interceptor(ctx, in, info, handler)
}
// Qgdzs_ServiceDesc is the grpc.ServiceDesc for Qgdzs service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -451,6 +521,14 @@ var Qgdzs_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetQuestionInfo",
Handler: _Qgdzs_GetQuestionInfo_Handler,
},
{
MethodName: "GetPointRecord",
Handler: _Qgdzs_GetPointRecord_Handler,
},
{
MethodName: "GetPoint",
Handler: _Qgdzs_GetPoint_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_qgdzs.proto",