trl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RevokedToken

type RevokedToken struct {
	RevocationTime time.Time `db:"rvt"`
	ExpirationTime time.Time `db:"exp"`
}

type Store

type Store interface {
	Put(tokenID string, expirationTime time.Time) error
	Lookup(tokenID string) (*RevokedToken, error)
	Ping() error
}

func NewNoopStore

func NewNoopStore() Store

func NewSqlStore

func NewSqlStore(dbs map[string]*sql.DB, settings *StoreSettings) (Store, error)

type StoreSettings

type StoreSettings struct {
	URI    string `json:"uri,omitempty"`
	Query  string `json:"query,omitempty"`
	Insert string `json:"insert,omitempty"`
}

Jump to

Keyboard shortcuts

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