repository

package
v0.0.0-...-59b6e81 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRepository

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

func NewRepository

func NewRepository(bdb *badger.DB,
	db *sql.DB) AuthRepository

func (AuthRepository) DeleteJwtToken

func (ar AuthRepository) DeleteJwtToken(ownerID, token string) error

func (AuthRepository) ExistsAndNotExpired

func (ar AuthRepository) ExistsAndNotExpired(ownerID, token string, now time.Time) error

func (AuthRepository) FindRevokeTokenBy

func (ar AuthRepository) FindRevokeTokenBy(ctx context.Context, userID, token string) (*models.RevokeToken, error)

func (AuthRepository) GetRevokeToken

func (ar AuthRepository) GetRevokeToken(ctx context.Context, ownerID string) string

func (AuthRepository) StoreJwtToken

func (ar AuthRepository) StoreJwtToken(ownerID, token string, expr time.Time) error

func (AuthRepository) StoreRevokeToken

func (ar AuthRepository) StoreRevokeToken(ctx context.Context, ownerID, revokeToken string) error

func (AuthRepository) Update

type TokenCache

type TokenCache struct {
	Token string
	Expr  time.Time
}

Jump to

Keyboard shortcuts

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