validate

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParallelValidators = []SpinnakerValidator{
	&versionValidator{},
	&dockerRegistryValidator{},
}

Validators registered here should be stateless

Functions

This section is empty.

Types

type Account

type Account interface {
	GetType() string
	GetName() string
	GetHash() string
}

type Options

type Options struct {
	Ctx          context.Context
	Client       client.Client
	Req          admission.Request
	Log          logr.Logger
	Halyard      *halyard.Service
	TypesFactory interfaces.TypesFactory
}

type ParallelValidator

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

func (*ParallelValidator) Validate

type SpinnakerValidator

type SpinnakerValidator interface {
	Validate(spinSvc interfaces.SpinnakerService, options Options) ValidationResult
}

func GetAccountValidationsFor

func GetAccountValidationsFor(spinSvc interfaces.SpinnakerService, options Options) ([]SpinnakerValidator, error)

GetAccountValidationsFor inspects all known providers, retrieves their accounts, and generate validators

type ValidationResult

type ValidationResult struct {
	Errors []error
	Fatal  bool
}

func NewResultFromError

func NewResultFromError(e error, fatal bool) ValidationResult

func NewResultFromErrors added in v0.6.0

func NewResultFromErrors(e []error, fatal bool) ValidationResult

func ValidateAll

func ValidateAll(spinSvc interfaces.SpinnakerService, options Options) ValidationResult

func (*ValidationResult) GetErrorMessage

func (r *ValidationResult) GetErrorMessage() string

func (*ValidationResult) HasErrors

func (r *ValidationResult) HasErrors() bool

func (*ValidationResult) HasFatalErrors

func (r *ValidationResult) HasFatalErrors() bool

func (*ValidationResult) Merge

func (r *ValidationResult) Merge(other ValidationResult)

Jump to

Keyboard shortcuts

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