storage

package
v0.0.0-...-6653ad0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 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 TTLCache

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

func NewTTLCache

func NewTTLCache(cleanupInterval time.Duration) *TTLCache

func (TTLCache) Get

func (c TTLCache) Get(key string) (string, bool)

func (TTLCache) Set

func (c TTLCache) Set(key, value string, ttl time.Duration)

type TokenCache

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

func NewTokenCache

func NewTokenCache(p *papers.Papers) *TokenCache

func (TokenCache) IsTokenValid

func (c TokenCache) IsTokenValid(token, chain string) (bool, bool)

Checks if a token is valid. Chains should only be cached when they're invalidated, which takes precedence over an individual token

func (TokenCache) SetChainValidity

func (c TokenCache) SetChainValidity(chain string, valid bool)

func (TokenCache) SetTokenValidity

func (c TokenCache) SetTokenValidity(token string, valid bool)

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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