Documentation
¶
Index ¶
- Constants
- type Context
- type PluginInput
- type PluginInputGRPC
- type PluginOutput
- type ValidateFunc
- type Validation
- func (self *Validation) DefaultValidate(context contextpkg.Context, validationContext *Context) []error
- func (self *Validation) GetValidators(gvk tkoutil.GVK, complete bool) (Validators, error)
- func (self *Validation) Kubeconform(resource util.Resource, complete bool) []error
- func (self *Validation) NewContext(package_ util.Package, targetResourceIdentifer util.ResourceIdentifier, ...) *Context
- func (self *Validation) RegisterValidator(gvk tkoutil.GVK, validate ValidateFunc)
- func (self *Validation) ResetPluginCache()
- func (self *Validation) ValidatePackage(package_ util.Package, complete bool) error
- type Validators
- type ValidatorsMap
Constants ¶
View Source
const FIFOPrefix = "tko-validation-"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Validation *Validation Package util.Package TargetResourceIdentifer util.ResourceIdentifier Complete bool }
func (*Context) ToPluginInput ¶
func (self *Context) ToPluginInput(logFile string, logAddressPort string) PluginInput
type PluginInput ¶
type PluginInput struct { GRPC PluginInputGRPC `yaml:"grpc"` LogFile string `yaml:"logFile"` LogAddressPort string `yaml:"logAddressPort"` Package tkoutil.Package `yaml:"package"` TargetResourceIdentifer tkoutil.ResourceIdentifier `yaml:"targetResourceIdentifier"` Complete bool `yaml:"complete"` }
type PluginInputGRPC ¶
type PluginOutput ¶
type PluginOutput struct {
Error string `yaml:"error,omitempty"`
}
type ValidateFunc ¶
type ValidateFunc func(context contextpkg.Context, validationContext *Context) []error
func NewPluginValidator ¶
type Validation ¶
type Validation struct { Client *clientpkg.Client Timeout time.Duration Log commonlog.Logger LogIPStack util.IPStack LogAddress string LogPort int // contains filtered or unexported fields }
func NewValidation ¶
func (*Validation) DefaultValidate ¶
func (self *Validation) DefaultValidate(context contextpkg.Context, validationContext *Context) []error
(ValidateFunc signature)
func (*Validation) GetValidators ¶
func (self *Validation) GetValidators(gvk tkoutil.GVK, complete bool) (Validators, error)
func (*Validation) Kubeconform ¶
func (self *Validation) Kubeconform(resource util.Resource, complete bool) []error
func (*Validation) NewContext ¶
func (self *Validation) NewContext(package_ util.Package, targetResourceIdentifer util.ResourceIdentifier, complete bool) *Context
func (*Validation) RegisterValidator ¶
func (self *Validation) RegisterValidator(gvk tkoutil.GVK, validate ValidateFunc)
func (*Validation) ResetPluginCache ¶
func (self *Validation) ResetPluginCache()
func (*Validation) ValidatePackage ¶
func (self *Validation) ValidatePackage(package_ util.Package, complete bool) error
type Validators ¶
type Validators []ValidateFunc
type ValidatorsMap ¶
type ValidatorsMap map[tkoutil.GVK]Validators
Click to show internal directories.
Click to hide internal directories.