validators

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmptyValidator

func NewEmptyValidator() *emptyValidator

NewEmptyValidator creates a new *emptyValidator instance

func NewRegexpValidator

func NewRegexpValidator(regexps map[*regexp.Regexp]time.Duration) *regexpValidator

NewRegexpValidator creates a new *regexpValidator instance

Types

type Validator

type Validator interface {
	Valid(url *url.URL, age time.Duration) bool
}

Validators are used to validate if the cache entry for the given URL is still valid at a certain age.

Jump to

Keyboard shortcuts

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