services

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTokenService

func NewTokenService(tokenRepo repositories.TokenRepository) services.TokenService

NewTokenService creates a new instance of TokenServiceImpl

Types

type Argon2PasswordService

type Argon2PasswordService struct{}

func NewArgon2PasswordService

func NewArgon2PasswordService() *Argon2PasswordService

func (*Argon2PasswordService) Hash

func (p *Argon2PasswordService) Hash(password string) (string, error)

func (*Argon2PasswordService) Verify

func (p *Argon2PasswordService) Verify(password, encoded string) bool

type TokenServiceImpl

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

TokenServiceImpl implements TokenService

func (*TokenServiceImpl) Decrypt

func (t *TokenServiceImpl) Decrypt(encryptedToken string) (string, error)

Decrypt decrypts the token by delegating to the repository

func (*TokenServiceImpl) Encrypt

func (t *TokenServiceImpl) Encrypt(token string) (string, error)

Encrypt encrypts the token by delegating to the repository

func (*TokenServiceImpl) Generate

func (t *TokenServiceImpl) Generate() (string, error)

Generate generates a new token by delegating to the repository

func (*TokenServiceImpl) Hash

func (t *TokenServiceImpl) Hash(token string) string

Hash hashes the token by delegating to the repository

Jump to

Keyboard shortcuts

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