Documentation ¶
Overview ¶
Package user is a generated GoMock package.
Index ¶
- func ModelToReply(userM *model.UserM) *v1.UserReply
- func New(ds store.IStore) *userBiz
- type MockUserBiz
- func (m *MockUserBiz) Create(arg0 context.Context, arg1 *v1.CreateUserRequest) (*v1.UserReply, error)
- func (m *MockUserBiz) Delete(arg0 context.Context, arg1 *v1.DeleteUserRequest) error
- func (m *MockUserBiz) EXPECT() *MockUserBizMockRecorder
- func (m *MockUserBiz) Get(arg0 context.Context, arg1 *v1.GetUserRequest) (*v1.UserReply, error)
- func (m *MockUserBiz) List(arg0 context.Context, arg1 *v1.ListUserRequest) (*v1.ListUserResponse, error)
- func (m *MockUserBiz) Update(arg0 context.Context, arg1 *v1.UpdateUserRequest) error
- func (m *MockUserBiz) UpdatePassword(arg0 context.Context, arg1 *v1.UpdatePasswordRequest) error
- type MockUserBizMockRecorder
- func (mr *MockUserBizMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockUserBizMockRecorder) Delete(arg0, arg1 any) *gomock.Call
- func (mr *MockUserBizMockRecorder) Get(arg0, arg1 any) *gomock.Call
- func (mr *MockUserBizMockRecorder) List(arg0, arg1 any) *gomock.Call
- func (mr *MockUserBizMockRecorder) Update(arg0, arg1 any) *gomock.Call
- func (mr *MockUserBizMockRecorder) UpdatePassword(arg0, arg1 any) *gomock.Call
- type UserBiz
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModelToReply ¶
ModelToReply converts a model.UserM to a v1.UserReply. It copies the data from userM to user and sets the CreatedAt and UpdatedAt fields to their respective timestamps.
Types ¶
type MockUserBiz ¶
type MockUserBiz struct {
// contains filtered or unexported fields
}
MockUserBiz is a mock of UserBiz interface.
func NewMockUserBiz ¶
func NewMockUserBiz(ctrl *gomock.Controller) *MockUserBiz
NewMockUserBiz creates a new mock instance.
func (*MockUserBiz) Create ¶
func (m *MockUserBiz) Create(arg0 context.Context, arg1 *v1.CreateUserRequest) (*v1.UserReply, error)
Create mocks base method.
func (*MockUserBiz) Delete ¶
func (m *MockUserBiz) Delete(arg0 context.Context, arg1 *v1.DeleteUserRequest) error
Delete mocks base method.
func (*MockUserBiz) EXPECT ¶
func (m *MockUserBiz) EXPECT() *MockUserBizMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserBiz) Get ¶
func (m *MockUserBiz) Get(arg0 context.Context, arg1 *v1.GetUserRequest) (*v1.UserReply, error)
Get mocks base method.
func (*MockUserBiz) List ¶
func (m *MockUserBiz) List(arg0 context.Context, arg1 *v1.ListUserRequest) (*v1.ListUserResponse, error)
List mocks base method.
func (*MockUserBiz) Update ¶
func (m *MockUserBiz) Update(arg0 context.Context, arg1 *v1.UpdateUserRequest) error
Update mocks base method.
func (*MockUserBiz) UpdatePassword ¶
func (m *MockUserBiz) UpdatePassword(arg0 context.Context, arg1 *v1.UpdatePasswordRequest) error
UpdatePassword mocks base method.
type MockUserBizMockRecorder ¶
type MockUserBizMockRecorder struct {
// contains filtered or unexported fields
}
MockUserBizMockRecorder is the mock recorder for MockUserBiz.
func (*MockUserBizMockRecorder) Create ¶
func (mr *MockUserBizMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockUserBizMockRecorder) Delete ¶
func (mr *MockUserBizMockRecorder) Delete(arg0, arg1 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockUserBizMockRecorder) Get ¶
func (mr *MockUserBizMockRecorder) Get(arg0, arg1 any) *gomock.Call
Get indicates an expected call of Get.
func (*MockUserBizMockRecorder) List ¶
func (mr *MockUserBizMockRecorder) List(arg0, arg1 any) *gomock.Call
List indicates an expected call of List.
func (*MockUserBizMockRecorder) Update ¶
func (mr *MockUserBizMockRecorder) Update(arg0, arg1 any) *gomock.Call
Update indicates an expected call of Update.
func (*MockUserBizMockRecorder) UpdatePassword ¶
func (mr *MockUserBizMockRecorder) UpdatePassword(arg0, arg1 any) *gomock.Call
UpdatePassword indicates an expected call of UpdatePassword.
type UserBiz ¶
type UserBiz interface { Create(ctx context.Context, rq *v1.CreateUserRequest) (*v1.UserReply, error) List(ctx context.Context, rq *v1.ListUserRequest) (*v1.ListUserResponse, error) Get(ctx context.Context, rq *v1.GetUserRequest) (*v1.UserReply, error) Update(ctx context.Context, rq *v1.UpdateUserRequest) error Delete(ctx context.Context, rq *v1.DeleteUserRequest) error // extensions apis UpdatePassword(ctx context.Context, rq *v1.UpdatePasswordRequest) error }
UserBiz defines methods used to handle user request.