Documentation
¶
Index ¶
- Constants
- func ValidateCommands(commands []v1alpha2.Command, components []v1alpha2.Component) (returnedErr error)
- func ValidateComponents(components []v1alpha2.Component) (returnedErr error)
- func ValidateEvents(events v1alpha2.Events, commands []v1alpha2.Command) (err error)
- func ValidateProjects(projects []v1alpha2.Project) (returnedErr error)
- func ValidateStarterProjects(starterProjects []v1alpha2.StarterProject) (returnedErr error)
- func ValidateURI(uri string) error
- type AnnotationConflictError
- type AnnotationType
- type InvalidCommandError
- type InvalidCommandTypeError
- type InvalidComponentError
- type InvalidEndpointError
- type InvalidEventError
- type InvalidProjectCheckoutRemoteError
- type InvalidResourceRequestError
- type InvalidVolumeError
- type MissingDefaultCmdWarning
- type MissingProjectCheckoutFromRemoteError
- type MissingProjectRemoteError
- type MissingRemoteError
- type MissingVolumeMountError
- type MultipleDefaultCmdError
- type MultipleRemoteError
- type ParsingResourceRequirementError
- type ReservedEnvError
- type ResourceRequirementType
Constants ¶
const ( // EnvProjectsSrc is the env defined for path to the project source in a component container EnvProjectsSrc = "PROJECT_SOURCE" // EnvProjectsRoot is the env defined for project mount in a component container when component's mountSources=true EnvProjectsRoot = "PROJECTS_ROOT" )
const ( // attribute key of the imported element resource information ImportSourceAttribute = "api.devfile.io/imported-from" // attribute key of the parent overridden element resource information ParentOverrideAttribute = "api.devfile.io/parent-override-from" // attribute key of the plugin overridden element resource information PluginOverrideAttribute = "api.devfile.io/plugin-override-from" )
attribute keys for imported and overridden elements the value of those keys is the resource information
Variables ¶
This section is empty.
Functions ¶
func ValidateCommands ¶
func ValidateCommands(commands []v1alpha2.Command, components []v1alpha2.Component) (returnedErr error)
ValidateCommands validates the devfile commands and checks: 1. there are no duplicate command ids 2. the command type is not invalid 3. if a command is part of a command group, there is a single default command
func ValidateComponents ¶
ValidateComponents validates that the components 1. makes sure the container components reference a valid volume component if it uses volume mounts 2. makes sure the volume components are unique 3. checks the URI specified in openshift components and kubernetes components are with valid format 4. makes sure the component name is unique 5. makes sure the image dockerfile component git src has at most one remote
func ValidateEvents ¶
ValidateEvents validates all the devfile events
func ValidateProjects ¶
ValidateProjects checks if the project has more than one remote configured then a checkout remote is mandatory and if the checkout remote matches the renote configured
func ValidateStarterProjects ¶
func ValidateStarterProjects(starterProjects []v1alpha2.StarterProject) (returnedErr error)
ValidateStarterProjects checks if starter project has only one remote configured and if the checkout remote matches the remote configured
func ValidateURI ¶
ValidateURI checks if the string is with valid uri format, return error if not valid
Types ¶
type AnnotationConflictError ¶ added in v2.2.0
type AnnotationConflictError struct {
// contains filtered or unexported fields
}
AnnotationConflictError returns an error if an annotation has been declared with conflict values
func (*AnnotationConflictError) Error ¶ added in v2.2.0
func (e *AnnotationConflictError) Error() string
type AnnotationType ¶ added in v2.2.0
type AnnotationType string
const ( DeploymentAnnotation AnnotationType = "deployment" ServiceAnnotation AnnotationType = "service" )
type InvalidCommandError ¶
type InvalidCommandError struct {
// contains filtered or unexported fields
}
InvalidCommandError returns an error if the command is invalid
func (*InvalidCommandError) Error ¶
func (e *InvalidCommandError) Error() string
type InvalidCommandTypeError ¶
type InvalidCommandTypeError struct {
// contains filtered or unexported fields
}
InvalidCommandError returns an error if the command is invalid
func (*InvalidCommandTypeError) Error ¶
func (e *InvalidCommandTypeError) Error() string
type InvalidComponentError ¶
type InvalidComponentError struct {
// contains filtered or unexported fields
}
InvalidComponentError returns an error if the component is invalid
func (*InvalidComponentError) Error ¶
func (e *InvalidComponentError) Error() string
type InvalidEndpointError ¶
type InvalidEndpointError struct {
// contains filtered or unexported fields
}
InvalidEndpointError returns an error if the component endpoint is invalid
func (*InvalidEndpointError) Error ¶
func (e *InvalidEndpointError) Error() string
type InvalidEventError ¶
type InvalidEventError struct {
// contains filtered or unexported fields
}
InvalidEventError returns an error if the devfile event type has invalid events
func (*InvalidEventError) Error ¶
func (e *InvalidEventError) Error() string
type InvalidProjectCheckoutRemoteError ¶ added in v2.2.0
type InvalidProjectCheckoutRemoteError struct {
// contains filtered or unexported fields
}
InvalidProjectCheckoutRemoteError returns an error if there is an unmatched, checkoutFrom remote specified
func (*InvalidProjectCheckoutRemoteError) Error ¶ added in v2.2.0
func (e *InvalidProjectCheckoutRemoteError) Error() string
type InvalidResourceRequestError ¶ added in v2.2.0
type InvalidResourceRequestError struct {
// contains filtered or unexported fields
}
InvalidResourceRequestError returns an error if resource limit < resource requested
func (*InvalidResourceRequestError) Error ¶ added in v2.2.0
func (e *InvalidResourceRequestError) Error() string
type InvalidVolumeError ¶
type InvalidVolumeError struct {
// contains filtered or unexported fields
}
InvalidVolumeError returns an error if the volume is invalid
func (*InvalidVolumeError) Error ¶
func (e *InvalidVolumeError) Error() string
type MissingDefaultCmdWarning ¶ added in v2.2.0
type MissingDefaultCmdWarning struct {
// contains filtered or unexported fields
}
MissingDefaultCmdWarning returns an error if there is no default command for a single group kind
func (*MissingDefaultCmdWarning) Error ¶ added in v2.2.0
func (e *MissingDefaultCmdWarning) Error() string
type MissingProjectCheckoutFromRemoteError ¶ added in v2.2.0
type MissingProjectCheckoutFromRemoteError struct {
// contains filtered or unexported fields
}
MissingProjectCheckoutFromRemoteError returns an error if there are multiple git remotes but the checkoutFrom remote has not been specified
func (*MissingProjectCheckoutFromRemoteError) Error ¶ added in v2.2.0
func (e *MissingProjectCheckoutFromRemoteError) Error() string
type MissingProjectRemoteError ¶ added in v2.2.0
type MissingProjectRemoteError struct {
// contains filtered or unexported fields
}
MissingProjectRemoteError returns an error if the git remotes object under a project is empty
func (*MissingProjectRemoteError) Error ¶ added in v2.2.0
func (e *MissingProjectRemoteError) Error() string
type MissingRemoteError ¶ added in v2.2.0
type MissingRemoteError struct {
// contains filtered or unexported fields
}
MissingRemoteError returns an error if the git remotes object is empty
func (*MissingRemoteError) Error ¶ added in v2.2.0
func (e *MissingRemoteError) Error() string
type MissingVolumeMountError ¶
type MissingVolumeMountError struct {
// contains filtered or unexported fields
}
MissingVolumeMountError returns an error if the container volume mount does not reference a valid volume component
func (*MissingVolumeMountError) Error ¶
func (e *MissingVolumeMountError) Error() string
type MultipleDefaultCmdError ¶ added in v2.2.0
type MultipleDefaultCmdError struct {
// contains filtered or unexported fields
}
MultipleDefaultCmdError returns an error if there are multiple default commands for a single group kind
func (*MultipleDefaultCmdError) Error ¶ added in v2.2.0
func (e *MultipleDefaultCmdError) Error() string
type MultipleRemoteError ¶ added in v2.2.0
type MultipleRemoteError struct {
// contains filtered or unexported fields
}
MultipleRemoteError returns an error if multiple git remotes are specified. There can only be one remote.
func (*MultipleRemoteError) Error ¶ added in v2.2.0
func (e *MultipleRemoteError) Error() string
type ParsingResourceRequirementError ¶ added in v2.2.0
type ParsingResourceRequirementError struct {
// contains filtered or unexported fields
}
ParsingResourceRequirementError returns an error if failed to parse a resource requirement
func (*ParsingResourceRequirementError) Error ¶ added in v2.2.0
func (e *ParsingResourceRequirementError) Error() string
type ReservedEnvError ¶
type ReservedEnvError struct {
// contains filtered or unexported fields
}
ReservedEnvError returns an error if the user attempts to customize a reserved ENV in a container
func (*ReservedEnvError) Error ¶
func (e *ReservedEnvError) Error() string
type ResourceRequirementType ¶ added in v2.2.0
type ResourceRequirementType string
const ( MemoryLimit ResourceRequirementType = "memoryLimit" CpuLimit ResourceRequirementType = "cpuLimit" MemoryRequest ResourceRequirementType = "memoryRequest" CpuRequest ResourceRequirementType = "cpuRequest" )