pac

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToCreateParser  = customerror.NewFailedToError("create PAC parser", "", nil)
	ErrFailedToFindParserNil = customerror.NewFailedToError("PAC parser isn't initialized", "", nil)
	ErrFailedToFindURL       = customerror.NewFailedToError("find URL", "", nil)
	ErrFailedToParseURI      = customerror.NewFailedToError("parse URI", "", nil)
	ErrInvalidParams         = customerror.NewInvalidError("params", "", nil)
)

Functions

This section is empty.

Types

type IParser

type IParser interface {
	Find(url string) ([]string, error)
}

IParser specifies what a Parser does.

type PACProxies

type PACProxies = []PACProxy

type PACProxy

type PACProxy = pacman.Proxy

Type aliasing.

type Parser

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

Parser definition.

func New

func New(source string, proxiesURIs ...string) (*Parser, error)

New is the Parser factory. It's wraps PACMan.

func (*Parser) Find

func (pP *Parser) Find(url string) (PACProxies, error)

Find proxy(ies) for the given `url`.

Jump to

Keyboard shortcuts

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