internal

package
v1.0.0-alpha4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DischargeTokenStore

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

DischargeTokenStore is a store for discharge tokens. It wraps a KeyValueStore.

func NewDischargeTokenStore

func NewDischargeTokenStore(store simplekv.Store) *DischargeTokenStore

NewDischargeTokenStore creates a new DischargeTokenStore using the given KeyValueStore for backing storage.

func (*DischargeTokenStore) Get

Get retrieves the DischargeToken with the given key from the store. If there is no such token, or the token has expired, then the returned error will have a cause of store.ErrNotFound.

func (*DischargeTokenStore) Put

Put adds the given DischargeToken to the store, returning the key that should be used to later retrieve the token. The DischargeToken will only be available in the store until the given expire time.

Jump to

Keyboard shortcuts

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