Documentation ¶
Index ¶
- type TokensRepository
- func (r *TokensRepository) Delete(ctx context.Context, key string) error
- func (r *TokensRepository) DeleteByTokenID(ctx context.Context, tokenID uuid.UUID) error
- func (r *TokensRepository) DeleteByUserID(ctx context.Context, userID uuid.UUID) error
- func (r *TokensRepository) Get(ctx context.Context, userID, tokenID uuid.UUID) (domain.Token, error)
- func (r *TokensRepository) GetByKey(ctx context.Context, key string) (domain.Token, error)
- func (r *TokensRepository) GetByTokenID(ctx context.Context, tokenID uuid.UUID) (domain.Token, error)
- func (r *TokensRepository) GetByUserID(ctx context.Context, userID uuid.UUID) ([]domain.Token, error)
- func (r *TokensRepository) Set(ctx context.Context, token *domain.Token, ttl time.Duration) error
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 (*TokensRepository) DeleteByUserID ¶
func (*TokensRepository) GetByTokenID ¶
func (*TokensRepository) GetByUserID ¶
Click to show internal directories.
Click to hide internal directories.