cachecontrol

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct {
	Regexp *jregexp `json:"regexp"`
	Value  string   `json:"value"`
}

Rule is a mapping of regular expressions to cache-control string rules.

type Rules

type Rules []Rule

Rules is a list of cache control rules.

func (Rules) HeaderValue

func (c Rules) HeaderValue(fileName string) *string

HeaderValue returns the matching cache control rule for the given file name.

func (*Rules) Set

func (c *Rules) Set(value string) error

Set loads the list of rules as a JSON-string, allowing values of type Rules to be used with envconfig.

Jump to

Keyboard shortcuts

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