Documentation ¶
Overview ¶
Package userservice manages business logic layer of users.
Package userservice is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUserWihtoutPassword ¶
func NewUserWihtoutPassword(u domain.User) domain.UserWihtoutPassword
NewUserWihtoutPassword returns user with removed sensitive data.
Types ¶
type MockRepo ¶
type MockRepo struct {
// contains filtered or unexported fields
}
MockRepo is a mock of Repo interface.
func NewMockRepo ¶
func NewMockRepo(ctrl *gomock.Controller) *MockRepo
NewMockRepo creates a new mock instance.
func (*MockRepo) EXPECT ¶
func (m *MockRepo) EXPECT() *MockRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRepoMockRecorder ¶
type MockRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockRepoMockRecorder is the mock recorder for MockRepo.
func (*MockRepoMockRecorder) Create ¶
func (mr *MockRepoMockRecorder) Create(ctx, arg interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockRepoMockRecorder) Get ¶
func (mr *MockRepoMockRecorder) Get(ctx, username interface{}) *gomock.Call
Get indicates an expected call of Get.
type Repo ¶
type Repo interface { Create(ctx context.Context, arg domain.CreateUserParams) (domain.User, error) Get(ctx context.Context, username string) (domain.User, error) }
Repo provides data access layer interface needed by user service layer.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service facilitates user service layer logic.
func (*Service) CheckPassword ¶
func (s *Service) CheckPassword(ctx context.Context, username, pass string) (domain.UserWihtoutPassword, error)
CheckPassword checks if the password is valid for the given username.