services

package
v0.0.0-...-c63bb48 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 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 (*AuthService) Login

func (s *AuthService) Login(credentials *dtos.SignInDto) (*models.AccessTokenResponse, error)

func (*AuthService) SignUp

func (s *AuthService) SignUp(userDto *dtos.SignUpDto) (*models.User, error)

type JwtService

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

func NewJwtService

func NewJwtService(ttl time.Duration, secret string, issuer string) *JwtService

func (*JwtService) GenerateJwtToken

func (j *JwtService) GenerateJwtToken(user *models.User) (*models.AccessTokenResponse, error)

func (*JwtService) VerifyToken

func (j *JwtService) VerifyToken(tokenString string) (*models.AuthClaims, error)

type URLService

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

func NewUrlService

func NewUrlService(r models.URLRepository) *URLService

func (*URLService) CreateURL

func (s *URLService) CreateURL(createURLDto *dtos.CreateURLDto, user *models.User) (*models.URL, error)

func (*URLService) GetAllURLs

func (s *URLService) GetAllURLs() ([]models.URL, error)

func (*URLService) GetURLByHash

func (s *URLService) GetURLByHash(hash string) (*models.URL, error)

func (*URLService) GetUserURLByHash

func (s *URLService) GetUserURLByHash(hash string, user *models.UserClaims) (*models.URL, error)

Jump to

Keyboard shortcuts

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