user

package
v0.0.0-...-73c8273 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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 (*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 (*UserServiceImpl) RequestReset

func (*UserServiceImpl) ResetPassword

func (s *UserServiceImpl) ResetPassword(ctx context.Context, request *model.ResetPasswordRequest) (*model.VerifyResponse, error)

func (*UserServiceImpl) Update

func (*UserServiceImpl) VerifyEmail

func (s *UserServiceImpl) VerifyEmail(ctx context.Context, request *model.VerifyRequest) (*model.VerifyResponse, error)

Jump to

Keyboard shortcuts

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