validator

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodValidator added in v1.6.0

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

PodValidator implements the Validator interface for Pods

func NewPodValidator added in v1.6.0

func NewPodValidator(k kubernetes.Interface) *PodValidator

NewPodValidator initializes a PodValidator

func (*PodValidator) Validate added in v1.6.0

func (p *PodValidator) Validate(ctx context.Context, ns string, opts metav1.ListOptions) ([]Resource, error)

Validate implements the Validate method for Validator interface

type Resource added in v1.6.0

type Resource struct {
	StatusCode proto.StatusCode
	// contains filtered or unexported fields
}

func NewResource added in v1.6.0

func NewResource(namespace, kind, name string, status Status, err error, statusCode proto.StatusCode) Resource

NewResource creates new Resource of kind

func NewResourceFromObject added in v1.6.0

func NewResourceFromObject(object objectWithMetadata, status Status, err error, statusCode proto.StatusCode) Resource

NewResourceFromObject creates new Resource with fields populated from object metadata.

func (Resource) Error added in v1.9.0

func (r Resource) Error() error

func (Resource) Kind added in v1.6.0

func (r Resource) Kind() string

func (Resource) Name added in v1.6.0

func (r Resource) Name() string

func (Resource) Namespace added in v1.6.0

func (r Resource) Namespace() string

func (Resource) Status added in v1.6.0

func (r Resource) Status() Status

func (Resource) String added in v1.6.0

func (r Resource) String() string

type Status added in v1.6.0

type Status string

type Validator added in v1.6.0

type Validator interface {
	// Validate runs the validator and returns the list of resources with status.
	Validate(ctx context.Context, ns string, opts metav1.ListOptions) ([]Resource, error)
}

Jump to

Keyboard shortcuts

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