redis

package
v0.0.0-...-b557599 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(url *url.URL) (*redis.Client, error)

Types

type PasscodeStore

type PasscodeStore struct {
	*redis.Client
	Namespace string
	TTL       time.Duration
}

func (*PasscodeStore) Create

func (s *PasscodeStore) Create(userID string) (string, error)

func (*PasscodeStore) Find

func (s *PasscodeStore) Find(token string) (string, error)

func (*PasscodeStore) Revoke

func (s *PasscodeStore) Revoke(token string) error

type SessionStore

type SessionStore struct {
	*redis.Client
	Namespace string
	TTL       time.Duration
}

func (*SessionStore) Create

func (s *SessionStore) Create(userID string) (string, error)

func (*SessionStore) Find

func (s *SessionStore) Find(sessionID string) (string, error)

Jump to

Keyboard shortcuts

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