verifier

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGatekeeperError

func NewGatekeeperError(errString string, errDetails map[string]interface{}) error

NewGatekeeperError creates a new gatekeeper error and appends to the given errors slice

func Verify

func Verify(ruleSet RuleSet, base string) []error

Verify verifies the given folder of Kubernetes files, then returns the errors encountered

Types

type AND

type AND struct {
	Gatekeeper bool
	Operation  string
	Op1        map[string]interface{}
	Op2        map[string]interface{}
}

AND describes a AND() function

type EQ

type EQ struct {
	Gatekeeper bool
	Operation  string
	Value      interface{}
}

EQ describes a EQ() function

type GT

type GT struct {
	Gatekeeper bool
	Operation  string
	Value      float64
}

GT describes a GT() function

type LT

type LT struct {
	Gatekeeper bool
	Operation  string
	Value      float64
}

LT describes a LT() function

type NOT

type NOT struct {
	Gatekeeper bool
	Operation  string
	Op         map[string]interface{}
}

NOT describes a NOT() function

type OR

type OR struct {
	Gatekeeper bool
	Operation  string
	Op1        map[string]interface{}
	Op2        map[string]interface{}
}

OR describes a OR() function

type PATH

type PATH struct {
	Gatekeeper bool
	Operation  string
	Index      int
}

PATH describes a PATH() function

type ResourceIdentifier

type ResourceIdentifier struct {
	Name      string
	Namespace string
	Kind      string
}

ResourceIdentifier identifies a unique resources based on name, namespace, and kind

type Rule

type Rule struct {
	Regex    string
	Kind     string
	Type     string
	RuleTree map[string]interface{}
}

Rule describes a rule

type RuleSet

type RuleSet struct {
	Ignore []string
	Rules  []Rule
}

RuleSet is a set of Rules

func ParseRuleset

func ParseRuleset(rulesetPath string, gatekeeperFunctions string) RuleSet

ParseRuleset parses the ruleset file and returns a RuleSet object

type TAG

type TAG struct {
	Gatekeeper bool
	Operation  string
	Tag        string
}

TAG describes a TAG() function

Jump to

Keyboard shortcuts

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