security

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Whitelist

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

Whitelist holds a whitelist.

func MustNewWhitelist

func MustNewWhitelist(patterns ...string) Whitelist

MustNewWhitelist creates a new Whitelist from zero or more patterns and panics on error.

func NewWhitelist

func NewWhitelist(patterns ...string) (Whitelist, error)

NewWhitelist creates a new Whitelist from zero or more patterns. An empty patterns list or a pattern with the value 'none' will create a whitelist that will Accept none.

func (Whitelist) Accept

func (w Whitelist) Accept(name string) bool

Accept reports whether name is whitelisted.

func (Whitelist) MarshalJSON

func (w Whitelist) MarshalJSON() ([]byte, error)

MarshalJSON is for internal use only.

func (Whitelist) String

func (w Whitelist) String() string

Jump to

Keyboard shortcuts

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