extcache

package
v0.0.0-...-3b8ab56 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 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