memstore

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: GPL-3.0 Imports: 11 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