services

package
v0.0.0-...-813563b Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 6 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 struct {
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(db *database.Database, j *jwt.Service, c *recaptcha.Captcha) *AuthService

func (*AuthService) CheckToken

func (s *AuthService) CheckToken(authHeader string) (*jwt.Claims, error)

func (*AuthService) LoginUser

func (s *AuthService) LoginUser(email, password, captchaToken string) (string, string, error)

func (*AuthService) LoginWithRefreshToken

func (s *AuthService) LoginWithRefreshToken(refreshToken string) (string, error)

type UserService

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

func NewUserService

func NewUserService(db *database.Database) *UserService

func (*UserService) CreateUser

func (s *UserService) CreateUser(email, password, fullName string) error

func (*UserService) DeleteUser

func (s *UserService) DeleteUser(id int64) error

func (*UserService) GetUser

func (s *UserService) GetUser(id int64) (internal.User, error)

func (*UserService) GetUsers

func (s *UserService) GetUsers(rows, page int) ([]internal.User, error)

func (*UserService) ModifyUser

func (s *UserService) ModifyUser(id int64, email, password, fullName string) error

func (*UserService) ModifyUserPassword

func (s *UserService) ModifyUserPassword(id int64, password string) error

Jump to

Keyboard shortcuts

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