header

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package header provides path-matched header injection rules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

type Fields map[string]string

Fields map.

type Matcher

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

Matcher for header lookup.

func Compile

func Compile(rules Rules) (*Matcher, error)

Compile the given rules to a trie.

func (*Matcher) Lookup

func (m *Matcher) Lookup(path string) Fields

Lookup returns fields for the given path.

type Rules

type Rules map[string]Fields

Rules map of paths to fields.

func Merge

func Merge(a, b Rules) Rules

Merge returns a new rules set giving precedence to `b`.

Jump to

Keyboard shortcuts

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