Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶ added in v0.3.1
type Configuration struct { Mode Mode PolicyReference anchore.PolicyReference }
func NewConfiguration ¶ added in v0.3.1
func NewConfiguration( meta metav1.ObjectMeta, imageReference string, policySelectors []PolicySelector, clientset kubernetes.Clientset, ) *Configuration
type PolicySelector ¶ added in v0.3.1
type PolicySelector struct { ResourceSelector ResourceSelector `mapstructure:"Selector"` Mode Mode PolicyReference anchore.PolicyReference }
type ResourceSelector ¶ added in v0.3.1
type ResourceSelector struct { Type ResourceSelectorType `mapstructure:"ResourceType"` // The resource to do selection on, // supported: pod, namespace SelectorKeyRegex string // The regex to select a matching key SelectorValueRegex string // The regex to apply to the label/annotation of the specified resource type }
type ResourceSelectorType ¶ added in v0.3.1
type ResourceSelectorType string
const ( GeneralResourceSelectorType ResourceSelectorType = "resource" NamespaceResourceSelectorType ResourceSelectorType = "namespace" ImageResourceSelectorType ResourceSelectorType = "image" )
type Result ¶
Result is a data structure that describes the evaluation result for a validation operation.
func Reduce ¶
Reduce takes an arbitrary number of Results as input and reduces them to a single Result. This Result's Message aggregates the input Results' Messages, prefixed with the given messagePrefix. If only a single Result is passed in, the Result is returned as-is (and the messagePrefix is not used).
type Validator ¶ added in v0.3.1
type Validator func() Result
Validator is a function that can be executed to produce a validation Result.
func New ¶ added in v0.3.1
func New(configuration Configuration, imageBackend anchore.ImageBackend, user anchore.Credential, imageReference string) (Validator, error)
New returns a validator function with its internal state fully configured. If a validator function cannot be created, New returns an error.
Click to show internal directories.
Click to hide internal directories.