validate

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapValid

func CapValid(c string, hostSpecific bool) error

CapValid checks whether a capability is valid

func JSONSchemaURL added in v0.2.0

func JSONSchemaURL(version string) (url string, err error)

JSONSchemaURL returns the URL for the JSON Schema specifying the configuration format. It consumes configSchemaTemplate, but we provide it as a function to isolate consumers from inconsistent naming as runtime-spec evolves.

func LastCap

func LastCap() capability.Cap

LastCap return last cap of system

Types

type Validator

type Validator struct {
	HostSpecific bool
	// contains filtered or unexported fields
}

Validator represents a validator for runtime bundle

func NewValidator

func NewValidator(spec *rspec.Spec, bundlePath string, hostSpecific bool, platform string) (Validator, error)

NewValidator creates a Validator

func NewValidatorFromPath

func NewValidatorFromPath(bundlePath string, hostSpecific bool, platform string) (Validator, error)

NewValidatorFromPath creates a Validator with specified bundle path

func (*Validator) CheckAll

func (v *Validator) CheckAll() error

CheckAll checks all parts of runtime bundle

func (*Validator) CheckAnnotations added in v0.6.0

func (v *Validator) CheckAnnotations() (errs error)

CheckAnnotations checks v.spec.Annotations

func (*Validator) CheckCapabilities

func (v *Validator) CheckCapabilities() (errs error)

CheckCapabilities checks v.spec.Process.Capabilities

func (*Validator) CheckHooks

func (v *Validator) CheckHooks() (errs error)

CheckHooks check v.spec.Hooks

func (*Validator) CheckJSONSchema added in v0.2.0

func (v *Validator) CheckJSONSchema() (errs error)

CheckJSONSchema validates the configuration against the runtime-spec JSON Schema, using the version of the schema that matches the configuration's declared version.

func (*Validator) CheckLinux

func (v *Validator) CheckLinux() (errs error)

CheckLinux checks v.spec.Linux

func (*Validator) CheckLinuxResources

func (v *Validator) CheckLinuxResources() (errs error)

CheckLinuxResources checks v.spec.Linux.Resources

func (*Validator) CheckMandatoryFields

func (v *Validator) CheckMandatoryFields() error

CheckMandatoryFields checks mandatory field of container's config file

func (*Validator) CheckMounts

func (v *Validator) CheckMounts() (errs error)

CheckMounts checks v.spec.Mounts

func (*Validator) CheckPlatform

func (v *Validator) CheckPlatform() (errs error)

CheckPlatform checks v.platform

func (*Validator) CheckProcess

func (v *Validator) CheckProcess() (errs error)

CheckProcess checks v.spec.Process

func (*Validator) CheckRlimits

func (v *Validator) CheckRlimits() (errs error)

CheckRlimits checks v.spec.Process.Rlimits

func (*Validator) CheckRoot

func (v *Validator) CheckRoot() (errs error)

CheckRoot checks status of v.spec.Root

func (*Validator) CheckSemVer

func (v *Validator) CheckSemVer() (errs error)

CheckSemVer checks v.spec.Version

Jump to

Keyboard shortcuts

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