package validate
import "github.com/opencontainers/runtime-tools/validate"
Index ¶
- func CapValid(c string, hostSpecific bool) error
- func JSONSchemaURL(version string) (url string, err error)
- func LastCap() capability.Cap
- type Validator
- func NewValidator(spec *rspec.Spec, bundlePath string, hostSpecific bool, platform string) (Validator, error)
- func NewValidatorFromPath(bundlePath string, hostSpecific bool, platform string) (Validator, error)
- func (v *Validator) CheckAll() error
- func (v *Validator) CheckAnnotations() (errs error)
- func (v *Validator) CheckCapabilities() (errs error)
- func (v *Validator) CheckHooks() (errs error)
- func (v *Validator) CheckJSONSchema() (errs error)
- func (v *Validator) CheckLinux() (errs error)
- func (v *Validator) CheckLinuxResources() (errs error)
- func (v *Validator) CheckMandatoryFields() error
- func (v *Validator) CheckMounts() (errs error)
- func (v *Validator) CheckPlatform() (errs error)
- func (v *Validator) CheckProcess() (errs error)
- func (v *Validator) CheckRlimits() (errs error)
- func (v *Validator) CheckRoot() (errs error)
- func (v *Validator) CheckSemVer() (errs error)
Functions ¶
func CapValid ¶
CapValid checks whether a capability is valid
func JSONSchemaURL ¶
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 ¶
NewValidatorFromPath creates a Validator with specified bundle path
func (*Validator) CheckAll ¶
CheckAll checks all parts of runtime bundle
func (*Validator) CheckAnnotations ¶
CheckAnnotations checks v.spec.Annotations
func (*Validator) CheckCapabilities ¶
CheckCapabilities checks v.spec.Process.Capabilities
func (*Validator) CheckHooks ¶
CheckHooks check v.spec.Hooks
func (*Validator) CheckJSONSchema ¶
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 ¶
CheckLinux checks v.spec.Linux
func (*Validator) CheckLinuxResources ¶
CheckLinuxResources checks v.spec.Linux.Resources
func (*Validator) CheckMandatoryFields ¶
CheckMandatoryFields checks mandatory field of container's config file
func (*Validator) CheckMounts ¶
CheckMounts checks v.spec.Mounts
func (*Validator) CheckPlatform ¶
CheckPlatform checks v.platform
func (*Validator) CheckProcess ¶
CheckProcess checks v.spec.Process
func (*Validator) CheckRlimits ¶
CheckRlimits checks v.spec.Process.Rlimits
func (*Validator) CheckRoot ¶
CheckRoot checks status of v.spec.Root
func (*Validator) CheckSemVer ¶
CheckSemVer checks v.spec.Version
Source Files ¶
- Version
- v0.9.0 (latest)
- Published
- Mar 6, 2019
- Platform
- linux/amd64
- Imports
- 24 packages
- Last checked
- 1 week ago –
Tools for package owners.