redis

package
v0.0.0-...-20a5a9c Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokensRepository

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

func NewTokensRepository

func NewTokensRepository(cache *redis.DB) *TokensRepository

func (*TokensRepository) Delete

func (r *TokensRepository) Delete(ctx context.Context, key string) error

func (*TokensRepository) DeleteByTokenID

func (r *TokensRepository) DeleteByTokenID(ctx context.Context, tokenID uuid.UUID) error

func (*TokensRepository) DeleteByUserID

func (r *TokensRepository) DeleteByUserID(ctx context.Context, userID uuid.UUID) error

func (*TokensRepository) Get

func (r *TokensRepository) Get(ctx context.Context, userID, tokenID uuid.UUID) (domain.Token, error)

func (*TokensRepository) GetByKey

func (r *TokensRepository) GetByKey(ctx context.Context, key string) (domain.Token, error)

func (*TokensRepository) GetByTokenID

func (r *TokensRepository) GetByTokenID(ctx context.Context, tokenID uuid.UUID) (domain.Token, error)

func (*TokensRepository) GetByUserID

func (r *TokensRepository) GetByUserID(ctx context.Context, userID uuid.UUID) ([]domain.Token, error)

func (*TokensRepository) Set

func (r *TokensRepository) Set(ctx context.Context, token *domain.Token, ttl time.Duration) error

Jump to

Keyboard shortcuts

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