checks

package
v0.0.0-...-448f0e6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCheck

func NewCheck(name, targetType, comment string, optional bool) ks.Check

Types

type CheckFunc

type CheckFunc[T any] func(T) (scorecard.TestScore, error)

type Checks

type Checks struct {
	// contains filtered or unexported fields
}

func New

func New(cnf config.Configuration) *Checks

func (*Checks) All

func (c *Checks) All() []ks.Check

func (*Checks) CronJobs

func (c *Checks) CronJobs() map[string]GenCheck[ks.CronJob]

func (*Checks) Deployments

func (c *Checks) Deployments() map[string]GenCheck[appsv1.Deployment]

func (*Checks) HorizontalPodAutoscalers

func (c *Checks) HorizontalPodAutoscalers() map[string]GenCheck[ks.HpaTargeter]

func (*Checks) Ingresses

func (c *Checks) Ingresses() map[string]GenCheck[ks.Ingress]

func (*Checks) Metas

func (c *Checks) Metas() map[string]GenCheck[ks.BothMeta]

func (*Checks) NetworkPolicies

func (c *Checks) NetworkPolicies() map[string]GenCheck[networkingv1.NetworkPolicy]

func (*Checks) PodDisruptionBudgets

func (c *Checks) PodDisruptionBudgets() map[string]GenCheck[ks.PodDisruptionBudget]

func (*Checks) Pods

func (c *Checks) Pods() map[string]GenCheck[ks.PodSpecer]

func (*Checks) RegisterCronJobCheck

func (c *Checks) RegisterCronJobCheck(name, comment string, fn CheckFunc[ks.CronJob])

func (*Checks) RegisterDeploymentCheck

func (c *Checks) RegisterDeploymentCheck(name, comment string, fn CheckFunc[appsv1.Deployment])

func (*Checks) RegisterHorizontalPodAutoscalerCheck

func (c *Checks) RegisterHorizontalPodAutoscalerCheck(name, comment string, fn CheckFunc[ks.HpaTargeter])

func (*Checks) RegisterIngressCheck

func (c *Checks) RegisterIngressCheck(name, comment string, fn CheckFunc[ks.Ingress])

func (*Checks) RegisterMetaCheck

func (c *Checks) RegisterMetaCheck(name, comment string, fn CheckFunc[ks.BothMeta])

func (*Checks) RegisterNetworkPolicyCheck

func (c *Checks) RegisterNetworkPolicyCheck(name, comment string, fn CheckFunc[networkingv1.NetworkPolicy])

func (*Checks) RegisterOptionalCronJobCheck

func (c *Checks) RegisterOptionalCronJobCheck(name, comment string, fn CheckFunc[ks.CronJob])

func (*Checks) RegisterOptionalDeploymentCheck

func (c *Checks) RegisterOptionalDeploymentCheck(name, comment string, fn CheckFunc[appsv1.Deployment])

func (*Checks) RegisterOptionalHorizontalPodAutoscalerCheck

func (c *Checks) RegisterOptionalHorizontalPodAutoscalerCheck(name, comment string, fn CheckFunc[ks.HpaTargeter])

func (*Checks) RegisterOptionalIngressCheck

func (c *Checks) RegisterOptionalIngressCheck(name, comment string, fn CheckFunc[ks.Ingress])

func (*Checks) RegisterOptionalMetaCheck

func (c *Checks) RegisterOptionalMetaCheck(name, comment string, fn CheckFunc[ks.BothMeta])

func (*Checks) RegisterOptionalNetworkPolicyCheck

func (c *Checks) RegisterOptionalNetworkPolicyCheck(name, comment string, fn CheckFunc[networkingv1.NetworkPolicy])

func (*Checks) RegisterOptionalPodCheck

func (c *Checks) RegisterOptionalPodCheck(name, comment string, fn CheckFunc[ks.PodSpecer])

func (*Checks) RegisterOptionalServiceCheck

func (c *Checks) RegisterOptionalServiceCheck(name, comment string, fn CheckFunc[corev1.Service])

func (*Checks) RegisterOptionalStatefulSetCheck

func (c *Checks) RegisterOptionalStatefulSetCheck(name, comment string, fn CheckFunc[appsv1.StatefulSet])

func (*Checks) RegisterPodCheck

func (c *Checks) RegisterPodCheck(name, comment string, fn CheckFunc[ks.PodSpecer])

func (*Checks) RegisterPodDisruptionBudgetCheck

func (c *Checks) RegisterPodDisruptionBudgetCheck(name, comment string, fn CheckFunc[ks.PodDisruptionBudget])

func (*Checks) RegisterServiceCheck

func (c *Checks) RegisterServiceCheck(name, comment string, fn CheckFunc[corev1.Service])

func (*Checks) RegisterStatefulSetCheck

func (c *Checks) RegisterStatefulSetCheck(name, comment string, fn CheckFunc[appsv1.StatefulSet])

func (*Checks) Services

func (c *Checks) Services() map[string]GenCheck[corev1.Service]

func (*Checks) StatefulSets

func (c *Checks) StatefulSets() map[string]GenCheck[appsv1.StatefulSet]

type GenCheck

type GenCheck[T any] struct {
	ks.Check
	Fn CheckFunc[T]
}

type MetaCheck

type MetaCheck struct {
	ks.Check
	Fn MetaCheckFn
}

type MetaCheckFn

type MetaCheckFn = func(ks.BothMeta) scorecard.TestScore

Jump to

Keyboard shortcuts

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