Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractStringFromMetadata ¶
ExtractStringFromMetadata returns the string value from the result metadata at the given key.
Types ¶
type ConfigProvider ¶ added in v0.4.0
type ConfigProvider interface { EffectiveTime() time.Time SigstoreOpts() (policy.SigstoreOpts, error) Spec() ecc.EnterpriseContractPolicySpec }
ConfigProvider is a subset of the policy.Policy interface. Its purpose is to codify which parts of Policy are actually used and to make it easier to use mock in tests.
type Evaluator ¶
type Evaluator interface { Evaluate(ctx context.Context, inputs []string) ([]Outcome, Data, error) // Destroy performs any cleanup needed Destroy() // CapabilitiesPath returns the path to the file where capabilities are defined CapabilitiesPath() string }
func NewConftestEvaluator ¶
func NewConftestEvaluator(ctx context.Context, policySources []source.PolicySource, p ConfigProvider, source ecc.Source) (Evaluator, error)
NewConftestEvaluator returns initialized conftestEvaluator implementing Evaluator interface
func NewConftestEvaluatorWithNamespace ¶
func NewConftestEvaluatorWithNamespace(ctx context.Context, policySources []source.PolicySource, p ConfigProvider, source ecc.Source, namespace []string) (Evaluator, error)
set the policy namespace
type Outcome ¶
type Outcome struct { FileName string `json:"filename"` Namespace string `json:"namespace"` Successes []Result `json:"successes,omitempty"` Skipped []Result `json:"skipped,omitempty"` Warnings []Result `json:"warnings,omitempty"` Failures []Result `json:"failures,omitempty"` Exceptions []Result `json:"exceptions,omitempty"` }
Click to show internal directories.
Click to hide internal directories.