Documentation ¶
Index ¶
- type SQLService
- type SqlServiceImpl
- func (s *SqlServiceImpl) CreateUser(newUserRequest *models.SignUpUserRequest) (*models.UserResponse, error)
- func (s SqlServiceImpl) GetByCode(code string) (*models.UserDBModel, error)
- func (s *SqlServiceImpl) GetByID(id int) (user *models.UserDBResponse, err error)
- func (s *SqlServiceImpl) LoginUser(u *models.SignInUserRequest) (*models.UserResponse, error)
- func (s *SqlServiceImpl) StoreVerificationData(user *models.UserDBModel) bool
- func (s *SqlServiceImpl) UpdateUser(user *models.UpdateUserRequest) (err error)
- func (s *SqlServiceImpl) UpdateUserPassword(user *models.UpdateUserRequest) (err error)
- func (s *SqlServiceImpl) UsernameInUse(user *models.SignUpUserRequest) bool
- type UserService
- type UserServiceImpl
- func (s *UserServiceImpl) CreateUser(user *models.SignUpUserRequest) (*models.UserResponse, error)
- func (s *UserServiceImpl) GetByID(ctx context.Context, id int64) (*models.UserDBModel, error)
- func (s *UserServiceImpl) GetUser(ctx context.Context, user *models.UserDBModel) (*models.UserDBModel, error)
- func (s *UserServiceImpl) LoginUser(user *models.SignInUserRequest) (*models.UserResponse, error)
- func (s *UserServiceImpl) StoreVerificationData(ctx context.Context, vCode string) error
- func (s *UserServiceImpl) UpdateUser(user *models.UpdateUserRequest) (err error)
- func (s *UserServiceImpl) UpdateUserPassword(ctx context.Context, userid int64, password string) error
- func (s *UserServiceImpl) UsernameInUse(ctx context.Context, user *models.UserDBModel) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLService ¶
type SQLService interface { GetByID(id int) (user *models.UserDBResponse, err error) GetByCode(code string) (user *models.UserDBModel, err error) UsernameInUse(user *models.SignUpUserRequest) bool StoreVerificationData(user *models.UserDBModel) bool UpdateUser(user *models.UpdateUserRequest) (err error) LoginUser(user *models.SignInUserRequest) (*models.UserResponse, error) UpdateUserPassword(user *models.UpdateUserRequest) (err error) CreateUser(user *models.SignUpUserRequest) (*models.UserResponse, error) }
type SqlServiceImpl ¶
type SqlServiceImpl struct {
// contains filtered or unexported fields
}
func NewMySQLService ¶
func NewMySQLService(db *mySql.DB, l *logger.Logger) *SqlServiceImpl
func (*SqlServiceImpl) CreateUser ¶
func (s *SqlServiceImpl) CreateUser(newUserRequest *models.SignUpUserRequest) (*models.UserResponse, error)
func (SqlServiceImpl) GetByCode ¶
func (s SqlServiceImpl) GetByCode(code string) (*models.UserDBModel, error)
func (*SqlServiceImpl) GetByID ¶
func (s *SqlServiceImpl) GetByID(id int) (user *models.UserDBResponse, err error)
func (*SqlServiceImpl) LoginUser ¶
func (s *SqlServiceImpl) LoginUser(u *models.SignInUserRequest) (*models.UserResponse, error)
func (*SqlServiceImpl) StoreVerificationData ¶
func (s *SqlServiceImpl) StoreVerificationData(user *models.UserDBModel) bool
func (*SqlServiceImpl) UpdateUser ¶
func (s *SqlServiceImpl) UpdateUser(user *models.UpdateUserRequest) (err error)
func (*SqlServiceImpl) UpdateUserPassword ¶
func (s *SqlServiceImpl) UpdateUserPassword(user *models.UpdateUserRequest) (err error)
func (*SqlServiceImpl) UsernameInUse ¶
func (s *SqlServiceImpl) UsernameInUse(user *models.SignUpUserRequest) bool
type UserService ¶
type UserService interface { GetUser(ctx context.Context, user *models.UserDBModel) (*models.UserDBModel, error) GetByID(ctx context.Context, id int64) (*models.UserDBModel, error) UsernameInUse(ctx context.Context, user *models.UserDBModel) (bool, error) StoreVerificationData(ctx context.Context, vCode string) error UpdateUser(user *models.UpdateUserRequest) (err error) LoginUser(user *models.SignInUserRequest) (*models.UserResponse, error) UpdateUserPassword(ctx context.Context, userid int64, password string) error CreateUser(user *models.SignUpUserRequest) (*models.UserResponse, error) }
type UserServiceImpl ¶
type UserServiceImpl struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func (*UserServiceImpl) CreateUser ¶
func (s *UserServiceImpl) CreateUser(user *models.SignUpUserRequest) (*models.UserResponse, error)
func (*UserServiceImpl) GetByID ¶
func (s *UserServiceImpl) GetByID(ctx context.Context, id int64) (*models.UserDBModel, error)
func (*UserServiceImpl) GetUser ¶
func (s *UserServiceImpl) GetUser(ctx context.Context, user *models.UserDBModel) (*models.UserDBModel, error)
func (*UserServiceImpl) LoginUser ¶
func (s *UserServiceImpl) LoginUser(user *models.SignInUserRequest) (*models.UserResponse, error)
func (*UserServiceImpl) StoreVerificationData ¶
func (s *UserServiceImpl) StoreVerificationData(ctx context.Context, vCode string) error
func (*UserServiceImpl) UpdateUser ¶
func (s *UserServiceImpl) UpdateUser(user *models.UpdateUserRequest) (err error)
func (*UserServiceImpl) UpdateUserPassword ¶
func (*UserServiceImpl) UsernameInUse ¶
func (s *UserServiceImpl) UsernameInUse(ctx context.Context, user *models.UserDBModel) (bool, error)
Click to show internal directories.
Click to hide internal directories.