memstore

package
v1.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package memstore provides an in-memory auth.CodeStore implementation

Index

Constants

View Source
const (
	// NoExpiration For use with functions that take an expiration time.
	NoExpiration time.Duration = -1
	// DefaultExpiration For use with functions that take an expiration time. Equivalent to
	// passing in the same expiration duration as was given to New() or
	// NewFrom() when the cache was created (e.g. 5 minutes.)
	DefaultExpiration time.Duration = 0
)

Variables

This section is empty.

Functions

func New

func New(defaultExpiration, cleanupInterval time.Duration) oauth.CodeStore

New returns a new in-memory code store

Types

type Item

type Item struct {
	Object     interface{}
	Expiration int64
}

Item is an internal cache item

func (Item) Expired

func (item Item) Expired() bool

Expired returns true if the item has expired.

Jump to

Keyboard shortcuts

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