feat usn 类型改成int64
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
},
|
||||
"/qgdzs/auth/get_record": {
|
||||
"post": {
|
||||
"summary": "获取答题记录",
|
||||
"summary": "---------- 答题记录 ----------\n获取答题记录",
|
||||
"operationId": "Qgdzs_GetRecord",
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -79,15 +79,15 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/qgdzs/open/answer_question": {
|
||||
"/qgdzs/open/category/answer": {
|
||||
"post": {
|
||||
"summary": "回答题目",
|
||||
"operationId": "Qgdzs_AnswerQuestion",
|
||||
"operationId": "Qgdzs_CategoryAnswerQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/AnswerQuestionResp"
|
||||
"$ref": "#/definitions/CategoryAnswerQuestionResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -97,7 +97,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/AnswerQuestionReq"
|
||||
"$ref": "#/definitions/CategoryAnswerQuestionReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -106,9 +106,9 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/qgdzs/open/get_all_category": {
|
||||
"/qgdzs/open/category/get_category": {
|
||||
"post": {
|
||||
"summary": "获取所有类目",
|
||||
"summary": "---------- 类目答题 ----------\n获取所有类目",
|
||||
"operationId": "Qgdzs_GetAllCategory",
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -133,15 +133,15 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/qgdzs/open/get_question": {
|
||||
"/qgdzs/open/category/question": {
|
||||
"post": {
|
||||
"summary": "获取题目",
|
||||
"operationId": "Qgdzs_GetQuestion",
|
||||
"operationId": "Qgdzs_CategoryGetQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetQuestionResp"
|
||||
"$ref": "#/definitions/CategoryGetQuestionResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -151,7 +151,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetQuestionReq"
|
||||
"$ref": "#/definitions/CategoryGetQuestionReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -187,6 +187,114 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/qgdzs/open/quickly/answer": {
|
||||
"post": {
|
||||
"summary": "回答题目",
|
||||
"operationId": "Qgdzs_QuicklyAnswerQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/QuicklyAnswerQuestionResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/QuicklyAnswerQuestionReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Qgdzs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/qgdzs/open/quickly/question": {
|
||||
"post": {
|
||||
"summary": "---------- 快速答题 ----------\n获取题目",
|
||||
"operationId": "Qgdzs_QuicklyGetQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/QuicklyGetQuestionResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/QuicklyGetQuestionReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Qgdzs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/qgdzs/open/random/answer": {
|
||||
"post": {
|
||||
"summary": "回答题目",
|
||||
"operationId": "Qgdzs_RandomAnswerQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/RandomAnswerQuestionResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/RandomAnswerQuestionReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Qgdzs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/qgdzs/open/random/question": {
|
||||
"post": {
|
||||
"summary": "---------- 随机答题 ----------\n获取题目",
|
||||
"operationId": "Qgdzs_RandomGetQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/RandomGetQuestionResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/RandomGetQuestionReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Qgdzs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/user/auth/info": {
|
||||
"post": {
|
||||
"summary": "获取用户信息",
|
||||
@@ -219,14 +327,16 @@
|
||||
"ActionResp": {
|
||||
"type": "object"
|
||||
},
|
||||
"AnswerQuestionReq": {
|
||||
"CategoryAnswerQuestionReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"answer": {
|
||||
@@ -234,9 +344,9 @@
|
||||
"title": "答案"
|
||||
}
|
||||
},
|
||||
"title": "---------- AnswerQuestion ----------"
|
||||
"title": "---------- CategoryAnswerQuestion ----------"
|
||||
},
|
||||
"AnswerQuestionResp": {
|
||||
"CategoryAnswerQuestionResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"answer": {
|
||||
@@ -249,15 +359,58 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"CategoryGetQuestionReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category_sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "类目唯一标识"
|
||||
}
|
||||
},
|
||||
"title": "---------- CategoryGetQuestion ----------"
|
||||
},
|
||||
"CategoryGetQuestionResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"question": {
|
||||
"type": "string",
|
||||
"title": "题干"
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "选项"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"title": "题目类型"
|
||||
},
|
||||
"difficulty": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "难度"
|
||||
}
|
||||
}
|
||||
},
|
||||
"EnterResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"SceneSID": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "场景服务ID"
|
||||
},
|
||||
"UniqueNo": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "副本唯一编号"
|
||||
},
|
||||
"MessageID": {
|
||||
@@ -291,6 +444,7 @@
|
||||
"properties": {
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "唯一标识"
|
||||
},
|
||||
"category": {
|
||||
@@ -321,6 +475,7 @@
|
||||
"properties": {
|
||||
"question_sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
}
|
||||
},
|
||||
@@ -355,50 +510,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"GetQuestionReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category_sn": {
|
||||
"type": "string",
|
||||
"title": "类目唯一标识"
|
||||
}
|
||||
},
|
||||
"title": "---------- GetQuestion ----------"
|
||||
},
|
||||
"GetQuestionResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"question": {
|
||||
"type": "string",
|
||||
"title": "题干"
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "选项"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"title": "题目类型"
|
||||
},
|
||||
"difficulty": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "难度"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GetRecordItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"question_sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"question": {
|
||||
@@ -433,7 +550,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"page": {
|
||||
"type": "integer",
|
||||
@@ -468,7 +586,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "---------- GetUserInfo ----------"
|
||||
@@ -477,7 +596,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
@@ -495,6 +615,7 @@
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "用户ID"
|
||||
},
|
||||
"name": {
|
||||
@@ -503,6 +624,138 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"QuicklyAnswerQuestionReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"title": "答案"
|
||||
}
|
||||
},
|
||||
"title": "---------- QuicklyAnswerQuestion ----------"
|
||||
},
|
||||
"QuicklyAnswerQuestionResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"title": "答案"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string",
|
||||
"title": "解析"
|
||||
}
|
||||
}
|
||||
},
|
||||
"QuicklyGetQuestionReq": {
|
||||
"type": "object",
|
||||
"title": "---------- QuicklyGetQuestion ----------"
|
||||
},
|
||||
"QuicklyGetQuestionResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"question": {
|
||||
"type": "string",
|
||||
"title": "题干"
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "选项"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"title": "题目类型"
|
||||
},
|
||||
"difficulty": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "难度"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RandomAnswerQuestionReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"title": "答案"
|
||||
}
|
||||
},
|
||||
"title": "---------- RandomAnswerQuestion ----------"
|
||||
},
|
||||
"RandomAnswerQuestionResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"title": "答案"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string",
|
||||
"title": "解析"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RandomGetQuestionReq": {
|
||||
"type": "object",
|
||||
"title": "---------- RandomGetQuestion ----------"
|
||||
},
|
||||
"RandomGetQuestionResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "题目唯一标识"
|
||||
},
|
||||
"question": {
|
||||
"type": "string",
|
||||
"title": "题干"
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "选项"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"title": "题目类型"
|
||||
},
|
||||
"difficulty": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "难度"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ToClientResp": {
|
||||
"type": "object"
|
||||
},
|
||||
@@ -511,6 +764,7 @@
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "用户ID"
|
||||
},
|
||||
"name": {
|
||||
|
||||
@@ -26,7 +26,7 @@ type ToClientReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
MessageID int32 `protobuf:"varint,2,opt,name=MessageID,proto3" json:"MessageID,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"`
|
||||
}
|
||||
@@ -63,11 +63,11 @@ func (*ToClientReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ToClientReq) GetUSN() string {
|
||||
func (x *ToClientReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ToClientReq) GetMessageID() int32 {
|
||||
@@ -127,7 +127,7 @@ type KickUserReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
}
|
||||
|
||||
func (x *KickUserReq) Reset() {
|
||||
@@ -162,11 +162,11 @@ func (*KickUserReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *KickUserReq) GetUSN() string {
|
||||
func (x *KickUserReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type KickUserResp struct {
|
||||
@@ -214,13 +214,13 @@ var file_service_gateway_proto_rawDesc = []byte{
|
||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54, 0x6f, 0x43, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x1f, 0x0a, 0x0b, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55,
|
||||
0x53, 0x4e, 0x22, 0x0e, 0x0a, 0x0c, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x32, 0x61, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2b, 0x0a,
|
||||
0x08, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x54, 0x6f, 0x43, 0x6c,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,75 +59,51 @@ func local_request_Qgdzs_GenerateQuestion_0(ctx context.Context, marshaler runti
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_GetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
func request_Qgdzs_RandomGetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetQuestionReq
|
||||
protoReq RandomGetQuestionReq
|
||||
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.GetQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.RandomGetQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_GetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
func local_request_Qgdzs_RandomGetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetQuestionReq
|
||||
protoReq RandomGetQuestionReq
|
||||
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.GetQuestion(ctx, &protoReq)
|
||||
msg, err := server.RandomGetQuestion(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_GetQuestionInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
func request_Qgdzs_RandomAnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetQuestionInfoReq
|
||||
protoReq RandomAnswerQuestionReq
|
||||
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.GetQuestionInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.RandomAnswerQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_GetQuestionInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
func local_request_Qgdzs_RandomAnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetQuestionInfoReq
|
||||
protoReq RandomAnswerQuestionReq
|
||||
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.GetQuestionInfo(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_AnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq AnswerQuestionReq
|
||||
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.AnswerQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_AnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq AnswerQuestionReq
|
||||
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.AnswerQuestion(ctx, &protoReq)
|
||||
msg, err := server.RandomAnswerQuestion(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
@@ -155,6 +131,102 @@ func local_request_Qgdzs_GetAllCategory_0(ctx context.Context, marshaler runtime
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_CategoryGetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq CategoryGetQuestionReq
|
||||
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.CategoryGetQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_CategoryGetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq CategoryGetQuestionReq
|
||||
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.CategoryGetQuestion(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_CategoryAnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq CategoryAnswerQuestionReq
|
||||
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.CategoryAnswerQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_CategoryAnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq CategoryAnswerQuestionReq
|
||||
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.CategoryAnswerQuestion(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_QuicklyGetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq QuicklyGetQuestionReq
|
||||
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.QuicklyGetQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_QuicklyGetQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq QuicklyGetQuestionReq
|
||||
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.QuicklyGetQuestion(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_QuicklyAnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq QuicklyAnswerQuestionReq
|
||||
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.QuicklyAnswerQuestion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_QuicklyAnswerQuestion_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq QuicklyAnswerQuestionReq
|
||||
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.QuicklyAnswerQuestion(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_GetRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetRecordReq
|
||||
@@ -179,6 +251,30 @@ func local_request_Qgdzs_GetRecord_0(ctx context.Context, marshaler runtime.Mars
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Qgdzs_GetQuestionInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QgdzsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetQuestionInfoReq
|
||||
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.GetQuestionInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Qgdzs_GetQuestionInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QgdzsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetQuestionInfoReq
|
||||
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.GetQuestionInfo(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.
|
||||
@@ -205,65 +301,45 @@ func RegisterQgdzsHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
}
|
||||
forward_Qgdzs_GenerateQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetQuestion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_RandomGetQuestion_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/GetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/get_question"))
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/RandomGetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/random/question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_GetQuestion_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_Qgdzs_RandomGetQuestion_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_GetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_Qgdzs_RandomGetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetQuestionInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_RandomAnswerQuestion_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/GetQuestionInfo", runtime.WithHTTPPathPattern("/qgdzs/open/get_question_info"))
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/RandomAnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/random/answer"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_GetQuestionInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_Qgdzs_RandomAnswerQuestion_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_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_AnswerQuestion_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/AnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/answer_question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_AnswerQuestion_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_AnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_Qgdzs_RandomAnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetAllCategory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
@@ -271,7 +347,7 @@ func RegisterQgdzsHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/GetAllCategory", runtime.WithHTTPPathPattern("/qgdzs/open/get_all_category"))
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.Qgdzs/GetAllCategory", runtime.WithHTTPPathPattern("/qgdzs/open/category/get_category"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -285,6 +361,86 @@ func RegisterQgdzsHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
}
|
||||
forward_Qgdzs_GetAllCategory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_CategoryGetQuestion_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/CategoryGetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/category/question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_CategoryGetQuestion_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_CategoryGetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_CategoryAnswerQuestion_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/CategoryAnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/category/answer"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_CategoryAnswerQuestion_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_CategoryAnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_QuicklyGetQuestion_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/QuicklyGetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/quickly/question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_QuicklyGetQuestion_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_QuicklyGetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_QuicklyAnswerQuestion_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/QuicklyAnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/quickly/answer"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_QuicklyAnswerQuestion_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_QuicklyAnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -305,6 +461,26 @@ func RegisterQgdzsHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
}
|
||||
forward_Qgdzs_GetRecord_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetQuestionInfo_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/GetQuestionInfo", runtime.WithHTTPPathPattern("/qgdzs/open/get_question_info"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Qgdzs_GetQuestionInfo_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_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -362,62 +538,45 @@ func RegisterQgdzsHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
forward_Qgdzs_GenerateQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetQuestion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_RandomGetQuestion_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/GetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/get_question"))
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.Qgdzs/RandomGetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/random/question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_GetQuestion_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_Qgdzs_RandomGetQuestion_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_GetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_Qgdzs_RandomGetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetQuestionInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_RandomAnswerQuestion_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/GetQuestionInfo", runtime.WithHTTPPathPattern("/qgdzs/open/get_question_info"))
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.Qgdzs/RandomAnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/random/answer"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_GetQuestionInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_Qgdzs_RandomAnswerQuestion_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_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_AnswerQuestion_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/AnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/answer_question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_AnswerQuestion_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_AnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_Qgdzs_RandomAnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetAllCategory_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/GetAllCategory", runtime.WithHTTPPathPattern("/qgdzs/open/get_all_category"))
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.Qgdzs/GetAllCategory", runtime.WithHTTPPathPattern("/qgdzs/open/category/get_category"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@@ -430,6 +589,74 @@ func RegisterQgdzsHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
forward_Qgdzs_GetAllCategory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_CategoryGetQuestion_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/CategoryGetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/category/question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_CategoryGetQuestion_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_CategoryGetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_CategoryAnswerQuestion_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/CategoryAnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/category/answer"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_CategoryAnswerQuestion_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_CategoryAnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_QuicklyGetQuestion_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/QuicklyGetQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/quickly/question"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_QuicklyGetQuestion_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_QuicklyGetQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_QuicklyAnswerQuestion_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/QuicklyAnswerQuestion", runtime.WithHTTPPathPattern("/qgdzs/open/quickly/answer"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_QuicklyAnswerQuestion_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_QuicklyAnswerQuestion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -447,23 +674,48 @@ func RegisterQgdzsHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
forward_Qgdzs_GetRecord_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Qgdzs_GetQuestionInfo_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/GetQuestionInfo", runtime.WithHTTPPathPattern("/qgdzs/open/get_question_info"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Qgdzs_GetQuestionInfo_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_GetQuestionInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Qgdzs_GenerateQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "auth", "generate_question"}, ""))
|
||||
pattern_Qgdzs_GetQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "open", "get_question"}, ""))
|
||||
pattern_Qgdzs_GetQuestionInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "open", "get_question_info"}, ""))
|
||||
pattern_Qgdzs_AnswerQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "open", "answer_question"}, ""))
|
||||
pattern_Qgdzs_GetAllCategory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "open", "get_all_category"}, ""))
|
||||
pattern_Qgdzs_GetRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "auth", "get_record"}, ""))
|
||||
pattern_Qgdzs_GenerateQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgdzs", "auth", "generate_question"}, ""))
|
||||
pattern_Qgdzs_RandomGetQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "random", "question"}, ""))
|
||||
pattern_Qgdzs_RandomAnswerQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "random", "answer"}, ""))
|
||||
pattern_Qgdzs_GetAllCategory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "category", "get_category"}, ""))
|
||||
pattern_Qgdzs_CategoryGetQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "category", "question"}, ""))
|
||||
pattern_Qgdzs_CategoryAnswerQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "category", "answer"}, ""))
|
||||
pattern_Qgdzs_QuicklyGetQuestion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgdzs", "open", "quickly", "question"}, ""))
|
||||
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"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_Qgdzs_GenerateQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GetQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GetQuestionInfo_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_AnswerQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GetAllCategory_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GetRecord_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GenerateQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_RandomGetQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_RandomAnswerQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GetAllCategory_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_CategoryGetQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_CategoryAnswerQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_QuicklyGetQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_QuicklyAnswerQuestion_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GetRecord_0 = runtime.ForwardResponseMessage
|
||||
forward_Qgdzs_GetQuestionInfo_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
||||
@@ -24,16 +24,28 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
type QgdzsClient interface {
|
||||
// 生成题目
|
||||
GenerateQuestion(ctx context.Context, in *GenerateQuestionReq, opts ...grpc.CallOption) (*GenerateQuestionResp, error)
|
||||
// ---------- 随机答题 ----------
|
||||
// 获取题目
|
||||
GetQuestion(ctx context.Context, in *GetQuestionReq, opts ...grpc.CallOption) (*GetQuestionResp, error)
|
||||
// 获取具体的题目
|
||||
GetQuestionInfo(ctx context.Context, in *GetQuestionInfoReq, opts ...grpc.CallOption) (*GetQuestionInfoResp, error)
|
||||
RandomGetQuestion(ctx context.Context, in *RandomGetQuestionReq, opts ...grpc.CallOption) (*RandomGetQuestionResp, error)
|
||||
// 回答题目
|
||||
AnswerQuestion(ctx context.Context, in *AnswerQuestionReq, opts ...grpc.CallOption) (*AnswerQuestionResp, error)
|
||||
RandomAnswerQuestion(ctx context.Context, in *RandomAnswerQuestionReq, opts ...grpc.CallOption) (*RandomAnswerQuestionResp, error)
|
||||
// ---------- 类目答题 ----------
|
||||
// 获取所有类目
|
||||
GetAllCategory(ctx context.Context, in *GetAllCategoryReq, opts ...grpc.CallOption) (*GetAllCategoryResp, error)
|
||||
// 获取题目
|
||||
CategoryGetQuestion(ctx context.Context, in *CategoryGetQuestionReq, opts ...grpc.CallOption) (*CategoryGetQuestionResp, error)
|
||||
// 回答题目
|
||||
CategoryAnswerQuestion(ctx context.Context, in *CategoryAnswerQuestionReq, opts ...grpc.CallOption) (*CategoryAnswerQuestionResp, error)
|
||||
// ---------- 快速答题 ----------
|
||||
// 获取题目
|
||||
QuicklyGetQuestion(ctx context.Context, in *QuicklyGetQuestionReq, opts ...grpc.CallOption) (*QuicklyGetQuestionResp, error)
|
||||
// 回答题目
|
||||
QuicklyAnswerQuestion(ctx context.Context, in *QuicklyAnswerQuestionReq, opts ...grpc.CallOption) (*QuicklyAnswerQuestionResp, error)
|
||||
// ---------- 答题记录 ----------
|
||||
// 获取答题记录
|
||||
GetRecord(ctx context.Context, in *GetRecordReq, opts ...grpc.CallOption) (*GetRecordResp, error)
|
||||
// 获取具体的题目
|
||||
GetQuestionInfo(ctx context.Context, in *GetQuestionInfoReq, opts ...grpc.CallOption) (*GetQuestionInfoResp, error)
|
||||
}
|
||||
|
||||
type qgdzsClient struct {
|
||||
@@ -53,27 +65,18 @@ func (c *qgdzsClient) GenerateQuestion(ctx context.Context, in *GenerateQuestion
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) GetQuestion(ctx context.Context, in *GetQuestionReq, opts ...grpc.CallOption) (*GetQuestionResp, error) {
|
||||
out := new(GetQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/GetQuestion", in, out, opts...)
|
||||
func (c *qgdzsClient) RandomGetQuestion(ctx context.Context, in *RandomGetQuestionReq, opts ...grpc.CallOption) (*RandomGetQuestionResp, error) {
|
||||
out := new(RandomGetQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/RandomGetQuestion", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) GetQuestionInfo(ctx context.Context, in *GetQuestionInfoReq, opts ...grpc.CallOption) (*GetQuestionInfoResp, error) {
|
||||
out := new(GetQuestionInfoResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/GetQuestionInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) AnswerQuestion(ctx context.Context, in *AnswerQuestionReq, opts ...grpc.CallOption) (*AnswerQuestionResp, error) {
|
||||
out := new(AnswerQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/AnswerQuestion", in, out, opts...)
|
||||
func (c *qgdzsClient) RandomAnswerQuestion(ctx context.Context, in *RandomAnswerQuestionReq, opts ...grpc.CallOption) (*RandomAnswerQuestionResp, error) {
|
||||
out := new(RandomAnswerQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/RandomAnswerQuestion", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -89,6 +92,42 @@ func (c *qgdzsClient) GetAllCategory(ctx context.Context, in *GetAllCategoryReq,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) CategoryGetQuestion(ctx context.Context, in *CategoryGetQuestionReq, opts ...grpc.CallOption) (*CategoryGetQuestionResp, error) {
|
||||
out := new(CategoryGetQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/CategoryGetQuestion", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) CategoryAnswerQuestion(ctx context.Context, in *CategoryAnswerQuestionReq, opts ...grpc.CallOption) (*CategoryAnswerQuestionResp, error) {
|
||||
out := new(CategoryAnswerQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/CategoryAnswerQuestion", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) QuicklyGetQuestion(ctx context.Context, in *QuicklyGetQuestionReq, opts ...grpc.CallOption) (*QuicklyGetQuestionResp, error) {
|
||||
out := new(QuicklyGetQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/QuicklyGetQuestion", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) QuicklyAnswerQuestion(ctx context.Context, in *QuicklyAnswerQuestionReq, opts ...grpc.CallOption) (*QuicklyAnswerQuestionResp, error) {
|
||||
out := new(QuicklyAnswerQuestionResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/QuicklyAnswerQuestion", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) GetRecord(ctx context.Context, in *GetRecordReq, opts ...grpc.CallOption) (*GetRecordResp, error) {
|
||||
out := new(GetRecordResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/GetRecord", in, out, opts...)
|
||||
@@ -98,22 +137,43 @@ func (c *qgdzsClient) GetRecord(ctx context.Context, in *GetRecordReq, opts ...g
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *qgdzsClient) GetQuestionInfo(ctx context.Context, in *GetQuestionInfoReq, opts ...grpc.CallOption) (*GetQuestionInfoResp, error) {
|
||||
out := new(GetQuestionInfoResp)
|
||||
err := c.cc.Invoke(ctx, "/Qgdzs/GetQuestionInfo", 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
|
||||
type QgdzsServer interface {
|
||||
// 生成题目
|
||||
GenerateQuestion(context.Context, *GenerateQuestionReq) (*GenerateQuestionResp, error)
|
||||
// ---------- 随机答题 ----------
|
||||
// 获取题目
|
||||
GetQuestion(context.Context, *GetQuestionReq) (*GetQuestionResp, error)
|
||||
// 获取具体的题目
|
||||
GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error)
|
||||
RandomGetQuestion(context.Context, *RandomGetQuestionReq) (*RandomGetQuestionResp, error)
|
||||
// 回答题目
|
||||
AnswerQuestion(context.Context, *AnswerQuestionReq) (*AnswerQuestionResp, error)
|
||||
RandomAnswerQuestion(context.Context, *RandomAnswerQuestionReq) (*RandomAnswerQuestionResp, error)
|
||||
// ---------- 类目答题 ----------
|
||||
// 获取所有类目
|
||||
GetAllCategory(context.Context, *GetAllCategoryReq) (*GetAllCategoryResp, error)
|
||||
// 获取题目
|
||||
CategoryGetQuestion(context.Context, *CategoryGetQuestionReq) (*CategoryGetQuestionResp, error)
|
||||
// 回答题目
|
||||
CategoryAnswerQuestion(context.Context, *CategoryAnswerQuestionReq) (*CategoryAnswerQuestionResp, error)
|
||||
// ---------- 快速答题 ----------
|
||||
// 获取题目
|
||||
QuicklyGetQuestion(context.Context, *QuicklyGetQuestionReq) (*QuicklyGetQuestionResp, error)
|
||||
// 回答题目
|
||||
QuicklyAnswerQuestion(context.Context, *QuicklyAnswerQuestionReq) (*QuicklyAnswerQuestionResp, error)
|
||||
// ---------- 答题记录 ----------
|
||||
// 获取答题记录
|
||||
GetRecord(context.Context, *GetRecordReq) (*GetRecordResp, error)
|
||||
// 获取具体的题目
|
||||
GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error)
|
||||
mustEmbedUnimplementedQgdzsServer()
|
||||
}
|
||||
|
||||
@@ -124,21 +184,33 @@ type UnimplementedQgdzsServer struct {
|
||||
func (UnimplementedQgdzsServer) GenerateQuestion(context.Context, *GenerateQuestionReq) (*GenerateQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GenerateQuestion not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) GetQuestion(context.Context, *GetQuestionReq) (*GetQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuestion not implemented")
|
||||
func (UnimplementedQgdzsServer) RandomGetQuestion(context.Context, *RandomGetQuestionReq) (*RandomGetQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RandomGetQuestion not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuestionInfo not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) AnswerQuestion(context.Context, *AnswerQuestionReq) (*AnswerQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AnswerQuestion not implemented")
|
||||
func (UnimplementedQgdzsServer) RandomAnswerQuestion(context.Context, *RandomAnswerQuestionReq) (*RandomAnswerQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RandomAnswerQuestion not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) GetAllCategory(context.Context, *GetAllCategoryReq) (*GetAllCategoryResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAllCategory not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) CategoryGetQuestion(context.Context, *CategoryGetQuestionReq) (*CategoryGetQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CategoryGetQuestion not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) CategoryAnswerQuestion(context.Context, *CategoryAnswerQuestionReq) (*CategoryAnswerQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CategoryAnswerQuestion not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) QuicklyGetQuestion(context.Context, *QuicklyGetQuestionReq) (*QuicklyGetQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QuicklyGetQuestion not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) QuicklyAnswerQuestion(context.Context, *QuicklyAnswerQuestionReq) (*QuicklyAnswerQuestionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QuicklyAnswerQuestion not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) GetRecord(context.Context, *GetRecordReq) (*GetRecordResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRecord not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) GetQuestionInfo(context.Context, *GetQuestionInfoReq) (*GetQuestionInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuestionInfo not implemented")
|
||||
}
|
||||
func (UnimplementedQgdzsServer) mustEmbedUnimplementedQgdzsServer() {}
|
||||
|
||||
// UnsafeQgdzsServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -170,56 +242,38 @@ func _Qgdzs_GenerateQuestion_Handler(srv interface{}, ctx context.Context, dec f
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_GetQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetQuestionReq)
|
||||
func _Qgdzs_RandomGetQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RandomGetQuestionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).GetQuestion(ctx, in)
|
||||
return srv.(QgdzsServer).RandomGetQuestion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/GetQuestion",
|
||||
FullMethod: "/Qgdzs/RandomGetQuestion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).GetQuestion(ctx, req.(*GetQuestionReq))
|
||||
return srv.(QgdzsServer).RandomGetQuestion(ctx, req.(*RandomGetQuestionReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_GetQuestionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetQuestionInfoReq)
|
||||
func _Qgdzs_RandomAnswerQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RandomAnswerQuestionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).GetQuestionInfo(ctx, in)
|
||||
return srv.(QgdzsServer).RandomAnswerQuestion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/GetQuestionInfo",
|
||||
FullMethod: "/Qgdzs/RandomAnswerQuestion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).GetQuestionInfo(ctx, req.(*GetQuestionInfoReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_AnswerQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AnswerQuestionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).AnswerQuestion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/AnswerQuestion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).AnswerQuestion(ctx, req.(*AnswerQuestionReq))
|
||||
return srv.(QgdzsServer).RandomAnswerQuestion(ctx, req.(*RandomAnswerQuestionReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -242,6 +296,78 @@ func _Qgdzs_GetAllCategory_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_CategoryGetQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CategoryGetQuestionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).CategoryGetQuestion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/CategoryGetQuestion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).CategoryGetQuestion(ctx, req.(*CategoryGetQuestionReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_CategoryAnswerQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CategoryAnswerQuestionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).CategoryAnswerQuestion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/CategoryAnswerQuestion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).CategoryAnswerQuestion(ctx, req.(*CategoryAnswerQuestionReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_QuicklyGetQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QuicklyGetQuestionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).QuicklyGetQuestion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/QuicklyGetQuestion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).QuicklyGetQuestion(ctx, req.(*QuicklyGetQuestionReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_QuicklyAnswerQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QuicklyAnswerQuestionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).QuicklyAnswerQuestion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/QuicklyAnswerQuestion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).QuicklyAnswerQuestion(ctx, req.(*QuicklyAnswerQuestionReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_GetRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetRecordReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -260,6 +386,24 @@ func _Qgdzs_GetRecord_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Qgdzs_GetQuestionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetQuestionInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QgdzsServer).GetQuestionInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Qgdzs/GetQuestionInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QgdzsServer).GetQuestionInfo(ctx, req.(*GetQuestionInfoReq))
|
||||
}
|
||||
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)
|
||||
@@ -272,25 +416,41 @@ var Qgdzs_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _Qgdzs_GenerateQuestion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetQuestion",
|
||||
Handler: _Qgdzs_GetQuestion_Handler,
|
||||
MethodName: "RandomGetQuestion",
|
||||
Handler: _Qgdzs_RandomGetQuestion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetQuestionInfo",
|
||||
Handler: _Qgdzs_GetQuestionInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AnswerQuestion",
|
||||
Handler: _Qgdzs_AnswerQuestion_Handler,
|
||||
MethodName: "RandomAnswerQuestion",
|
||||
Handler: _Qgdzs_RandomAnswerQuestion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetAllCategory",
|
||||
Handler: _Qgdzs_GetAllCategory_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CategoryGetQuestion",
|
||||
Handler: _Qgdzs_CategoryGetQuestion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CategoryAnswerQuestion",
|
||||
Handler: _Qgdzs_CategoryAnswerQuestion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QuicklyGetQuestion",
|
||||
Handler: _Qgdzs_QuicklyGetQuestion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QuicklyAnswerQuestion",
|
||||
Handler: _Qgdzs_QuicklyAnswerQuestion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetRecord",
|
||||
Handler: _Qgdzs_GetRecord_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetQuestionInfo",
|
||||
Handler: _Qgdzs_GetQuestionInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_qgdzs.proto",
|
||||
|
||||
@@ -26,9 +26,9 @@ type EnterReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
GatewaySID string `protobuf:"bytes,2,opt,name=GatewaySID,proto3" json:"GatewaySID,omitempty"` // 网关服务ID
|
||||
InstanceID int32 `protobuf:"varint,3,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"` // 副本ID
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
GatewaySID int64 `protobuf:"varint,2,opt,name=GatewaySID,proto3" json:"GatewaySID,omitempty"` // 网关服务ID
|
||||
InstanceID int32 `protobuf:"varint,3,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"` // 副本ID
|
||||
}
|
||||
|
||||
func (x *EnterReq) Reset() {
|
||||
@@ -63,18 +63,18 @@ func (*EnterReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *EnterReq) GetUSN() string {
|
||||
func (x *EnterReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterReq) GetGatewaySID() string {
|
||||
func (x *EnterReq) GetGatewaySID() int64 {
|
||||
if x != nil {
|
||||
return x.GatewaySID
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterReq) GetInstanceID() int32 {
|
||||
@@ -89,8 +89,8 @@ type EnterResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SceneSID string `protobuf:"bytes,1,opt,name=SceneSID,proto3" json:"SceneSID,omitempty"` // 场景服务ID
|
||||
UniqueNo string `protobuf:"bytes,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
SceneSID int64 `protobuf:"varint,1,opt,name=SceneSID,proto3" json:"SceneSID,omitempty"` // 场景服务ID
|
||||
UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
MessageID int32 `protobuf:"varint,3,opt,name=MessageID,proto3" json:"MessageID,omitempty"` // 发送给客户端的消息ID
|
||||
Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` // 消息负载
|
||||
}
|
||||
@@ -127,18 +127,18 @@ func (*EnterResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *EnterResp) GetSceneSID() string {
|
||||
func (x *EnterResp) GetSceneSID() int64 {
|
||||
if x != nil {
|
||||
return x.SceneSID
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterResp) GetUniqueNo() string {
|
||||
func (x *EnterResp) GetUniqueNo() int64 {
|
||||
if x != nil {
|
||||
return x.UniqueNo
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterResp) GetMessageID() int32 {
|
||||
@@ -160,8 +160,8 @@ type LeaveReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
UniqueNo string `protobuf:"bytes,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
}
|
||||
|
||||
func (x *LeaveReq) Reset() {
|
||||
@@ -196,18 +196,18 @@ func (*LeaveReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *LeaveReq) GetUSN() string {
|
||||
func (x *LeaveReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LeaveReq) GetUniqueNo() string {
|
||||
func (x *LeaveReq) GetUniqueNo() int64 {
|
||||
if x != nil {
|
||||
return x.UniqueNo
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type LeaveResp struct {
|
||||
@@ -253,12 +253,12 @@ type ActionReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UniqueNo string `protobuf:"bytes,1,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
USN string `protobuf:"bytes,2,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
Action int32 `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"` // 指令ID
|
||||
DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×1000 缩放)
|
||||
DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×1000 缩放)
|
||||
SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
|
||||
UniqueNo int64 `protobuf:"varint,1,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
USN int64 `protobuf:"varint,2,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
Action int32 `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"` // 指令ID
|
||||
DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×1000 缩放)
|
||||
DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×1000 缩放)
|
||||
SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
|
||||
}
|
||||
|
||||
func (x *ActionReq) Reset() {
|
||||
@@ -293,18 +293,18 @@ func (*ActionReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetUniqueNo() string {
|
||||
func (x *ActionReq) GetUniqueNo() int64 {
|
||||
if x != nil {
|
||||
return x.UniqueNo
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetUSN() string {
|
||||
func (x *ActionReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetAction() int32 {
|
||||
@@ -379,27 +379,27 @@ var file_service_scene_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x08, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x03, 0x55, 0x53, 0x4e, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53,
|
||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||
0x79, 0x53, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x49, 0x44, 0x22, 0x7b, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x01, 0x28, 0x03, 0x52, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x22, 0x38, 0x0a, 0x08, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12,
|
||||
0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x4c,
|
||||
0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x4c,
|
||||
0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x93, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
||||
0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
||||
0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
||||
0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x03, 0x55, 0x53, 0x4e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x44, 0x69, 0x72, 0x58, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x58,
|
||||
|
||||
@@ -83,7 +83,7 @@ type PhoneLoginResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名
|
||||
}
|
||||
|
||||
@@ -119,11 +119,11 @@ func (*PhoneLoginResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *PhoneLoginResp) GetUSN() string {
|
||||
func (x *PhoneLoginResp) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PhoneLoginResp) GetName() string {
|
||||
@@ -186,7 +186,7 @@ type WxMiniLoginResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名
|
||||
}
|
||||
|
||||
@@ -222,11 +222,11 @@ func (*WxMiniLoginResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *WxMiniLoginResp) GetUSN() string {
|
||||
func (x *WxMiniLoginResp) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WxMiniLoginResp) GetName() string {
|
||||
@@ -242,7 +242,7 @@ type GetUserInfoReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetUserInfoReq) Reset() {
|
||||
@@ -277,11 +277,11 @@ func (*GetUserInfoReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoReq) GetUSN() string {
|
||||
func (x *GetUserInfoReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetUserInfoResp struct {
|
||||
@@ -289,7 +289,7 @@ type GetUserInfoResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"`
|
||||
}
|
||||
|
||||
@@ -325,11 +325,11 @@ func (*GetUserInfoResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResp) GetUSN() string {
|
||||
func (x *GetUserInfoResp) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResp) GetName() string {
|
||||
@@ -351,19 +351,19 @@ var file_service_user_proto_rawDesc = []byte{
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x36,
|
||||
0x0a, 0x0e, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75,
|
||||
0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0e, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69,
|
||||
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x37, 0x0a, 0x0f,
|
||||
0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73,
|
||||
0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73,
|
||||
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x22, 0x37, 0x0a, 0x0f, 0x47, 0x65, 0x74,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x22, 0x37, 0x0a, 0x0f, 0x47, 0x65, 0x74,
|
||||
0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12,
|
||||
0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x32, 0xb9, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x0a, 0x50,
|
||||
0x68, 0x6f, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x2e, 0x50, 0x68, 0x6f, 0x6e,
|
||||
|
||||
@@ -10,7 +10,7 @@ service Gateway {
|
||||
}
|
||||
|
||||
message ToClientReq {
|
||||
string USN = 1;
|
||||
int64 USN = 1;
|
||||
int32 MessageID = 2;
|
||||
bytes Payload = 3;
|
||||
}
|
||||
@@ -19,7 +19,7 @@ message ToClientResp {
|
||||
}
|
||||
|
||||
message KickUserReq {
|
||||
string USN = 1;
|
||||
int64 USN = 1;
|
||||
}
|
||||
|
||||
message KickUserResp {
|
||||
|
||||
@@ -6,47 +6,33 @@ import "google/api/annotations.proto";
|
||||
|
||||
service Qgdzs {
|
||||
// 生成题目
|
||||
rpc GenerateQuestion(GenerateQuestionReq) returns (GenerateQuestionResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/qgdzs/auth/generate_question"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc GenerateQuestion(GenerateQuestionReq) returns (GenerateQuestionResp) {option (google.api.http) = {post: "/qgdzs/auth/generate_question" body: "*"};}
|
||||
|
||||
// ---------- 随机答题 ----------
|
||||
// 获取题目
|
||||
rpc GetQuestion(GetQuestionReq) returns (GetQuestionResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/qgdzs/open/get_question"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// 获取具体的题目
|
||||
rpc GetQuestionInfo(GetQuestionInfoReq) returns (GetQuestionInfoResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/qgdzs/open/get_question_info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc RandomGetQuestion(RandomGetQuestionReq) returns (RandomGetQuestionResp) {option (google.api.http) = {post: "/qgdzs/open/random/question" body: "*"};}
|
||||
// 回答题目
|
||||
rpc AnswerQuestion(AnswerQuestionReq) returns (AnswerQuestionResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/qgdzs/open/answer_question"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc RandomAnswerQuestion(RandomAnswerQuestionReq) returns (RandomAnswerQuestionResp) {option (google.api.http) = {post: "/qgdzs/open/random/answer" body: "*"};}
|
||||
|
||||
// ---------- 类目答题 ----------
|
||||
// 获取所有类目
|
||||
rpc GetAllCategory(GetAllCategoryReq) returns (GetAllCategoryResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/qgdzs/open/get_all_category"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc GetAllCategory(GetAllCategoryReq) returns (GetAllCategoryResp) {option (google.api.http) = {post: "/qgdzs/open/category/get_category" body: "*"};}
|
||||
// 获取题目
|
||||
rpc CategoryGetQuestion(CategoryGetQuestionReq) returns (CategoryGetQuestionResp) {option (google.api.http) = {post: "/qgdzs/open/category/question" body: "*"};}
|
||||
// 回答题目
|
||||
rpc CategoryAnswerQuestion(CategoryAnswerQuestionReq) returns (CategoryAnswerQuestionResp) {option (google.api.http) = {post: "/qgdzs/open/category/answer" body: "*"};}
|
||||
|
||||
// ---------- 快速答题 ----------
|
||||
// 获取题目
|
||||
rpc QuicklyGetQuestion(QuicklyGetQuestionReq) returns (QuicklyGetQuestionResp) {option (google.api.http) = {post: "/qgdzs/open/quickly/question" body: "*"};}
|
||||
// 回答题目
|
||||
rpc QuicklyAnswerQuestion(QuicklyAnswerQuestionReq) returns (QuicklyAnswerQuestionResp) {option (google.api.http) = {post: "/qgdzs/open/quickly/answer" body: "*"};}
|
||||
|
||||
// ---------- 答题记录 ----------
|
||||
// 获取答题记录
|
||||
rpc GetRecord(GetRecordReq) returns (GetRecordResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/qgdzs/auth/get_record"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc GetRecord(GetRecordReq) returns (GetRecordResp) {option (google.api.http) = {post: "/qgdzs/auth/get_record" body: "*"};}
|
||||
// 获取具体的题目
|
||||
rpc GetQuestionInfo(GetQuestionInfoReq) returns (GetQuestionInfoResp) {option (google.api.http) = {post: "/qgdzs/open/get_question_info" body: "*"};}
|
||||
}
|
||||
|
||||
// ---------- GenerateQuestion ----------
|
||||
@@ -56,37 +42,24 @@ message GenerateQuestionReq {
|
||||
message GenerateQuestionResp {
|
||||
}
|
||||
|
||||
// ---------- GetQuestion ----------
|
||||
message GetQuestionReq {
|
||||
string CategorySn = 1 [json_name = "category_sn"]; // 类目唯一标识
|
||||
// ---------- RandomGetQuestion ----------
|
||||
message RandomGetQuestionReq {
|
||||
}
|
||||
message GetQuestionResp {
|
||||
string Sn = 1 [json_name = "sn"]; // 题目唯一标识
|
||||
message RandomGetQuestionResp {
|
||||
int64 Sn = 1 [json_name = "sn"]; // 题目唯一标识
|
||||
string Question = 2 [json_name = "question"]; // 题干
|
||||
repeated string Options = 3 [json_name = "options"]; // 选项
|
||||
string Category = 4 [json_name = "category"]; // 题目类型
|
||||
int32 Difficulty = 5 [json_name = "difficulty"]; // 难度
|
||||
}
|
||||
|
||||
// ---------- GetQuestionInfo ----------
|
||||
message GetQuestionInfoReq {
|
||||
string QuestionSn = 1 [json_name = "question_sn"]; // 题目唯一标识
|
||||
}
|
||||
message GetQuestionInfoResp {
|
||||
string Question = 1 [json_name = "question"]; // 题干
|
||||
repeated string Options = 2 [json_name = "options"]; // 选项
|
||||
string Category = 3 [json_name = "category"]; // 类目
|
||||
int32 Difficulty = 4 [json_name = "difficulty"]; // 难度
|
||||
string Explanation = 5 [json_name = "explanation"]; // 解析
|
||||
}
|
||||
|
||||
// ---------- AnswerQuestion ----------
|
||||
message AnswerQuestionReq {
|
||||
string USN = 1 [json_name = "usn"];
|
||||
string Sn = 2 [json_name = "sn"]; // 题目唯一标识
|
||||
// ---------- RandomAnswerQuestion ----------
|
||||
message RandomAnswerQuestionReq {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
int64 Sn = 2 [json_name = "sn"]; // 题目唯一标识
|
||||
string Answer = 3 [json_name = "answer"]; // 答案
|
||||
}
|
||||
message AnswerQuestionResp {
|
||||
message RandomAnswerQuestionResp {
|
||||
string Answer = 1 [json_name = "answer"]; // 答案
|
||||
string Explanation = 2 [json_name = "explanation"]; // 解析
|
||||
}
|
||||
@@ -98,13 +71,58 @@ message GetAllCategoryResp {
|
||||
repeated GetAllCategoryItem Categories = 1 [json_name = "categories"]; // 类目
|
||||
}
|
||||
message GetAllCategoryItem {
|
||||
string Sn = 1 [json_name = "sn"]; // 唯一标识
|
||||
int64 Sn = 1 [json_name = "sn"]; // 唯一标识
|
||||
string Category = 2 [json_name = "category"]; // 类目
|
||||
}
|
||||
|
||||
// ---------- CategoryGetQuestion ----------
|
||||
message CategoryGetQuestionReq {
|
||||
int64 CategorySn = 1 [json_name = "category_sn"]; // 类目唯一标识
|
||||
}
|
||||
message CategoryGetQuestionResp {
|
||||
int64 Sn = 1 [json_name = "sn"]; // 题目唯一标识
|
||||
string Question = 2 [json_name = "question"]; // 题干
|
||||
repeated string Options = 3 [json_name = "options"]; // 选项
|
||||
string Category = 4 [json_name = "category"]; // 题目类型
|
||||
int32 Difficulty = 5 [json_name = "difficulty"]; // 难度
|
||||
}
|
||||
|
||||
// ---------- CategoryAnswerQuestion ----------
|
||||
message CategoryAnswerQuestionReq {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
int64 Sn = 2 [json_name = "sn"]; // 题目唯一标识
|
||||
string Answer = 3 [json_name = "answer"]; // 答案
|
||||
}
|
||||
message CategoryAnswerQuestionResp {
|
||||
string Answer = 1 [json_name = "answer"]; // 答案
|
||||
string Explanation = 2 [json_name = "explanation"]; // 解析
|
||||
}
|
||||
|
||||
// ---------- QuicklyGetQuestion ----------
|
||||
message QuicklyGetQuestionReq {
|
||||
}
|
||||
message QuicklyGetQuestionResp {
|
||||
int64 Sn = 1 [json_name = "sn"]; // 题目唯一标识
|
||||
string Question = 2 [json_name = "question"]; // 题干
|
||||
repeated string Options = 3 [json_name = "options"]; // 选项
|
||||
string Category = 4 [json_name = "category"]; // 题目类型
|
||||
int32 Difficulty = 5 [json_name = "difficulty"]; // 难度
|
||||
}
|
||||
|
||||
// ---------- QuicklyAnswerQuestion ----------
|
||||
message QuicklyAnswerQuestionReq {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
int64 Sn = 2 [json_name = "sn"]; // 题目唯一标识
|
||||
string Answer = 3 [json_name = "answer"]; // 答案
|
||||
}
|
||||
message QuicklyAnswerQuestionResp {
|
||||
string Answer = 1 [json_name = "answer"]; // 答案
|
||||
string Explanation = 2 [json_name = "explanation"]; // 解析
|
||||
}
|
||||
|
||||
// ---------- GetRecord ----------
|
||||
message GetRecordReq {
|
||||
string USN = 1 [json_name = "usn"];
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
int32 Page = 2 [json_name = "page"];
|
||||
int32 PageSize = 3 [json_name = "page_size"];
|
||||
}
|
||||
@@ -113,11 +131,23 @@ message GetRecordResp {
|
||||
repeated GetRecordItem Records = 2 [json_name = "records"]; // 记录
|
||||
}
|
||||
message GetRecordItem {
|
||||
string QuestionSn = 1 [json_name = "question_sn"]; // 题目唯一标识
|
||||
int64 QuestionSn = 1 [json_name = "question_sn"]; // 题目唯一标识
|
||||
string Question = 2 [json_name = "question"]; // 题干
|
||||
int32 Difficulty = 3 [json_name = "difficulty"]; // 难度
|
||||
string Category = 4 [json_name = "category"]; // 题目类型
|
||||
string QuestionAnswer = 5 [json_name = "question_answer"]; // 题目答案
|
||||
string Answer = 6 [json_name = "answer"]; // 用户答案
|
||||
int64 CreateTime = 7 [json_name = "create_time"]; // 创建时间
|
||||
}
|
||||
|
||||
// ---------- GetQuestionInfo ----------
|
||||
message GetQuestionInfoReq {
|
||||
int64 QuestionSn = 1 [json_name = "question_sn"]; // 题目唯一标识
|
||||
}
|
||||
message GetQuestionInfoResp {
|
||||
string Question = 1 [json_name = "question"]; // 题干
|
||||
repeated string Options = 2 [json_name = "options"]; // 选项
|
||||
string Category = 3 [json_name = "category"]; // 类目
|
||||
int32 Difficulty = 4 [json_name = "difficulty"]; // 难度
|
||||
string Explanation = 5 [json_name = "explanation"]; // 解析
|
||||
}
|
||||
@@ -10,29 +10,29 @@ service Scene {
|
||||
}
|
||||
|
||||
message EnterReq {
|
||||
string USN = 1; // 用户ID
|
||||
string GatewaySID = 2; // 网关服务ID
|
||||
int64 USN = 1; // 用户ID
|
||||
int64 GatewaySID = 2; // 网关服务ID
|
||||
int32 InstanceID = 3; // 副本ID
|
||||
}
|
||||
|
||||
message EnterResp {
|
||||
string SceneSID = 1; // 场景服务ID
|
||||
string UniqueNo = 2; // 副本唯一编号
|
||||
int64 SceneSID = 1; // 场景服务ID
|
||||
int64 UniqueNo = 2; // 副本唯一编号
|
||||
int32 MessageID = 3; // 发送给客户端的消息ID
|
||||
bytes Payload = 4; // 消息负载
|
||||
}
|
||||
|
||||
message LeaveReq {
|
||||
string USN = 1; // 用户ID
|
||||
string UniqueNo = 2; // 副本唯一编号
|
||||
int64 USN = 1; // 用户ID
|
||||
int64 UniqueNo = 2; // 副本唯一编号
|
||||
}
|
||||
|
||||
message LeaveResp {
|
||||
}
|
||||
|
||||
message ActionReq {
|
||||
string UniqueNo = 1; // 副本唯一编号
|
||||
string USN = 2; // 用户ID
|
||||
int64 UniqueNo = 1; // 副本唯一编号
|
||||
int64 USN = 2; // 用户ID
|
||||
int32 Action = 3; // 指令ID
|
||||
sint32 DirX = 4; // 移动-X方向(×1000 缩放)
|
||||
sint32 DirY = 5; // 移动-Y方向(×1000 缩放)
|
||||
|
||||
@@ -8,12 +8,7 @@ service User {
|
||||
rpc PhoneLogin(PhoneLoginReq) returns (PhoneLoginResp) {}
|
||||
rpc WxMiniLogin(WxMiniLoginReq) returns (WxMiniLoginResp) {}
|
||||
// 获取用户信息
|
||||
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/auth/info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {option (google.api.http) = {post: "/user/auth/info" body: "*"};}
|
||||
}
|
||||
|
||||
// ---------- PhoneLogin ----------
|
||||
@@ -22,7 +17,7 @@ message PhoneLoginReq {
|
||||
string Code = 2 [json_name = "code"]; // 验证码
|
||||
}
|
||||
message PhoneLoginResp {
|
||||
string USN = 1 [json_name = "usn"]; // 用户ID
|
||||
int64 USN = 1 [json_name = "usn"]; // 用户ID
|
||||
string Name = 2 [json_name = "name"]; // 用户名
|
||||
}
|
||||
|
||||
@@ -31,15 +26,15 @@ message WxMiniLoginReq {
|
||||
string Code = 1 [json_name = "code"]; // 微信小程序登录凭证
|
||||
}
|
||||
message WxMiniLoginResp {
|
||||
string USN = 1 [json_name = "usn"]; // 用户ID
|
||||
int64 USN = 1 [json_name = "usn"]; // 用户ID
|
||||
string Name = 2 [json_name = "name"]; // 用户名
|
||||
}
|
||||
|
||||
// ---------- GetUserInfo ----------
|
||||
message GetUserInfoReq {
|
||||
string USN = 1 [json_name = "usn"];
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
}
|
||||
message GetUserInfoResp {
|
||||
string USN = 1 [json_name = "usn"];
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
string Name = 2 [json_name = "name"];
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public static partial class ActionReflection {
|
||||
"bhIQCghTZXF1ZW5jZRgBIAEoDRIRCglUaW1lc3RhbXAYAiABKAMSGQoGQWN0",
|
||||
"aW9uGAMgASgOMgkuQWN0aW9uSUQSDAoERGlyWBgEIAEoERIMCgREaXJZGAUg",
|
||||
"ASgREg8KB1NraWxsSUQYBiABKAUiMQoMUG9zaXRpb25JbmZvEgsKA1VTThgB",
|
||||
"IAEoCRIJCgFYGAIgASgREgkKAVkYAyABKBEiKwoMUzJDX1Bvc2l0aW9uEhsK",
|
||||
"IAEoAxIJCgFYGAIgASgREgkKAVkYAyABKBEiKwoMUzJDX1Bvc2l0aW9uEhsK",
|
||||
"BEluZm8YASADKAsyDS5Qb3NpdGlvbkluZm8qSwoIQWN0aW9uSUQSFQoRQUNU",
|
||||
"SU9OX0lEX0lOVkFMSUQQABISCg5BQ1RJT05fSURfTU9WRRABEhQKEEFDVElP",
|
||||
"Tl9JRF9BVFRBQ0sQAkI0WjJnaXQuaGxzcS5hc2lhL21tb3JwZy9zZXJ2aWNl",
|
||||
@@ -902,13 +902,13 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
|
||||
/// <summary>Field number for the "USN" field.</summary>
|
||||
public const int USNFieldNumber = 1;
|
||||
private string uSN_ = "";
|
||||
private long uSN_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string USN {
|
||||
public long USN {
|
||||
get { return uSN_; }
|
||||
set {
|
||||
uSN_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
uSN_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -961,7 +961,7 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (USN.Length != 0) hash ^= USN.GetHashCode();
|
||||
if (USN != 0L) hash ^= USN.GetHashCode();
|
||||
if (X != 0) hash ^= X.GetHashCode();
|
||||
if (Y != 0) hash ^= Y.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
@@ -982,9 +982,9 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (USN.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(USN);
|
||||
if (USN != 0L) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt64(USN);
|
||||
}
|
||||
if (X != 0) {
|
||||
output.WriteRawTag(16);
|
||||
@@ -1004,9 +1004,9 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (USN.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(USN);
|
||||
if (USN != 0L) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt64(USN);
|
||||
}
|
||||
if (X != 0) {
|
||||
output.WriteRawTag(16);
|
||||
@@ -1026,8 +1026,8 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (USN.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(USN);
|
||||
if (USN != 0L) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt64Size(USN);
|
||||
}
|
||||
if (X != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeSInt32Size(X);
|
||||
@@ -1047,7 +1047,7 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.USN.Length != 0) {
|
||||
if (other.USN != 0L) {
|
||||
USN = other.USN;
|
||||
}
|
||||
if (other.X != 0) {
|
||||
@@ -1071,8 +1071,8 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
USN = input.ReadString();
|
||||
case 8: {
|
||||
USN = input.ReadInt64();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
@@ -1098,8 +1098,8 @@ public sealed partial class PositionInfo : pb::IMessage<PositionInfo>
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
USN = input.ReadString();
|
||||
case 8: {
|
||||
USN = input.ReadInt64();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
|
||||
@@ -259,9 +259,9 @@ type PositionInfo struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN string `protobuf:"bytes,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
X int32 `protobuf:"zigzag32,2,opt,name=X,proto3" json:"X,omitempty"`
|
||||
Y int32 `protobuf:"zigzag32,3,opt,name=Y,proto3" json:"Y,omitempty"`
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
X int32 `protobuf:"zigzag32,2,opt,name=X,proto3" json:"X,omitempty"`
|
||||
Y int32 `protobuf:"zigzag32,3,opt,name=Y,proto3" json:"Y,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PositionInfo) Reset() {
|
||||
@@ -296,11 +296,11 @@ func (*PositionInfo) Descriptor() ([]byte, []int) {
|
||||
return file_action_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *PositionInfo) GetUSN() string {
|
||||
func (x *PositionInfo) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PositionInfo) GetX() int32 {
|
||||
@@ -388,7 +388,7 @@ var file_action_proto_rawDesc = []byte{
|
||||
0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x22, 0x3c, 0x0a, 0x0c, 0x50, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53,
|
||||
0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x0c, 0x0a, 0x01,
|
||||
0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x0c, 0x0a, 0x01,
|
||||
0x58, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x58, 0x12, 0x0c, 0x0a, 0x01, 0x59, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x59, 0x22, 0x31, 0x0a, 0x0c, 0x53, 0x32, 0x43, 0x5f,
|
||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f,
|
||||
|
||||
@@ -28,7 +28,7 @@ message C2S_Action {
|
||||
|
||||
// MESSAGE_ID_POSITION
|
||||
message PositionInfo {
|
||||
string USN = 1;
|
||||
int64 USN = 1;
|
||||
sint32 X = 2;
|
||||
sint32 Y = 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user