redisimplement

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken = errors.New("invalid token")
	ErrTokenExpired = errors.New("token expired")
)

Functions

func NewTokenRepository

func NewTokenRepository(redis *redis.Client, expiration time.Duration) redisinterface.TokenImplement

Types

type TokenRepository

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

func (*TokenRepository) CreateToken

func (r *TokenRepository) CreateToken(tokenClaims entities.TokenClaims) (string, error)

func (*TokenRepository) DeleteToken

func (r *TokenRepository) DeleteToken(user, channel string) error

func (TokenRepository) GenerateSalt

func (TokenRepository) GenerateSalt(saltSize int) []byte

func (*TokenRepository) ValidateToken

func (r *TokenRepository) ValidateToken(token string) (entities.TokenClaims, error)

Jump to

Keyboard shortcuts

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