feat 协议

This commit is contained in:
2026-01-14 14:33:22 +08:00
parent 1c90e21050
commit 29d5444082

View File

@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: ./proto/ss/grpc_pb/service_user_grpc.pb.go
// Source: ./proto/rs/grpc_pb/service_user_grpc.pb.go
// Package mocks is a generated GoMock package.
package mocks
@@ -36,66 +36,6 @@ func (m *MockUserClient) EXPECT() *MockUserClientMockRecorder {
return m.recorder
}
// AnswerQuestion mocks base method.
func (m *MockUserClient) AnswerQuestion(ctx context.Context, in *grpc_pb.AnswerQuestionReq, opts ...grpc.CallOption) (*grpc_pb.AnswerQuestionResp, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AnswerQuestion", varargs...)
ret0, _ := ret[0].(*grpc_pb.AnswerQuestionResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AnswerQuestion indicates an expected call of AnswerQuestion.
func (mr *MockUserClientMockRecorder) AnswerQuestion(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnswerQuestion", reflect.TypeOf((*MockUserClient)(nil).AnswerQuestion), varargs...)
}
// GenerateQuestion mocks base method.
func (m *MockUserClient) GenerateQuestion(ctx context.Context, in *grpc_pb.GenerateQuestionReq, opts ...grpc.CallOption) (*grpc_pb.GenerateQuestionResp, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GenerateQuestion", varargs...)
ret0, _ := ret[0].(*grpc_pb.GenerateQuestionResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GenerateQuestion indicates an expected call of GenerateQuestion.
func (mr *MockUserClientMockRecorder) GenerateQuestion(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateQuestion", reflect.TypeOf((*MockUserClient)(nil).GenerateQuestion), varargs...)
}
// GetQuestion mocks base method.
func (m *MockUserClient) GetQuestion(ctx context.Context, in *grpc_pb.GetQuestionReq, opts ...grpc.CallOption) (*grpc_pb.GetQuestionResp, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetQuestion", varargs...)
ret0, _ := ret[0].(*grpc_pb.GetQuestionResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetQuestion indicates an expected call of GetQuestion.
func (mr *MockUserClientMockRecorder) GetQuestion(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQuestion", reflect.TypeOf((*MockUserClient)(nil).GetQuestion), varargs...)
}
// GetUserInfo mocks base method.
func (m *MockUserClient) GetUserInfo(ctx context.Context, in *grpc_pb.GetUserInfoReq, opts ...grpc.CallOption) (*grpc_pb.GetUserInfoResp, error) {
m.ctrl.T.Helper()
@@ -116,24 +56,44 @@ func (mr *MockUserClientMockRecorder) GetUserInfo(ctx, in interface{}, opts ...i
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserInfo", reflect.TypeOf((*MockUserClient)(nil).GetUserInfo), varargs...)
}
// Login mocks base method.
func (m *MockUserClient) Login(ctx context.Context, in *grpc_pb.LoginReq, opts ...grpc.CallOption) (*grpc_pb.LoginResp, error) {
// PhoneLogin mocks base method.
func (m *MockUserClient) PhoneLogin(ctx context.Context, in *grpc_pb.PhoneLoginReq, opts ...grpc.CallOption) (*grpc_pb.PhoneLoginResp, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Login", varargs...)
ret0, _ := ret[0].(*grpc_pb.LoginResp)
ret := m.ctrl.Call(m, "PhoneLogin", varargs...)
ret0, _ := ret[0].(*grpc_pb.PhoneLoginResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Login indicates an expected call of Login.
func (mr *MockUserClientMockRecorder) Login(ctx, in interface{}, opts ...interface{}) *gomock.Call {
// PhoneLogin indicates an expected call of PhoneLogin.
func (mr *MockUserClientMockRecorder) PhoneLogin(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockUserClient)(nil).Login), varargs...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PhoneLogin", reflect.TypeOf((*MockUserClient)(nil).PhoneLogin), varargs...)
}
// WxMiniLogin mocks base method.
func (m *MockUserClient) WxMiniLogin(ctx context.Context, in *grpc_pb.WxMiniLoginReq, opts ...grpc.CallOption) (*grpc_pb.WxMiniLoginResp, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "WxMiniLogin", varargs...)
ret0, _ := ret[0].(*grpc_pb.WxMiniLoginResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// WxMiniLogin indicates an expected call of WxMiniLogin.
func (mr *MockUserClientMockRecorder) WxMiniLogin(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WxMiniLogin", reflect.TypeOf((*MockUserClient)(nil).WxMiniLogin), varargs...)
}
// MockUserServer is a mock of UserServer interface.
@@ -159,51 +119,6 @@ func (m *MockUserServer) EXPECT() *MockUserServerMockRecorder {
return m.recorder
}
// AnswerQuestion mocks base method.
func (m *MockUserServer) AnswerQuestion(arg0 context.Context, arg1 *grpc_pb.AnswerQuestionReq) (*grpc_pb.AnswerQuestionResp, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AnswerQuestion", arg0, arg1)
ret0, _ := ret[0].(*grpc_pb.AnswerQuestionResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AnswerQuestion indicates an expected call of AnswerQuestion.
func (mr *MockUserServerMockRecorder) AnswerQuestion(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnswerQuestion", reflect.TypeOf((*MockUserServer)(nil).AnswerQuestion), arg0, arg1)
}
// GenerateQuestion mocks base method.
func (m *MockUserServer) GenerateQuestion(arg0 context.Context, arg1 *grpc_pb.GenerateQuestionReq) (*grpc_pb.GenerateQuestionResp, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GenerateQuestion", arg0, arg1)
ret0, _ := ret[0].(*grpc_pb.GenerateQuestionResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GenerateQuestion indicates an expected call of GenerateQuestion.
func (mr *MockUserServerMockRecorder) GenerateQuestion(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateQuestion", reflect.TypeOf((*MockUserServer)(nil).GenerateQuestion), arg0, arg1)
}
// GetQuestion mocks base method.
func (m *MockUserServer) GetQuestion(arg0 context.Context, arg1 *grpc_pb.GetQuestionReq) (*grpc_pb.GetQuestionResp, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetQuestion", arg0, arg1)
ret0, _ := ret[0].(*grpc_pb.GetQuestionResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetQuestion indicates an expected call of GetQuestion.
func (mr *MockUserServerMockRecorder) GetQuestion(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQuestion", reflect.TypeOf((*MockUserServer)(nil).GetQuestion), arg0, arg1)
}
// GetUserInfo mocks base method.
func (m *MockUserServer) GetUserInfo(arg0 context.Context, arg1 *grpc_pb.GetUserInfoReq) (*grpc_pb.GetUserInfoResp, error) {
m.ctrl.T.Helper()
@@ -219,19 +134,34 @@ func (mr *MockUserServerMockRecorder) GetUserInfo(arg0, arg1 interface{}) *gomoc
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserInfo", reflect.TypeOf((*MockUserServer)(nil).GetUserInfo), arg0, arg1)
}
// Login mocks base method.
func (m *MockUserServer) Login(arg0 context.Context, arg1 *grpc_pb.LoginReq) (*grpc_pb.LoginResp, error) {
// PhoneLogin mocks base method.
func (m *MockUserServer) PhoneLogin(arg0 context.Context, arg1 *grpc_pb.PhoneLoginReq) (*grpc_pb.PhoneLoginResp, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Login", arg0, arg1)
ret0, _ := ret[0].(*grpc_pb.LoginResp)
ret := m.ctrl.Call(m, "PhoneLogin", arg0, arg1)
ret0, _ := ret[0].(*grpc_pb.PhoneLoginResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Login indicates an expected call of Login.
func (mr *MockUserServerMockRecorder) Login(arg0, arg1 interface{}) *gomock.Call {
// PhoneLogin indicates an expected call of PhoneLogin.
func (mr *MockUserServerMockRecorder) PhoneLogin(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockUserServer)(nil).Login), arg0, arg1)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PhoneLogin", reflect.TypeOf((*MockUserServer)(nil).PhoneLogin), arg0, arg1)
}
// WxMiniLogin mocks base method.
func (m *MockUserServer) WxMiniLogin(arg0 context.Context, arg1 *grpc_pb.WxMiniLoginReq) (*grpc_pb.WxMiniLoginResp, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WxMiniLogin", arg0, arg1)
ret0, _ := ret[0].(*grpc_pb.WxMiniLoginResp)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// WxMiniLogin indicates an expected call of WxMiniLogin.
func (mr *MockUserServerMockRecorder) WxMiniLogin(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WxMiniLogin", reflect.TypeOf((*MockUserServer)(nil).WxMiniLogin), arg0, arg1)
}
// mustEmbedUnimplementedUserServer mocks base method.