policy

package
v1.8.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAuditLevel is the default level to audit at, if no policy rules are matched.
	DefaultAuditLevel = audit.LevelNone
)

Variables

This section is empty.

Functions

func LoadPolicyFromFile

func LoadPolicyFromFile(filePath string) (*auditinternal.Policy, error)

Types

type Checker

type Checker interface {
	// Check the audit level for a request with the given authorizer attributes.
	Level(authorizer.Attributes) audit.Level
}

Checker exposes methods for checking the policy rules.

func FakeChecker

func FakeChecker(level audit.Level) Checker

FakeChecker creates a checker that returns a constant level for all requests (for testing).

func NewChecker

func NewChecker(policy *audit.Policy) Checker

NewChecker creates a new policy checker.

Jump to

Keyboard shortcuts

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