state

package
v0.0.0-...-a757527 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 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 TokenManager

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

TokenManager 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 NewTokenManager

func NewTokenManager(db *sqlx.DB) *TokenManager

NewTokenManager creates a new token manager from the given database

func (*TokenManager) Get

func (m *TokenManager) Get(ctx context.Context, subject string) (string, error)

Get returns the stored token

func (*TokenManager) Set

func (m *TokenManager) Set(ctx context.Context, 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