Help us shape the future of Go! Take the 2026 Go Developer Survey

protect

package
v1.49.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonical added in v1.47.0

func Canonical(raw string) (string, bool)

func ErrorPage added in v1.47.2

func ErrorPage(raw string, ev Evidence) bool

func HiddenType added in v1.44.1

func HiddenType(typ string) bool

func Host

func Host(raw string) string

func Inheriting

func Inheriting(raw string) bool

func Parses added in v1.46.1

func Parses(raw string) bool

func Redact

func Redact(raw string) string

func Refusal

func Refusal() string

func Scheme added in v1.47.1

func Scheme(raw string) string

func Unparseable added in v1.46.4

func Unparseable(raw string) bool

func UnparseableRefusal added in v1.46.4

func UnparseableRefusal() string

Types

type Evidence added in v1.47.2

type Evidence struct {
	DocumentURL    string
	UnreachableURL string
	Navigating     bool
}

type Opener

type Opener int
const (
	NoOpener Opener = iota
	OpenerProtected
	OpenerUnprotected
	OpenerUnknown
)

type Origins

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

func MustNew

func MustNew(extra []string) *Origins

func New

func New(extra []string) (*Origins, error)

func (*Origins) CookieDomain

func (o *Origins) CookieDomain(domain string) bool

func (*Origins) DocumentPatterns added in v1.33.1

func (o *Origins) DocumentPatterns() []string

func (*Origins) Extra

func (o *Origins) Extra() []string

func (*Origins) Loaded added in v1.46.1

func (o *Origins) Loaded(raw string) bool

func (*Origins) StorageKey

func (o *Origins) StorageKey(key string) bool

func (*Origins) Target

func (o *Origins) Target(raw string, previous bool, opener Opener) bool

func (*Origins) TargetWith added in v1.47.2

func (o *Origins) TargetWith(raw, typ string, previous bool, opener Opener, ev Evidence) bool

func (*Origins) URL

func (o *Origins) URL(raw string) bool

Jump to

Keyboard shortcuts

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