Documentation
¶
Index ¶
- type AuthService
- type AuthServiceImpl
- func (a *AuthServiceImpl) Find(ctx context.Context, user *models.UserDBModel) (*models.UserResponse, error)
- func (a *AuthServiceImpl) FindUserByID(uid int64) (*models.UserDBModel, error)
- func (a *AuthServiceImpl) GetVerificationKey(ctx context.Context, email string) (*models.UserResponse, error)
- func (a *AuthServiceImpl) Load(ctx context.Context, user *models.UserDBModel) (*models.UserResponse, error)
- func (a *AuthServiceImpl) SignInUser(ctx context.Context, reqUser *models.SignInUserRequest) (*models.UserResponse, error)
- func (a *AuthServiceImpl) SignUpUser(ctx context.Context, cur models.SignUpUserRequest) (*models.UserResponse, error)
- func (a *AuthServiceImpl) Verify(ctx context.Context, vCode string) error
- 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 UserSQLService
- type UserService
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 ¶
type AuthServiceImpl ¶
type AuthServiceImpl struct {
// contains filtered or unexported fields
}
func (*AuthServiceImpl) Find ¶
func (a *AuthServiceImpl) Find(ctx context.Context, user *models.UserDBModel) (*models.UserResponse, error)
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 (a *AuthServiceImpl) Load(ctx context.Context, user *models.UserDBModel) (*models.UserResponse, error)
func (*AuthServiceImpl) SignInUser ¶
func (a *AuthServiceImpl) SignInUser(ctx context.Context, reqUser *models.SignInUserRequest) (*models.UserResponse, error)
func (*AuthServiceImpl) SignUpUser ¶
func (a *AuthServiceImpl) SignUpUser(ctx context.Context, cur models.SignUpUserRequest) (*models.UserResponse, 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 (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 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 ¶
func NewORMUserService ¶
func NewORMUserService(repository repository.UserRepository) UserService
Click to show internal directories.
Click to hide internal directories.