Documentation
¶
Index ¶
Constants ¶
View Source
const APPROVE = Policy("approve")
View Source
const DEFAULT = Policy("default")
View Source
const REJECT = Policy("reject")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
Loader is used to load policies into a registry from various sources.
func StaticLoader ¶
StaticLoader implements the Loader interface and fills a registry with the given policies.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry acts as container for policies.
func NewRegistry ¶
NewRegistry creates a new registry and sets a default policy.
func (*Registry) AddPolicy ¶
AddPolicy creates a new policy given the parameters and adds it to the registry.
func (*Registry) DetermineForURL ¶
DetermineForURL returns a policy that should apply to the given URL.
Click to show internal directories.
Click to hide internal directories.