matcher

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Empty = ""
	Dot   = "."
	Colon = ":"
	Star  = "*"
)

Const TODO

View Source
const (
	ByteDot   byte = '.'
	ByteColon byte = ':'
	ByteStar  byte = '*'
)

Const TODO

Variables

View Source
var DefaultPort = map[string]string{
	"http":  "80",
	"https": "443",
	"ssh":   "22",
	"ftp":   "21",
}

DefaultPort TODO

View Source
var Nil = newNetlocRule(nil, nil)

Nil TODO

Functions

This section is empty.

Types

type GT

type GT func(interface{}, interface{}) bool

GT TODO

type IterFunc

type IterFunc func(*netloc.Netloc, interface{}) bool

IterFunc TODO

type Matcher

type Matcher struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

Matcher TODO

func New

func New() *Matcher

New TODO

func (*Matcher) Delete

func (matcher *Matcher) Delete(netloc *netloc.Netloc) (*netloc.Netloc, interface{})

Delete TODO

func (*Matcher) Get added in v0.0.4

func (matcher *Matcher) Get(netloc *netloc.Netloc) (*netloc.Netloc, interface{})

Get TODO

func (*Matcher) Iter

func (matcher *Matcher) Iter(f func(*netloc.Netloc, interface{}) bool)

Iter TODO

func (*Matcher) Load

func (matcher *Matcher) Load(netloc *netloc.Netloc, rule interface{}) (*netloc.Netloc, interface{})

Load TODO

func (*Matcher) LoadFromString added in v0.0.3

func (matcher *Matcher) LoadFromString(s string, rule interface{}) (n *netloc.Netloc, r interface{}, e error)

LoadFromString TODO

func (*Matcher) LoadFromURI added in v0.0.3

func (matcher *Matcher) LoadFromURI(uri string, rule interface{}) (n *netloc.Netloc, r interface{}, e error)

LoadFromURI TODO

func (*Matcher) LoadWithCmp

func (matcher *Matcher) LoadWithCmp(netloc *netloc.Netloc, rule interface{}, cmp GT) (*netloc.Netloc, interface{})

LoadWithCmp TODO

func (*Matcher) Match

func (matcher *Matcher) Match(host, port, scheme string) (*netloc.Netloc, interface{})

Match TODO

func (*Matcher) MatchHost

func (matcher *Matcher) MatchHost(host string) (*netloc.Netloc, interface{})

MatchHost TODO

func (*Matcher) MatchHostPort

func (matcher *Matcher) MatchHostPort(host, port string) (*netloc.Netloc, interface{})

MatchHostPort TODO

func (*Matcher) MatchURL

func (matcher *Matcher) MatchURL(URL string) (*netloc.Netloc, interface{})

MatchURL TODO

func (*Matcher) Size

func (matcher *Matcher) Size() int

Size TODO

Jump to

Keyboard shortcuts

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