inspectors

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns the list of the registered inspectors' names.

func Register

func Register(name string, a Inspector)

Register makes an Inspector available by the provided name.

If called twice with the same name, the name is blank, or if the provided Extractor is nil, this function panics.

func Unregister

func Unregister(name string)

Unregister removes an Inspector with a particular name from the list.

Types

type Inspector

type Inspector interface {
	Configure(string) (inspector Inspector, err error)
	Inspect(kubernetes.Interface, *certificates.CertificateSigningRequest) (message string, err error)
}

Inspector represents anything capable of performing a policy check on a CSR. It returns an empty string to take no action, a human readable message with details to take adverse action, or an error to temporarily fail.

func Get

func Get(name string) (a Inspector, exists bool)

Get returns the registered Inspector with a provided name.

type Inspectors

type Inspectors []NamedInspector

A slice of named Inspectors forming a policy.

func (*Inspectors) Set

func (inspectors *Inspectors) Set(value string) error

func (*Inspectors) String

func (inspectors *Inspectors) String() string

type NamedInspector

type NamedInspector struct {
	Name      string
	Config    string
	Inspector Inspector
}

Jump to

Keyboard shortcuts

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