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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	SignUpUser(ctx context.Context, request models.SignUpUserRequest) (*models.UserResponse, error)
	SignInUser(ctx context.Context, request *models.SignInUserRequest) (*models.UserResponse, error)
	GetVerificationKey(ctx context.Context, email string) (*models.UserResponse, error)
	Verify(ctx context.Context, vCode string) error
	Load(ctx context.Context, request *models.UserDBModel) (*models.UserResponse, error)
	Find(ctx context.Context, request *models.UserDBModel) (*models.UserResponse, error)
	FindUserByID(uid int64) (*models.UserDBModel, error)
}

func NewAuthService

func NewAuthService(ctx context.Context, cfg *config.Config, log *logger.Logger) AuthService

type AuthServiceImpl

type AuthServiceImpl struct {
	// contains filtered or unexported fields
}

func (*AuthServiceImpl) Find

func (*AuthServiceImpl) FindUserByID

func (a *AuthServiceImpl) FindUserByID(uid int64) (*models.UserDBModel, error)

func (*AuthServiceImpl) GetVerificationKey

func (a *AuthServiceImpl) GetVerificationKey(ctx context.Context, email string) (*models.UserResponse, error)

func (*AuthServiceImpl) Load

func (*AuthServiceImpl) SignInUser

func (*AuthServiceImpl) SignUpUser

func (*AuthServiceImpl) Verify

func (a *AuthServiceImpl) Verify(ctx context.Context, vCode string) error

type SQLServiceImpl

type SQLServiceImpl struct {
	// contains filtered or unexported fields
}

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 UserSQLService

type UserSQLService 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 UserService

type UserService interface {
	Load(ctx context.Context, id string) (*models.UserDBModel, error)
}

func NewORMUserService

func NewORMUserService(repository repository.UserRepository) UserService

Jump to

Keyboard shortcuts

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