services

package
v0.0.0-...-1b39580 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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 (*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 NewUserService(ctx context.Context, cfg *config.Config, log *logger.Logger) UserServiceImpl

func (*UserServiceImpl) CreateUser

func (*UserServiceImpl) GetByID

func (s *UserServiceImpl) GetByID(ctx context.Context, id int64) (*models.UserDBModel, error)

func (*UserServiceImpl) GetUser

func (*UserServiceImpl) LoginUser

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 (s *UserServiceImpl) UpdateUserPassword(ctx context.Context, userid int64, password string) error

func (*UserServiceImpl) UsernameInUse

func (s *UserServiceImpl) UsernameInUse(ctx context.Context, user *models.UserDBModel) (bool, error)

Jump to

Keyboard shortcuts

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