diff --git a/log/log_zap.go b/log/log_zap.go index 116117a..7bc3dd1 100644 --- a/log/log_zap.go +++ b/log/log_zap.go @@ -1,13 +1,14 @@ package log import ( + "git.hlsq.asia/mmorpg/service-common/config" "github.com/natefinch/lumberjack" "go.uber.org/zap" "go.uber.org/zap/zapcore" "os" ) -func Init(debug bool, maxSize, maxBackups, maxAge int32, level string) { +func Init(cfg *config.LogConfig) { // 格式配置 jsonConfig := zapcore.EncoderConfig{ MessageKey: "M", @@ -30,19 +31,19 @@ func Init(debug bool, maxSize, maxBackups, maxAge int32, level string) { // 日志输出到控制台和文件 writeSyncer := []zapcore.WriteSyncer{zapcore.AddSync(os.Stdout)} - if !debug { + if !cfg.Debug { writeSyncer = append(writeSyncer, zapcore.AddSync(&lumberjack.Logger{ - Filename: "./logs/log.log", // 日志文件位置 - MaxSize: int(maxSize), // 最大文件大小(MB) - MaxBackups: int(maxBackups), // 保留旧文件的最大个数 - MaxAge: int(maxAge), // 保留旧文件的最大天数 - Compress: false, // 是否压缩/归档旧文件 + Filename: "./logs/log.log", // 日志文件位置 + MaxSize: int(cfg.MaxSize), // 最大文件大小(MB) + MaxBackups: int(cfg.MaxBackups), // 保留旧文件的最大个数 + MaxAge: int(cfg.MaxAge), // 保留旧文件的最大天数 + Compress: false, // 是否压缩/归档旧文件 LocalTime: true, })) } var encoder zapcore.Encoder - if debug { + if cfg.Debug { encoder = zapcore.NewConsoleEncoder(jsonConfig) } else { encoder = zapcore.NewJSONEncoder(jsonConfig) @@ -50,9 +51,9 @@ func Init(debug bool, maxSize, maxBackups, maxAge int32, level string) { logger := zap.New(zapcore.NewCore( encoder, zapcore.NewMultiWriteSyncer(writeSyncer...), - zap.NewAtomicLevelAt(GetLogLevel(level)), + zap.NewAtomicLevelAt(GetLogLevel(cfg.Level)), )) - if debug { + if cfg.Debug { logger = logger.WithOptions( zap.AddCaller(), zap.AddCallerSkip(1), diff --git a/module/base.go b/module/base.go new file mode 100644 index 0000000..c2f965d --- /dev/null +++ b/module/base.go @@ -0,0 +1,32 @@ +package module + +import ( + "git.hlsq.asia/mmorpg/service-common/config" + "git.hlsq.asia/mmorpg/service-common/log" + "git.hlsq.asia/mmorpg/service-common/utils" + "math/rand" +) + +// Base 基础模块 +type Base struct { + DefaultModule + log *config.LogConfig +} + +func (m *Base) Init() error { + // 日志 + log.Init(m.log) + // 雪花 + utils.InitSnowflake(int64(rand.Intn(1000))) + return nil +} + +func (m *Base) Bind(data ...any) Module { + if data == nil || len(data) == 0 { + return m + } + if l, ok := data[0].(*config.LogConfig); ok { + m.log = l + } + return m +} diff --git a/proto/rs/grpc_pb/service_qgdzs.pb.go b/proto/rs/grpc_pb/service_qgdzs.pb.go index 73d9306..b25e637 100644 --- a/proto/rs/grpc_pb/service_qgdzs.pb.go +++ b/proto/rs/grpc_pb/service_qgdzs.pb.go @@ -1310,6 +1310,283 @@ func (x *GetQuestionInfoResp) GetExplanation() string { return "" } +// ---------- GetPointRecord ---------- +type GetPointRecordReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` + Page int32 `protobuf:"varint,2,opt,name=Page,json=page,proto3" json:"Page,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=PageSize,json=page_size,proto3" json:"PageSize,omitempty"` +} + +func (x *GetPointRecordReq) Reset() { + *x = GetPointRecordReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_qgdzs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPointRecordReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPointRecordReq) ProtoMessage() {} + +func (x *GetPointRecordReq) ProtoReflect() protoreflect.Message { + mi := &file_service_qgdzs_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPointRecordReq.ProtoReflect.Descriptor instead. +func (*GetPointRecordReq) Descriptor() ([]byte, []int) { + return file_service_qgdzs_proto_rawDescGZIP(), []int{22} +} + +func (x *GetPointRecordReq) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +func (x *GetPointRecordReq) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *GetPointRecordReq) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type GetPointRecordResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=Count,json=count,proto3" json:"Count,omitempty"` // 总数 + Records []*GetPointRecordItem `protobuf:"bytes,2,rep,name=Records,json=records,proto3" json:"Records,omitempty"` // 记录 +} + +func (x *GetPointRecordResp) Reset() { + *x = GetPointRecordResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_qgdzs_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPointRecordResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPointRecordResp) ProtoMessage() {} + +func (x *GetPointRecordResp) ProtoReflect() protoreflect.Message { + mi := &file_service_qgdzs_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPointRecordResp.ProtoReflect.Descriptor instead. +func (*GetPointRecordResp) Descriptor() ([]byte, []int) { + return file_service_qgdzs_proto_rawDescGZIP(), []int{23} +} + +func (x *GetPointRecordResp) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *GetPointRecordResp) GetRecords() []*GetPointRecordItem { + if x != nil { + return x.Records + } + return nil +} + +type GetPointRecordItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Source int32 `protobuf:"varint,1,opt,name=Source,json=source,proto3" json:"Source,omitempty"` // 来源 + Point int64 `protobuf:"varint,2,opt,name=Point,json=point,proto3" json:"Point,omitempty"` // 学识分 + CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime,json=create_time,proto3" json:"CreateTime,omitempty"` // 创建时间 +} + +func (x *GetPointRecordItem) Reset() { + *x = GetPointRecordItem{} + if protoimpl.UnsafeEnabled { + mi := &file_service_qgdzs_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPointRecordItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPointRecordItem) ProtoMessage() {} + +func (x *GetPointRecordItem) ProtoReflect() protoreflect.Message { + mi := &file_service_qgdzs_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPointRecordItem.ProtoReflect.Descriptor instead. +func (*GetPointRecordItem) Descriptor() ([]byte, []int) { + return file_service_qgdzs_proto_rawDescGZIP(), []int{24} +} + +func (x *GetPointRecordItem) GetSource() int32 { + if x != nil { + return x.Source + } + return 0 +} + +func (x *GetPointRecordItem) GetPoint() int64 { + if x != nil { + return x.Point + } + return 0 +} + +func (x *GetPointRecordItem) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +// ---------- GetPoint ---------- +type GetPointReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` +} + +func (x *GetPointReq) Reset() { + *x = GetPointReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_qgdzs_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPointReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPointReq) ProtoMessage() {} + +func (x *GetPointReq) ProtoReflect() protoreflect.Message { + mi := &file_service_qgdzs_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPointReq.ProtoReflect.Descriptor instead. +func (*GetPointReq) Descriptor() ([]byte, []int) { + return file_service_qgdzs_proto_rawDescGZIP(), []int{25} +} + +func (x *GetPointReq) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +type GetPointResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Point int64 `protobuf:"varint,1,opt,name=Point,json=point,proto3" json:"Point,omitempty"` // 学识分 +} + +func (x *GetPointResp) Reset() { + *x = GetPointResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_qgdzs_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPointResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPointResp) ProtoMessage() {} + +func (x *GetPointResp) ProtoReflect() protoreflect.Message { + mi := &file_service_qgdzs_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPointResp.ProtoReflect.Descriptor instead. +func (*GetPointResp) Descriptor() ([]byte, []int) { + return file_service_qgdzs_proto_rawDescGZIP(), []int{26} +} + +func (x *GetPointResp) GetPoint() int64 { + if x != nil { + return x.Point + } + return 0 +} + var File_service_qgdzs_proto protoreflect.FileDescriptor var file_service_qgdzs_proto_rawDesc = []byte{ @@ -1439,79 +1716,112 @@ var file_service_qgdzs_proto_rawDesc = []byte{ 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xc7, 0x08, 0x0a, 0x05, 0x51, 0x67, 0x64, 0x7a, 0x73, 0x12, - 0x69, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67, - 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6a, 0x0a, 0x11, 0x52, 0x61, - 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x15, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, - 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a, - 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x2f, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x14, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, - 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, - 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, - 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, - 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, - 0x13, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, - 0x21, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x79, 0x12, 0x72, 0x0a, 0x13, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x43, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, - 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, - 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, - 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x43, - 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, - 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, - 0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, - 0x72, 0x12, 0x6e, 0x0a, 0x12, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, - 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, - 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, - 0x17, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, - 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, - 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x75, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, - 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x51, 0x75, 0x69, - 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, - 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x71, - 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, - 0x79, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, - 0x16, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, - 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x66, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x51, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, - 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, - 0x14, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, - 0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x67, 0x65, - 0x74, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x42, - 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, - 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, + 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, + 0x12, 0x1b, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x59, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x63, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x16, + 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x1f, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, + 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x22, 0x24, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, + 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x32, 0xf3, 0x09, 0x0a, 0x05, 0x51, 0x67, 0x64, 0x7a, 0x73, 0x12, 0x69, + 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64, + 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6a, 0x0a, 0x11, 0x52, 0x61, 0x6e, + 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x65, + 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x2f, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x14, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, + 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, + 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, + 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, + 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f, + 0x6d, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, + 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, + 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x12, 0x72, 0x0a, 0x13, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x1a, 0x18, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1a, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, + 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x43, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, + 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, + 0x12, 0x6e, 0x0a, 0x12, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, + 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, + 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x17, + 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, + 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, + 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x75, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, + 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x51, 0x75, 0x69, 0x63, + 0x6b, 0x6c, 0x79, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x41, 0x6e, + 0x73, 0x77, 0x65, 0x72, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x71, 0x67, + 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, + 0x2f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, + 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x66, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x14, + 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, + 0x1d, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x74, + 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x5e, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x4a, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, + 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, + 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, + 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1526,7 +1836,7 @@ func file_service_qgdzs_proto_rawDescGZIP() []byte { return file_service_qgdzs_proto_rawDescData } -var file_service_qgdzs_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_service_qgdzs_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_service_qgdzs_proto_goTypes = []interface{}{ (*GenerateQuestionReq)(nil), // 0: GenerateQuestionReq (*GenerateQuestionResp)(nil), // 1: GenerateQuestionResp @@ -1550,35 +1860,45 @@ var file_service_qgdzs_proto_goTypes = []interface{}{ (*GetRecordItem)(nil), // 19: GetRecordItem (*GetQuestionInfoReq)(nil), // 20: GetQuestionInfoReq (*GetQuestionInfoResp)(nil), // 21: GetQuestionInfoResp + (*GetPointRecordReq)(nil), // 22: GetPointRecordReq + (*GetPointRecordResp)(nil), // 23: GetPointRecordResp + (*GetPointRecordItem)(nil), // 24: GetPointRecordItem + (*GetPointReq)(nil), // 25: GetPointReq + (*GetPointResp)(nil), // 26: GetPointResp } var file_service_qgdzs_proto_depIdxs = []int32{ 8, // 0: GetAllCategoryResp.Categories:type_name -> GetAllCategoryItem 19, // 1: GetRecordResp.Records:type_name -> GetRecordItem - 0, // 2: Qgdzs.GenerateQuestion:input_type -> GenerateQuestionReq - 2, // 3: Qgdzs.RandomGetQuestion:input_type -> RandomGetQuestionReq - 4, // 4: Qgdzs.RandomAnswerQuestion:input_type -> RandomAnswerQuestionReq - 6, // 5: Qgdzs.GetAllCategory:input_type -> GetAllCategoryReq - 9, // 6: Qgdzs.CategoryGetQuestion:input_type -> CategoryGetQuestionReq - 11, // 7: Qgdzs.CategoryAnswerQuestion:input_type -> CategoryAnswerQuestionReq - 13, // 8: Qgdzs.QuicklyGetQuestion:input_type -> QuicklyGetQuestionReq - 15, // 9: Qgdzs.QuicklyAnswerQuestion:input_type -> QuicklyAnswerQuestionReq - 17, // 10: Qgdzs.GetRecord:input_type -> GetRecordReq - 20, // 11: Qgdzs.GetQuestionInfo:input_type -> GetQuestionInfoReq - 1, // 12: Qgdzs.GenerateQuestion:output_type -> GenerateQuestionResp - 3, // 13: Qgdzs.RandomGetQuestion:output_type -> RandomGetQuestionResp - 5, // 14: Qgdzs.RandomAnswerQuestion:output_type -> RandomAnswerQuestionResp - 7, // 15: Qgdzs.GetAllCategory:output_type -> GetAllCategoryResp - 10, // 16: Qgdzs.CategoryGetQuestion:output_type -> CategoryGetQuestionResp - 12, // 17: Qgdzs.CategoryAnswerQuestion:output_type -> CategoryAnswerQuestionResp - 14, // 18: Qgdzs.QuicklyGetQuestion:output_type -> QuicklyGetQuestionResp - 16, // 19: Qgdzs.QuicklyAnswerQuestion:output_type -> QuicklyAnswerQuestionResp - 18, // 20: Qgdzs.GetRecord:output_type -> GetRecordResp - 21, // 21: Qgdzs.GetQuestionInfo:output_type -> GetQuestionInfoResp - 12, // [12:22] is the sub-list for method output_type - 2, // [2:12] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 24, // 2: GetPointRecordResp.Records:type_name -> GetPointRecordItem + 0, // 3: Qgdzs.GenerateQuestion:input_type -> GenerateQuestionReq + 2, // 4: Qgdzs.RandomGetQuestion:input_type -> RandomGetQuestionReq + 4, // 5: Qgdzs.RandomAnswerQuestion:input_type -> RandomAnswerQuestionReq + 6, // 6: Qgdzs.GetAllCategory:input_type -> GetAllCategoryReq + 9, // 7: Qgdzs.CategoryGetQuestion:input_type -> CategoryGetQuestionReq + 11, // 8: Qgdzs.CategoryAnswerQuestion:input_type -> CategoryAnswerQuestionReq + 13, // 9: Qgdzs.QuicklyGetQuestion:input_type -> QuicklyGetQuestionReq + 15, // 10: Qgdzs.QuicklyAnswerQuestion:input_type -> QuicklyAnswerQuestionReq + 17, // 11: Qgdzs.GetRecord:input_type -> GetRecordReq + 20, // 12: Qgdzs.GetQuestionInfo:input_type -> GetQuestionInfoReq + 22, // 13: Qgdzs.GetPointRecord:input_type -> GetPointRecordReq + 25, // 14: Qgdzs.GetPoint:input_type -> GetPointReq + 1, // 15: Qgdzs.GenerateQuestion:output_type -> GenerateQuestionResp + 3, // 16: Qgdzs.RandomGetQuestion:output_type -> RandomGetQuestionResp + 5, // 17: Qgdzs.RandomAnswerQuestion:output_type -> RandomAnswerQuestionResp + 7, // 18: Qgdzs.GetAllCategory:output_type -> GetAllCategoryResp + 10, // 19: Qgdzs.CategoryGetQuestion:output_type -> CategoryGetQuestionResp + 12, // 20: Qgdzs.CategoryAnswerQuestion:output_type -> CategoryAnswerQuestionResp + 14, // 21: Qgdzs.QuicklyGetQuestion:output_type -> QuicklyGetQuestionResp + 16, // 22: Qgdzs.QuicklyAnswerQuestion:output_type -> QuicklyAnswerQuestionResp + 18, // 23: Qgdzs.GetRecord:output_type -> GetRecordResp + 21, // 24: Qgdzs.GetQuestionInfo:output_type -> GetQuestionInfoResp + 23, // 25: Qgdzs.GetPointRecord:output_type -> GetPointRecordResp + 26, // 26: Qgdzs.GetPoint:output_type -> GetPointResp + 15, // [15:27] is the sub-list for method output_type + 3, // [3:15] 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 } func init() { file_service_qgdzs_proto_init() } @@ -1851,6 +2171,66 @@ func file_service_qgdzs_proto_init() { return nil } } + file_service_qgdzs_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPointRecordReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_qgdzs_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPointRecordResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_qgdzs_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPointRecordItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_qgdzs_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPointReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_qgdzs_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPointResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1858,7 +2238,7 @@ func file_service_qgdzs_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_qgdzs_proto_rawDesc, NumEnums: 0, - NumMessages: 22, + NumMessages: 27, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/rs/grpc_pb/service_qgdzs.pb.gw.go b/proto/rs/grpc_pb/service_qgdzs.pb.gw.go index 184dfa9..cefa986 100644 --- a/proto/rs/grpc_pb/service_qgdzs.pb.gw.go +++ b/proto/rs/grpc_pb/service_qgdzs.pb.gw.go @@ -275,6 +275,54 @@ func local_request_Qgdzs_GetQuestionInfo_0(ctx context.Context, marshaler runtim return msg, metadata, err } +func request_Qgdzs_GetPointRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetPointRecordReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetPointRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Qgdzs_GetPointRecord_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetPointRecordReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetPointRecord(ctx, &protoReq) + return msg, metadata, err +} + +func request_Qgdzs_GetPoint_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetPointReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetPoint(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Qgdzs_GetPoint_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetPointReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetPoint(ctx, &protoReq) + return msg, metadata, err +} + // RegisterQgdzsHandlerServer registers the http handlers for service Qgdzs to "mux". // UnaryRPC :call QgdzsServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -481,6 +529,46 @@ func RegisterQgdzsHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Qgdzs_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_Qgdzs_GetPointRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/GetPointRecord", runtime.WithHTTPPathPattern("/qgdzs/auth/point/record")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Qgdzs_GetPointRecord_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Qgdzs_GetPointRecord_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Qgdzs_GetPoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/GetPoint", runtime.WithHTTPPathPattern("/qgdzs/auth/point/info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Qgdzs_GetPoint_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Qgdzs_GetPoint_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -691,6 +779,40 @@ func RegisterQgdzsHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Qgdzs_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_Qgdzs_GetPointRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.Qgdzs/GetPointRecord", runtime.WithHTTPPathPattern("/qgdzs/auth/point/record")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Qgdzs_GetPointRecord_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Qgdzs_GetPointRecord_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Qgdzs_GetPoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.Qgdzs/GetPoint", runtime.WithHTTPPathPattern("/qgdzs/auth/point/info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Qgdzs_GetPoint_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Qgdzs_GetPoint_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -705,6 +827,8 @@ var ( pattern_Qgdzs_QuicklyAnswerQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "quickly", "answer"}, "")) pattern_Qgdzs_GetRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "auth", "get_record"}, "")) pattern_Qgdzs_GetQuestionInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "open", "get_question_info"}, "")) + pattern_Qgdzs_GetPointRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "auth", "point", "record"}, "")) + pattern_Qgdzs_GetPoint_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "auth", "point", "info"}, "")) ) var ( @@ -718,4 +842,6 @@ var ( forward_Qgdzs_QuicklyAnswerQuestion_0 = runtime.ForwardResponseMessage forward_Qgdzs_GetRecord_0 = runtime.ForwardResponseMessage forward_Qgdzs_GetQuestionInfo_0 = runtime.ForwardResponseMessage + forward_Qgdzs_GetPointRecord_0 = runtime.ForwardResponseMessage + forward_Qgdzs_GetPoint_0 = runtime.ForwardResponseMessage ) diff --git a/proto/rs/grpc_pb/service_qgdzs_grpc.pb.go b/proto/rs/grpc_pb/service_qgdzs_grpc.pb.go index e548fcc..2efe861 100644 --- a/proto/rs/grpc_pb/service_qgdzs_grpc.pb.go +++ b/proto/rs/grpc_pb/service_qgdzs_grpc.pb.go @@ -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", diff --git a/utils/jwt.go b/utils/jwt.go index 4f0a0f3..e0cdaec 100644 --- a/utils/jwt.go +++ b/utils/jwt.go @@ -1,10 +1,8 @@ package utils import ( - "context" "errors" "github.com/golang-jwt/jwt/v5" - "google.golang.org/grpc/metadata" "time" ) @@ -39,14 +37,3 @@ func ParseToken(tokenString string, secret string) (*Claims, error) { } return claims, nil } - -func ShouldBindUsn(ctx context.Context, usn *int64) bool { - if md, ok := metadata.FromIncomingContext(ctx); ok { - usnArr := md.Get("X-Usn") - if len(usnArr) == 0 || usnArr[0] == "" { - return false - } - *usn = StringToInt64(usnArr[0]) - } - return *usn != 0 -} diff --git a/utils/session.go b/utils/session.go new file mode 100644 index 0000000..3ef41d7 --- /dev/null +++ b/utils/session.go @@ -0,0 +1,29 @@ +package utils + +import ( + "context" + "google.golang.org/grpc/metadata" +) + +type UserSession struct { + USN int64 `json:"usn" redis:"usn"` + IP string `json:"ip" redis:"ip"` + UserAgent string `json:"ua" redis:"ua"` + AccessToken string `json:"at" redis:"at"` + RefreshToken string `json:"rt" redis:"rt"` +} + +func (us *UserSession) GetUsnKey() string { + return "usn" +} + +func ShouldBindUsn(ctx context.Context, usn *int64) bool { + if md, ok := metadata.FromIncomingContext(ctx); ok { + usnArr := md.Get("X-Usn") + if len(usnArr) == 0 || usnArr[0] == "" { + return false + } + *usn = StringToInt64(usnArr[0]) + } + return *usn != 0 +}