services

package
v0.0.0-...-d9aeb59 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 11 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{}

func (AuthService) CreateRefreshToken

func (srvc AuthService) CreateRefreshToken(userID uint, td *TokenDetails) error

func (AuthService) GenerateJWT

func (srvc AuthService) GenerateJWT(user models.User) (*TokenDetails, error)

func (AuthService) Login

func (srvc AuthService) Login(form types.LoginForm) (user models.User, token Token, err error)

func (AuthService) Register

func (srvc AuthService) Register(form types.RegisterForm) (user models.User, err error)

type BookService

type BookService struct {
	repo.BaseRepo
}

func InitBookService

func InitBookService() *BookService

type Token

type Token struct {
	AccessToken  string
	RefreshToken string
}

type TokenDetails

type TokenDetails struct {
	Token
	UserID      uint
	AccessUUID  string
	RefreshUUID string
	AtExpires   int64
	RtExpires   int64
	User        models.User
}

type UserService

type UserService struct {
	repo.BaseRepo
}

func InitUserService

func InitUserService() *UserService

Jump to

Keyboard shortcuts

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