verifier

package
v0.0.0-...-67ede70 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONReport ReportFormat = "json"
	YAMLReport ReportFormat = "yaml"

	KubeAPIServer    StringKey = "kube-apiserver"
	KubeAsUser       StringKey = "kube-as-user"
	KubeCaFile       StringKey = "kube-ca-file"
	KubeContext      StringKey = "kube-context"
	KubeToken        StringKey = "kube-token"
	KubeConfig       StringKey = "kubeconfig"
	Namespace        StringKey = "namespace"
	OpenshiftVersion StringKey = "openshift-version"
	RegistryConfig   StringKey = "registry-config"
	RepositoryConfig StringKey = "repository-config"
	RepositoryCache  StringKey = "repository-cache"
	Config           StringKey = "config"
	ChartValues      StringKey = "chart-values"
	KubeAsGroups     StringKey = "kube-as-group"
	PGPPublicKey     StringKey = "pgp-public-key"

	ChartSet       ValuesKey = "chart-set"
	ChartSetFile   ValuesKey = "chart-set-file"
	ChartSetString ValuesKey = "chart-set-string"
	CommandSet     ValuesKey = "set"

	WebCatalogOnly   BooleanKey = "web-catalog-only"
	ProviderDelivery BooleanKey = "provider-delivery" // Deprecated in 1.10
	SuppressErrorLog BooleanKey = "suppress-error-log"
	SkipCleanup      BooleanKey = "skip-cleanup"

	Timeout            DurationKey = "timeout"
	HelmInstallTimeout DurationKey = "helm-install-timeout"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIVerifier

type APIVerifier interface {
	SetBoolean(key BooleanKey, value bool) APIVerifier
	SetDuration(key DurationKey, duration time.Duration) APIVerifier
	SetString(key StringKey, value []string) APIVerifier
	SetValues(key ValuesKey, values map[string]interface{}) APIVerifier
	EnableChecks(names []checks.CheckName) APIVerifier
	UnEnableChecks(names []checks.CheckName) APIVerifier
	Run(chartURI string) (APIVerifier, error)
	GetReport() *report.Report
}

func NewVerifier

func NewVerifier() APIVerifier

* Create a new verifier

type BooleanKey

type BooleanKey string

type CheckStatus

type CheckStatus struct {
	Enabled bool `json:"enabled" yaml:"enabled"`
}

type DurationKey

type DurationKey string

type Flags

type Flags struct {
	// Checks, checks with indication of enabled or disabled
	Checks map[apichecks.CheckName]CheckStatus `json:"checks" yaml:"checks"`
	// string settings
	StringFlags map[StringKey][]string `json:"string-flags" yaml:"string-flags"`
	// values
	ValuesFlags map[ValuesKey]map[string]interface{} `json:"values-flags" yaml:"values-flags"`
	// boolean settings
	BooleanFlags map[BooleanKey]bool
	// timeout settings
	DurationFlags map[DurationKey]time.Duration
}

type Inputs

type Inputs struct {
	ChartURI  string `json:"chart-uri" yaml:"chart-uri"`
	ReportURI string `json:"report-uri" yaml:"report_uri"`
	Flags     Flags  `json:"flags" yaml:"flags"`
}

type Outputs

type Outputs struct {
	Report        *apireport.Report               `json:"report" yaml:"report"`
	ReportSummary *apireportsummary.ReportSummary `json:"report-summary" yaml:"report-summary"`
}

type ReportFormat

type ReportFormat string

type StringKey

type StringKey string

type ValuesKey

type ValuesKey string

type Verifier

type Verifier struct {
	ID      string  `json:"UUID" yaml:"UUID"`
	Inputs  Inputs  `json:"inputs" yaml:"inputs"`
	Outputs Outputs `json:"outputs" yaml:"outputs"`
}

func (*Verifier) EnableChecks

func (v *Verifier) EnableChecks(checkNames []checks.CheckName) APIVerifier

* Enables the set of checks provided and un-enables all others, * If no checks are provided all checks are enabled

func (*Verifier) GetReport

func (v *Verifier) GetReport() *report.Report

func (*Verifier) Run

func (v *Verifier) Run(chartURI string) (APIVerifier, error)

* Runs the chart verifier for specified chart and based on previously set flags.

func (*Verifier) SetBoolean

func (v *Verifier) SetBoolean(key BooleanKey, value bool) APIVerifier

* Set a boolean flag. Overwrites any previous setting.

func (*Verifier) SetDuration

func (v *Verifier) SetDuration(key DurationKey, duration time.Duration) APIVerifier

* Set a duration flag. Overwrites any previous setting * Default timeout is 30 minutes

func (*Verifier) SetString

func (v *Verifier) SetString(key StringKey, value []string) APIVerifier

* Set a string flag. Overwrites any previous setting.

func (*Verifier) SetValues

func (v *Verifier) SetValues(valuesFlagName ValuesKey, values map[string]interface{}) APIVerifier

* Set a map of values flags. Adds/replaces any previous set values for the specified value setting.

func (*Verifier) UnEnableChecks

func (v *Verifier) UnEnableChecks(checkNames []checks.CheckName) APIVerifier

* Un-Enables the set of checks provided and enables all others,

Jump to

Keyboard shortcuts

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