commands

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKindFromPath added in v0.5.0

func GetKindFromPath(path string) string

GetKindFromPath returns the kind of the resource based on its file path.

func NewDefaultCommand

func NewDefaultCommand() *cobra.Command

NewDefaultCommand creates a new default command

Types

type Document added in v0.5.0

type Document struct {
	Header   Header
	Severity string
	URL      string
	Rego     string
}

Document is a single policy document.

type Header struct {
	Title       string
	Description string
	Resources   string
}

Header is the header comment block found on a Rego policy.

type KindMatcher added in v0.5.0

type KindMatcher struct {
	APIGroup string
	Kind     string
}

KindMatcher are the matchers that are applied to constraints.

type Matchers added in v0.5.0

type Matchers struct {
	KindMatchers []KindMatcher
}

Matchers are all of the matchers that can be applied to constraints.

func GetMatchersFromComments added in v0.5.0

func GetMatchersFromComments(comments []string) Matchers

GetMatchersFromComments returns all of the matchers found in the collection of comments.

Jump to

Keyboard shortcuts

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