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.
|
||||
type UserClient interface {
|
||||
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
|
||||
// 获取用户信息
|
||||
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
|
||||
// 生成题目
|
||||
GenerateQuestion(ctx context.Context, in *GenerateQuestionReq, opts ...grpc.CallOption) (*GenerateQuestionResp, error)
|
||||
// 获取题目
|
||||
GetQuestion(ctx context.Context, in *GetQuestionReq, opts ...grpc.CallOption) (*GetQuestionResp, 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
|
||||
type UserServer interface {
|
||||
Login(context.Context, *LoginReq) (*LoginResp, error)
|
||||
// 获取用户信息
|
||||
GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
|
||||
// 生成题目
|
||||
GenerateQuestion(context.Context, *GenerateQuestionReq) (*GenerateQuestionResp, error)
|
||||
// 获取题目
|
||||
GetQuestion(context.Context, *GetQuestionReq) (*GetQuestionResp, error)
|
||||
// 回答题目
|
||||
AnswerQuestion(context.Context, *AnswerQuestionReq) (*AnswerQuestionResp, error)
|
||||
mustEmbedUnimplementedUserServer()
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
"paths": {
|
||||
"/user/answer_question": {
|
||||
"post": {
|
||||
"summary": "回答题目",
|
||||
"operationId": "User_AnswerQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -50,6 +51,7 @@
|
||||
},
|
||||
"/user/generate_question": {
|
||||
"post": {
|
||||
"summary": "生成题目",
|
||||
"operationId": "User_GenerateQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -82,6 +84,7 @@
|
||||
},
|
||||
"/user/get_question": {
|
||||
"post": {
|
||||
"summary": "获取题目",
|
||||
"operationId": "User_GetQuestion",
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -114,6 +117,7 @@
|
||||
},
|
||||
"/user/info": {
|
||||
"post": {
|
||||
"summary": "获取用户信息",
|
||||
"operationId": "User_GetUserInfo",
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -6,24 +6,28 @@ import "google/api/annotations.proto";
|
||||
|
||||
service User {
|
||||
rpc Login(LoginReq) returns (LoginResp) {}
|
||||
// 获取用户信息
|
||||
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// 生成题目
|
||||
rpc GenerateQuestion(GenerateQuestionReq) returns (GenerateQuestionResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/generate_question"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// 获取题目
|
||||
rpc GetQuestion(GetQuestionReq) returns (GetQuestionResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/get_question"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// 回答题目
|
||||
rpc AnswerQuestion(AnswerQuestionReq) returns (AnswerQuestionResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/answer_question"
|
||||
Reference in New Issue
Block a user