app

package
v0.0.0-...-2ec8670 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package app is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegisteredUserEvent

func NewRegisteredUserEvent(user *User) *dataflow.Message

Types

type DeleteUserRequest

type DeleteUserRequest struct {
}

type LoginUserRequest

type LoginUserRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type MockUserRepository

type MockUserRepository struct {
	// contains filtered or unexported fields
}

MockUserRepository is a mock of UserRepository interface.

func NewMockUserRepository

func NewMockUserRepository(ctrl *gomock.Controller) *MockUserRepository

NewMockUserRepository creates a new mock instance.

func (*MockUserRepository) CreteUser

func (m *MockUserRepository) CreteUser(ctx context.Context, user *User) error

CreteUser mocks base method.

func (*MockUserRepository) DeleteUser

func (m *MockUserRepository) DeleteUser(ctx context.Context, user *User) error

DeleteUser mocks base method.

func (*MockUserRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUserRepository) LockUserById

func (m *MockUserRepository) LockUserById(ctx context.Context, userId string) (User, error)

LockUserById mocks base method.

func (*MockUserRepository) LoginUser

LoginUser mocks base method.

func (*MockUserRepository) QueryMultiUserByFilter

func (m *MockUserRepository) QueryMultiUserByFilter(ctx context.Context, filter *QueryMultiUserRequest) (MultiUserResponse, error)

QueryMultiUserByFilter mocks base method.

func (*MockUserRepository) QueryUserById

func (m *MockUserRepository) QueryUserById(ctx context.Context, userId string) (UserResponse, error)

QueryUserById mocks base method.

func (*MockUserRepository) UpdateUser

func (m *MockUserRepository) UpdateUser(ctx context.Context, user *User) error

UpdateUser mocks base method.

type MockUserRepositoryCreteUserCall

type MockUserRepositoryCreteUserCall struct {
	*gomock.Call
}

MockUserRepositoryCreteUserCall wrap *gomock.Call

func (*MockUserRepositoryCreteUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserRepositoryCreteUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserRepositoryCreteUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserRepositoryDeleteUserCall

type MockUserRepositoryDeleteUserCall struct {
	*gomock.Call
}

MockUserRepositoryDeleteUserCall wrap *gomock.Call

func (*MockUserRepositoryDeleteUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserRepositoryDeleteUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserRepositoryDeleteUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserRepositoryLockUserByIdCall

type MockUserRepositoryLockUserByIdCall struct {
	*gomock.Call
}

MockUserRepositoryLockUserByIdCall wrap *gomock.Call

func (*MockUserRepositoryLockUserByIdCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserRepositoryLockUserByIdCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserRepositoryLockUserByIdCall) Return

Return rewrite *gomock.Call.Return

type MockUserRepositoryLoginUserCall

type MockUserRepositoryLoginUserCall struct {
	*gomock.Call
}

MockUserRepositoryLoginUserCall wrap *gomock.Call

func (*MockUserRepositoryLoginUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserRepositoryLoginUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserRepositoryLoginUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserRepositoryMockRecorder

type MockUserRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockUserRepositoryMockRecorder is the mock recorder for MockUserRepository.

func (*MockUserRepositoryMockRecorder) CreteUser

CreteUser indicates an expected call of CreteUser.

func (*MockUserRepositoryMockRecorder) DeleteUser

DeleteUser indicates an expected call of DeleteUser.

func (*MockUserRepositoryMockRecorder) LockUserById

LockUserById indicates an expected call of LockUserById.

func (*MockUserRepositoryMockRecorder) LoginUser

LoginUser indicates an expected call of LoginUser.

func (*MockUserRepositoryMockRecorder) QueryMultiUserByFilter

func (mr *MockUserRepositoryMockRecorder) QueryMultiUserByFilter(ctx, filter any) *MockUserRepositoryQueryMultiUserByFilterCall

QueryMultiUserByFilter indicates an expected call of QueryMultiUserByFilter.

func (*MockUserRepositoryMockRecorder) QueryUserById

QueryUserById indicates an expected call of QueryUserById.

func (*MockUserRepositoryMockRecorder) UpdateUser

UpdateUser indicates an expected call of UpdateUser.

type MockUserRepositoryQueryMultiUserByFilterCall

type MockUserRepositoryQueryMultiUserByFilterCall struct {
	*gomock.Call
}

MockUserRepositoryQueryMultiUserByFilterCall wrap *gomock.Call

func (*MockUserRepositoryQueryMultiUserByFilterCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserRepositoryQueryMultiUserByFilterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserRepositoryQueryMultiUserByFilterCall) Return

Return rewrite *gomock.Call.Return

type MockUserRepositoryQueryUserByIdCall

type MockUserRepositoryQueryUserByIdCall struct {
	*gomock.Call
}

MockUserRepositoryQueryUserByIdCall wrap *gomock.Call

func (*MockUserRepositoryQueryUserByIdCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserRepositoryQueryUserByIdCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserRepositoryQueryUserByIdCall) Return

Return rewrite *gomock.Call.Return

type MockUserRepositoryUpdateUserCall

type MockUserRepositoryUpdateUserCall struct {
	*gomock.Call
}

MockUserRepositoryUpdateUserCall wrap *gomock.Call

func (*MockUserRepositoryUpdateUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserRepositoryUpdateUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserRepositoryUpdateUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserService

type MockUserService struct {
	// contains filtered or unexported fields
}

MockUserService is a mock of UserService interface.

func NewMockUserService

func NewMockUserService(ctrl *gomock.Controller) *MockUserService

NewMockUserService creates a new mock instance.

func (*MockUserService) DeleteUser

func (m *MockUserService) DeleteUser(ctx context.Context, req *DeleteUserRequest) error

DeleteUser mocks base method.

func (*MockUserService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUserService) LoginUser

LoginUser mocks base method.

func (*MockUserService) QueryMultiUser

func (m *MockUserService) QueryMultiUser(ctx context.Context, filter *QueryMultiUserRequest) (MultiUserResponse, error)

QueryMultiUser mocks base method.

func (*MockUserService) RegisterUser

func (m *MockUserService) RegisterUser(ctx context.Context, req *RegisterUserRequest) error

RegisterUser mocks base method.

func (*MockUserService) ResetUserPassword

func (m *MockUserService) ResetUserPassword(ctx context.Context, req *ResetUserPasswordRequest) error

ResetUserPassword mocks base method.

func (*MockUserService) UpdateUserInfo

func (m *MockUserService) UpdateUserInfo(ctx context.Context, userId string, req *UpdateUserInfoRequest) error

UpdateUserInfo mocks base method.

func (*MockUserService) UpdateUserPassword

func (m *MockUserService) UpdateUserPassword(ctx context.Context, req *UpdateUserPasswordRequest) error

UpdateUserPassword mocks base method.

type MockUserServiceDeleteUserCall

type MockUserServiceDeleteUserCall struct {
	*gomock.Call
}

MockUserServiceDeleteUserCall wrap *gomock.Call

func (*MockUserServiceDeleteUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserServiceDeleteUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserServiceDeleteUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserServiceLoginUserCall

type MockUserServiceLoginUserCall struct {
	*gomock.Call
}

MockUserServiceLoginUserCall wrap *gomock.Call

func (*MockUserServiceLoginUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserServiceLoginUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserServiceLoginUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserServiceMockRecorder

type MockUserServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockUserServiceMockRecorder is the mock recorder for MockUserService.

func (*MockUserServiceMockRecorder) DeleteUser

DeleteUser indicates an expected call of DeleteUser.

func (*MockUserServiceMockRecorder) LoginUser

LoginUser indicates an expected call of LoginUser.

func (*MockUserServiceMockRecorder) QueryMultiUser

func (mr *MockUserServiceMockRecorder) QueryMultiUser(ctx, filter any) *MockUserServiceQueryMultiUserCall

QueryMultiUser indicates an expected call of QueryMultiUser.

func (*MockUserServiceMockRecorder) RegisterUser

RegisterUser indicates an expected call of RegisterUser.

func (*MockUserServiceMockRecorder) ResetUserPassword

func (mr *MockUserServiceMockRecorder) ResetUserPassword(ctx, req any) *MockUserServiceResetUserPasswordCall

ResetUserPassword indicates an expected call of ResetUserPassword.

func (*MockUserServiceMockRecorder) UpdateUserInfo

func (mr *MockUserServiceMockRecorder) UpdateUserInfo(ctx, userId, req any) *MockUserServiceUpdateUserInfoCall

UpdateUserInfo indicates an expected call of UpdateUserInfo.

func (*MockUserServiceMockRecorder) UpdateUserPassword

func (mr *MockUserServiceMockRecorder) UpdateUserPassword(ctx, req any) *MockUserServiceUpdateUserPasswordCall

UpdateUserPassword indicates an expected call of UpdateUserPassword.

type MockUserServiceQueryMultiUserCall

type MockUserServiceQueryMultiUserCall struct {
	*gomock.Call
}

MockUserServiceQueryMultiUserCall wrap *gomock.Call

func (*MockUserServiceQueryMultiUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserServiceQueryMultiUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserServiceQueryMultiUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserServiceRegisterUserCall

type MockUserServiceRegisterUserCall struct {
	*gomock.Call
}

MockUserServiceRegisterUserCall wrap *gomock.Call

func (*MockUserServiceRegisterUserCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserServiceRegisterUserCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserServiceRegisterUserCall) Return

Return rewrite *gomock.Call.Return

type MockUserServiceResetUserPasswordCall

type MockUserServiceResetUserPasswordCall struct {
	*gomock.Call
}

MockUserServiceResetUserPasswordCall wrap *gomock.Call

func (*MockUserServiceResetUserPasswordCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserServiceResetUserPasswordCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserServiceResetUserPasswordCall) Return

Return rewrite *gomock.Call.Return

type MockUserServiceUpdateUserInfoCall

type MockUserServiceUpdateUserInfoCall struct {
	*gomock.Call
}

MockUserServiceUpdateUserInfoCall wrap *gomock.Call

func (*MockUserServiceUpdateUserInfoCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserServiceUpdateUserInfoCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserServiceUpdateUserInfoCall) Return

Return rewrite *gomock.Call.Return

type MockUserServiceUpdateUserPasswordCall

type MockUserServiceUpdateUserPasswordCall struct {
	*gomock.Call
}

MockUserServiceUpdateUserPasswordCall wrap *gomock.Call

func (*MockUserServiceUpdateUserPasswordCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserServiceUpdateUserPasswordCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserServiceUpdateUserPasswordCall) Return

Return rewrite *gomock.Call.Return

type MultiUserResponse

type MultiUserResponse []UserResponse

type QueryMultiUserRequest

type QueryMultiUserRequest struct {
}

type RegisterUserRequest

type RegisterUserRequest struct {
}

type RegisteredUserEvent

type RegisteredUserEvent struct {
}

type ResetUserPasswordRequest

type ResetUserPasswordRequest struct {
}

type UpdateUserInfoRequest

type UpdateUserInfoRequest struct {
}

type UpdateUserPasswordRequest

type UpdateUserPasswordRequest struct {
}

type User

type User struct {
	ByUpdated utility.MapData `gorm:"-"`
}

func RegisterUser

func RegisterUser(req *RegisterUserRequest) (*User, error)

func (*User) ResetPassword

func (user *User) ResetPassword(req *ResetUserPasswordRequest) error

func (*User) UpdateInfo

func (user *User) UpdateInfo(req *UpdateUserInfoRequest) error

type UserRepository

type UserRepository interface {
	LockUserById(ctx context.Context, userId string) (User, error)
	CreteUser(ctx context.Context, user *User) error
	UpdateUser(ctx context.Context, user *User) error
	DeleteUser(ctx context.Context, user *User) error

	QueryUserById(ctx context.Context, userId string) (UserResponse, error)
	LoginUser(ctx context.Context, req *LoginUserRequest) (UserResponse, error)
	QueryMultiUserByFilter(ctx context.Context, filter *QueryMultiUserRequest) (MultiUserResponse, error)
}

type UserResponse

type UserResponse struct {
}

func ConvertUserResponse

func ConvertUserResponse(user *User) UserResponse

type UserService

type UserService interface {
	RegisterUser(ctx context.Context, req *RegisterUserRequest) error
	UpdateUserInfo(ctx context.Context, userId string, req *UpdateUserInfoRequest) error
	UpdateUserPassword(ctx context.Context, req *UpdateUserPasswordRequest) error
	ResetUserPassword(ctx context.Context, req *ResetUserPasswordRequest) error
	DeleteUser(ctx context.Context, req *DeleteUserRequest) error

	LoginUser(ctx context.Context, req *LoginUserRequest) (UserResponse, error)
	QueryMultiUser(ctx context.Context, filter *QueryMultiUserRequest) (MultiUserResponse, error)
}

type UserUseCase

type UserUseCase struct {
	// contains filtered or unexported fields
}

func NewUserUseCase

func NewUserUseCase(userRepo UserRepository) *UserUseCase

func (*UserUseCase) DeleteUser

func (uc *UserUseCase) DeleteUser(ctx context.Context, req *DeleteUserRequest) error

func (*UserUseCase) LoginUser

func (uc *UserUseCase) LoginUser(ctx context.Context, req *LoginUserRequest) (UserResponse, error)

func (*UserUseCase) QueryMultiUser

func (uc *UserUseCase) QueryMultiUser(ctx context.Context, filter *QueryMultiUserRequest) (MultiUserResponse, error)

func (*UserUseCase) RegisterUser

func (uc *UserUseCase) RegisterUser(ctx context.Context, req *RegisterUserRequest) error

func (*UserUseCase) ResetUserPassword

func (uc *UserUseCase) ResetUserPassword(ctx context.Context, req *ResetUserPasswordRequest) error

func (*UserUseCase) UpdateUserInfo

func (uc *UserUseCase) UpdateUserInfo(ctx context.Context, userId string, req *UpdateUserInfoRequest) error

func (*UserUseCase) UpdateUserPassword

func (uc *UserUseCase) UpdateUserPassword(ctx context.Context, req *UpdateUserPasswordRequest) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL