extcache

package
v0.0.0-...-b34ddb9 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithExtCache

func WithExtCache(ctx context.Context, cache ExtCache) context.Context

Types

type Config

type Config struct {
	Enabled    bool
	Prefix     string
	HashPrefix string
	Secret     string
	Expires    int
}

type ExtCache

type ExtCache interface {
	Generate(urlStr string) (string, error)
}

func FromContext

func FromContext(ctx context.Context) (ExtCache, bool)

func New

func New(cfg Config) ExtCache

Jump to

Keyboard shortcuts

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