sql

package
v0.0.0-...-68889fd Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLTokenManager

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

SQLTokenManager is a TokenManager that writes and retrieves data from a SQL database, it expects to have a table named "tokens" to read/write from

func NewSQLTokenManager

func NewSQLTokenManager(db *sql.DB, driver string) *SQLTokenManager

NewSQLTokenManager creates a new token manager from the given database and driver

func (*SQLTokenManager) Get

func (m *SQLTokenManager) Get(subject string) (string, error)

Get returns the stored token

func (*SQLTokenManager) Set

func (m *SQLTokenManager) Set(subject, value string) error

Set sets or updates the stored token

Jump to

Keyboard shortcuts

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