feat 目录修改名称
This commit is contained in:
@@ -23,9 +23,13 @@ const _ = grpc.SupportPackageIsVersion7
|
|||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
type UserClient interface {
|
type UserClient interface {
|
||||||
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
|
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
|
||||||
|
// 获取用户信息
|
||||||
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
|
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
|
||||||
|
// 生成题目
|
||||||
GenerateQuestion(ctx context.Context, in *GenerateQuestionReq, opts ...grpc.CallOption) (*GenerateQuestionResp, error)
|
GenerateQuestion(ctx context.Context, in *GenerateQuestionReq, opts ...grpc.CallOption) (*GenerateQuestionResp, error)
|
||||||
|
// 获取题目
|
||||||
GetQuestion(ctx context.Context, in *GetQuestionReq, opts ...grpc.CallOption) (*GetQuestionResp, error)
|
GetQuestion(ctx context.Context, in *GetQuestionReq, opts ...grpc.CallOption) (*GetQuestionResp, error)
|
||||||
|
// 回答题目
|
||||||
AnswerQuestion(ctx context.Context, in *AnswerQuestionReq, opts ...grpc.CallOption) (*AnswerQuestionResp, error)
|
AnswerQuestion(ctx context.Context, in *AnswerQuestionReq, opts ...grpc.CallOption) (*AnswerQuestionResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,9 +91,13 @@ func (c *userClient) AnswerQuestion(ctx context.Context, in *AnswerQuestionReq,
|
|||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
type UserServer interface {
|
type UserServer interface {
|
||||||
Login(context.Context, *LoginReq) (*LoginResp, error)
|
Login(context.Context, *LoginReq) (*LoginResp, error)
|
||||||
|
// 获取用户信息
|
||||||
GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
|
GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
|
||||||
|
// 生成题目
|
||||||
GenerateQuestion(context.Context, *GenerateQuestionReq) (*GenerateQuestionResp, error)
|
GenerateQuestion(context.Context, *GenerateQuestionReq) (*GenerateQuestionResp, error)
|
||||||
|
// 获取题目
|
||||||
GetQuestion(context.Context, *GetQuestionReq) (*GetQuestionResp, error)
|
GetQuestion(context.Context, *GetQuestionReq) (*GetQuestionResp, error)
|
||||||
|
// 回答题目
|
||||||
AnswerQuestion(context.Context, *AnswerQuestionReq) (*AnswerQuestionResp, error)
|
AnswerQuestion(context.Context, *AnswerQuestionReq) (*AnswerQuestionResp, error)
|
||||||
mustEmbedUnimplementedUserServer()
|
mustEmbedUnimplementedUserServer()
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"/user/answer_question": {
|
"/user/answer_question": {
|
||||||
"post": {
|
"post": {
|
||||||
|
"summary": "回答题目",
|
||||||
"operationId": "User_AnswerQuestion",
|
"operationId": "User_AnswerQuestion",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@@ -50,6 +51,7 @@
|
|||||||
},
|
},
|
||||||
"/user/generate_question": {
|
"/user/generate_question": {
|
||||||
"post": {
|
"post": {
|
||||||
|
"summary": "生成题目",
|
||||||
"operationId": "User_GenerateQuestion",
|
"operationId": "User_GenerateQuestion",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@@ -82,6 +84,7 @@
|
|||||||
},
|
},
|
||||||
"/user/get_question": {
|
"/user/get_question": {
|
||||||
"post": {
|
"post": {
|
||||||
|
"summary": "获取题目",
|
||||||
"operationId": "User_GetQuestion",
|
"operationId": "User_GetQuestion",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@@ -114,6 +117,7 @@
|
|||||||
},
|
},
|
||||||
"/user/info": {
|
"/user/info": {
|
||||||
"post": {
|
"post": {
|
||||||
|
"summary": "获取用户信息",
|
||||||
"operationId": "User_GetUserInfo",
|
"operationId": "User_GetUserInfo",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@@ -6,24 +6,28 @@ import "google/api/annotations.proto";
|
|||||||
|
|
||||||
service User {
|
service User {
|
||||||
rpc Login(LoginReq) returns (LoginResp) {}
|
rpc Login(LoginReq) returns (LoginResp) {}
|
||||||
|
// 获取用户信息
|
||||||
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
|
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
post: "/user/info"
|
post: "/user/info"
|
||||||
body: "*"
|
body: "*"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// 生成题目
|
||||||
rpc GenerateQuestion(GenerateQuestionReq) returns (GenerateQuestionResp) {
|
rpc GenerateQuestion(GenerateQuestionReq) returns (GenerateQuestionResp) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
post: "/user/generate_question"
|
post: "/user/generate_question"
|
||||||
body: "*"
|
body: "*"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// 获取题目
|
||||||
rpc GetQuestion(GetQuestionReq) returns (GetQuestionResp) {
|
rpc GetQuestion(GetQuestionReq) returns (GetQuestionResp) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
post: "/user/get_question"
|
post: "/user/get_question"
|
||||||
body: "*"
|
body: "*"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// 回答题目
|
||||||
rpc AnswerQuestion(AnswerQuestionReq) returns (AnswerQuestionResp) {
|
rpc AnswerQuestion(AnswerQuestionReq) returns (AnswerQuestionResp) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
post: "/user/answer_question"
|
post: "/user/answer_question"
|
||||||
Reference in New Issue
Block a user