service

package
v0.0.0-...-9ba3fda Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 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(userRepo *postgres.UserRepository, jwtSecret string) *AuthService

func (*AuthService) Login

func (*AuthService) RefreshToken

func (s *AuthService) RefreshToken(token string) (*models.AuthResponse, error)

func (*AuthService) Register

func (s *AuthService) Register(req *models.RegisterRequest) error

type AuthServiceInterface

type AuthServiceInterface interface {
	Register(req *models.RegisterRequest) error
	Login(req *models.LoginRequest) (*models.AuthResponse, error)
	RefreshToken(token string) (*models.AuthResponse, error)
}

type TokenPair

type TokenPair struct {
	AccessToken  string
	RefreshToken string
}

Jump to

Keyboard shortcuts

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