Documentation
¶
Index ¶
- type UserService
- type UserServiceImpl
- func (s *UserServiceImpl) Login(ctx context.Context, request *model.LoginRequest) (*model.TokenResponse, error)
- func (s *UserServiceImpl) Profile(ctx context.Context) (*model.UserResponse, error)
- func (s *UserServiceImpl) RefreshToken(ctx context.Context, request *model.RefreshTokenRequest) (*model.TokenResponse, error)
- func (s *UserServiceImpl) Register(ctx context.Context, request *model.RegisterRequest) (*model.UserResponse, error)
- func (s *UserServiceImpl) RequestReset(ctx context.Context, request *model.ReqResetPasswordRequest) (*model.VerifyResponse, error)
- func (s *UserServiceImpl) ResetPassword(ctx context.Context, request *model.ResetPasswordRequest) (*model.VerifyResponse, error)
- func (s *UserServiceImpl) Update(ctx context.Context, request *model.UpdateUserRequest) (*model.UserResponse, error)
- func (s *UserServiceImpl) VerifyEmail(ctx context.Context, request *model.VerifyRequest) (*model.VerifyResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService interface { Register(ctx context.Context, request *model.RegisterRequest) (*model.UserResponse, error) Login(ctx context.Context, request *model.LoginRequest) (*model.TokenResponse, error) Profile(ctx context.Context) (*model.UserResponse, error) Update(ctx context.Context, request *model.UpdateUserRequest) (*model.UserResponse, error) RefreshToken(ctx context.Context, request *model.RefreshTokenRequest) (*model.TokenResponse, error) RequestReset(ctx context.Context, request *model.ReqResetPasswordRequest) (*model.VerifyResponse, error) ResetPassword(ctx context.Context, request *model.ResetPasswordRequest) (*model.VerifyResponse, error) VerifyEmail(ctx context.Context, request *model.VerifyRequest) (*model.VerifyResponse, error) }
type UserServiceImpl ¶
type UserServiceImpl struct { DB *gorm.DB Log *logrus.Logger Validate *validator.Validate UserRepository *user.UserRepositoryImpl JWTService jwt.JWTService Gomail *gomail.ImplGomail // contains filtered or unexported fields }
func NewUserServiceImpl ¶
func NewUserServiceImpl(db *gorm.DB, log *logrus.Logger, validate *validator.Validate, userRepository *user.UserRepositoryImpl, jwtService jwt.JWTService, mail *gomail.ImplGomail) *UserServiceImpl
func (*UserServiceImpl) Login ¶
func (s *UserServiceImpl) Login(ctx context.Context, request *model.LoginRequest) (*model.TokenResponse, error)
func (*UserServiceImpl) Profile ¶
func (s *UserServiceImpl) Profile(ctx context.Context) (*model.UserResponse, error)
func (*UserServiceImpl) RefreshToken ¶
func (s *UserServiceImpl) RefreshToken(ctx context.Context, request *model.RefreshTokenRequest) (*model.TokenResponse, error)
func (*UserServiceImpl) Register ¶
func (s *UserServiceImpl) Register(ctx context.Context, request *model.RegisterRequest) (*model.UserResponse, error)
func (*UserServiceImpl) RequestReset ¶
func (s *UserServiceImpl) RequestReset(ctx context.Context, request *model.ReqResetPasswordRequest) (*model.VerifyResponse, error)
func (*UserServiceImpl) ResetPassword ¶
func (s *UserServiceImpl) ResetPassword(ctx context.Context, request *model.ResetPasswordRequest) (*model.VerifyResponse, error)
func (*UserServiceImpl) Update ¶
func (s *UserServiceImpl) Update(ctx context.Context, request *model.UpdateUserRequest) (*model.UserResponse, error)
func (*UserServiceImpl) VerifyEmail ¶
func (s *UserServiceImpl) VerifyEmail(ctx context.Context, request *model.VerifyRequest) (*model.VerifyResponse, error)
Click to show internal directories.
Click to hide internal directories.