Documentation
¶
Index ¶
- type DevfileV2
- func (d *DevfileV2) AddAttributes(key string, value interface{}) error
- func (d *DevfileV2) AddCommands(commands []v1.Command) error
- func (d *DevfileV2) AddComponents(components []v1.Component) error
- func (d *DevfileV2) AddEnvVars(containerEnvMap map[string][]v1alpha2.EnvVar) error
- func (d *DevfileV2) AddEvents(events v1.Events) error
- func (d *DevfileV2) AddProjects(projects []v1.Project) error
- func (d *DevfileV2) AddStarterProjects(projects []v1.StarterProject) error
- func (d *DevfileV2) AddVolumeMounts(containerName string, volumeMounts []v1.VolumeMount) error
- func (d *DevfileV2) DeleteCommand(id string) error
- func (d *DevfileV2) DeleteComponent(name string) error
- func (d *DevfileV2) DeleteProject(name string) error
- func (d *DevfileV2) DeleteStarterProject(name string) error
- func (d *DevfileV2) DeleteVolumeMount(name string) error
- func (d *DevfileV2) GetAttributes() (attributes.Attributes, error)
- func (d *DevfileV2) GetCommands(options common.DevfileOptions) ([]v1.Command, error)
- func (d *DevfileV2) GetComponents(options common.DevfileOptions) ([]v1.Component, error)
- func (d *DevfileV2) GetDevfileContainerComponents(options common.DevfileOptions) ([]v1.Component, error)
- func (d *DevfileV2) GetDevfileVolumeComponents(options common.DevfileOptions) ([]v1.Component, error)
- func (d *DevfileV2) GetDevfileWorkspaceSpec() *v1.DevWorkspaceTemplateSpec
- func (d *DevfileV2) GetDevfileWorkspaceSpecContent() *v1.DevWorkspaceTemplateSpecContent
- func (d *DevfileV2) GetEvents() v1.Events
- func (d *DevfileV2) GetMetadata() devfilepkg.DevfileMetadata
- func (d *DevfileV2) GetParent() *v1.Parent
- func (d *DevfileV2) GetProjects(options common.DevfileOptions) ([]v1.Project, error)
- func (d *DevfileV2) GetSchemaVersion() string
- func (d *DevfileV2) GetStarterProjects(options common.DevfileOptions) ([]v1.StarterProject, error)
- func (d *DevfileV2) GetVolumeMountPaths(mountName, containerName string) ([]string, error)
- func (d *DevfileV2) RemoveEnvVars(containerEnvMap map[string][]string) error
- func (d *DevfileV2) RemovePorts(containerPortsMap map[string][]string) error
- func (d *DevfileV2) SetDevfileWorkspaceSpec(spec v1.DevWorkspaceTemplateSpec)
- func (d *DevfileV2) SetDevfileWorkspaceSpecContent(content v1.DevWorkspaceTemplateSpecContent)
- func (d *DevfileV2) SetMetadata(metadata devfilepkg.DevfileMetadata)
- func (d *DevfileV2) SetParent(parent *v1.Parent)
- func (d *DevfileV2) SetPorts(containerPortsMap map[string][]string) error
- func (d *DevfileV2) SetSchemaVersion(version string)
- func (d *DevfileV2) UpdateAttributes(key string, value interface{}) error
- func (d *DevfileV2) UpdateCommand(command v1.Command) error
- func (d *DevfileV2) UpdateComponent(component v1.Component) error
- func (d *DevfileV2) UpdateEvents(postStart, postStop, preStart, preStop []string)
- func (d *DevfileV2) UpdateProject(project v1.Project) error
- func (d *DevfileV2) UpdateStarterProject(project v1.StarterProject) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DevfileV2 ¶
DevfileV2 is the devfile go struct from devfile/api
func (*DevfileV2) AddAttributes ¶
AddAttributes adds to the devfile top level attributes, value will be overwritten if key is already present
func (*DevfileV2) AddCommands ¶
AddCommands adds the slice of Command objects to the Devfile's commands a command is considered as invalid if it is already defined command list passed in will be all processed, and returns a total error of all invalid commands
func (*DevfileV2) AddComponents ¶
AddComponents adds the slice of Component objects to the devfile's components a component is considered as invalid if it is already defined component list passed in will be all processed, and returns a total error of all invalid components
func (*DevfileV2) AddEnvVars ¶
AddEnvVars accepts a map of container name mapped to an array of the env vars to be set; it adds the envirnoment variables to a given container name of the DevfileV2 object Example of containerEnvMap : {"runtime": {{Name: "Foo", Value: "Bar"}}}
func (*DevfileV2) AddEvents ¶
AddEvents adds the Events Object to the devfile's events an event field is considered as invalid if it is already defined all event fields will be checked and processed, and returns a total error of all event fields
func (*DevfileV2) AddProjects ¶
AddProjects adss the slice of Devfile projects to the Devfile's project list a project is considered as invalid if it is already defined project list passed in will be all processed, and returns a total error of all invalid projects
func (*DevfileV2) AddStarterProjects ¶
func (d *DevfileV2) AddStarterProjects(projects []v1.StarterProject) error
AddStarterProjects adds the slice of Devfile starter projects to the Devfile's starter project list a starterProject is considered as invalid if it is already defined starterProject list passed in will be all processed, and returns a total error of all invalid starterProjects
func (*DevfileV2) AddVolumeMounts ¶
func (d *DevfileV2) AddVolumeMounts(containerName string, volumeMounts []v1.VolumeMount) error
AddVolumeMounts adds the volume mounts to the specified container component
func (*DevfileV2) DeleteCommand ¶
DeleteCommand removes the specified command
func (*DevfileV2) DeleteComponent ¶
DeleteComponent removes the specified component
func (*DevfileV2) DeleteProject ¶
DeleteProject removes the specified project
func (*DevfileV2) DeleteStarterProject ¶
DeleteStarterProject removes the specified starter project
func (*DevfileV2) DeleteVolumeMount ¶
DeleteVolumeMount deletes the volume mount from container components
func (*DevfileV2) GetAttributes ¶
func (d *DevfileV2) GetAttributes() (attributes.Attributes, error)
GetAttributes gets the devfile top level attributes
func (*DevfileV2) GetCommands ¶
GetCommands returns the slice of Command objects parsed from the Devfile
func (*DevfileV2) GetComponents ¶
GetComponents returns the slice of Component objects parsed from the Devfile
func (*DevfileV2) GetDevfileContainerComponents ¶
func (d *DevfileV2) GetDevfileContainerComponents(options common.DevfileOptions) ([]v1.Component, error)
GetDevfileContainerComponents iterates through the components in the devfile and returns a list of devfile container components. Deprecated, use GetComponents() with the DevfileOptions.
func (*DevfileV2) GetDevfileVolumeComponents ¶
func (d *DevfileV2) GetDevfileVolumeComponents(options common.DevfileOptions) ([]v1.Component, error)
GetDevfileVolumeComponents iterates through the components in the devfile and returns a list of devfile volume components. Deprecated, use GetComponents() with the DevfileOptions.
func (*DevfileV2) GetDevfileWorkspaceSpec ¶
func (d *DevfileV2) GetDevfileWorkspaceSpec() *v1.DevWorkspaceTemplateSpec
func (*DevfileV2) GetDevfileWorkspaceSpecContent ¶
func (d *DevfileV2) GetDevfileWorkspaceSpecContent() *v1.DevWorkspaceTemplateSpecContent
GetDevfileWorkspaceSpecContent returns the workspace spec content for the devfile
func (*DevfileV2) GetMetadata ¶
func (d *DevfileV2) GetMetadata() devfilepkg.DevfileMetadata
GetMetadata returns the DevfileMetadata Object parsed from devfile
func (*DevfileV2) GetProjects ¶
GetProjects returns the Project Object parsed from devfile
func (*DevfileV2) GetSchemaVersion ¶
GetSchemaVersion gets devfile schema version
func (*DevfileV2) GetStarterProjects ¶
func (d *DevfileV2) GetStarterProjects(options common.DevfileOptions) ([]v1.StarterProject, error)
GetStarterProjects returns the DevfileStarterProject parsed from devfile
func (*DevfileV2) GetVolumeMountPaths ¶
GetVolumeMountPaths gets all the mount paths of the specified volume mount from the specified container component. A container can mount at different paths for a given volume.
func (*DevfileV2) RemoveEnvVars ¶
RemoveEnvVars accepts a map of container name mapped to an array of environment variables to be removed; it removes the env vars from the specified container name of the DevfileV2 object
func (*DevfileV2) RemovePorts ¶
RemovePorts accepts a map of container name mapped to an array of port numbers to be removed; it removes the container endpoints with the specified port numbers of the specified container of the DevfileV2 object Example of containerPortsMap: {"runtime": {"8080", "9000"}, "wildfly": {"12956"}}
func (*DevfileV2) SetDevfileWorkspaceSpec ¶
func (d *DevfileV2) SetDevfileWorkspaceSpec(spec v1.DevWorkspaceTemplateSpec)
SetDevfileWorkspaceSpec sets the workspace spec
func (*DevfileV2) SetDevfileWorkspaceSpecContent ¶
func (d *DevfileV2) SetDevfileWorkspaceSpecContent(content v1.DevWorkspaceTemplateSpecContent)
SetDevfileWorkspaceSpecContent sets the workspace spec content
func (*DevfileV2) SetMetadata ¶
func (d *DevfileV2) SetMetadata(metadata devfilepkg.DevfileMetadata)
SetMetadata sets the metadata for devfile
func (*DevfileV2) SetPorts ¶
SetPorts accepts a map of container name mapped to an array of port numbers to be set; it converts ports to endpoints, sets the endpoint to a given container name of the DevfileV2 object Example of containerPortsMap: {"runtime": {"8080", "9000"}, "wildfly": {"12956"}}
func (*DevfileV2) SetSchemaVersion ¶
SetSchemaVersion sets devfile schema version
func (*DevfileV2) UpdateAttributes ¶
UpdateAttributes updates the devfile top level attribute for the specific key, err out if key is absent
func (*DevfileV2) UpdateCommand ¶
UpdateCommand updates the command with the given id return an error if the command is not found
func (*DevfileV2) UpdateComponent ¶
UpdateComponent updates the component with the given name return an error if the component is not found
func (*DevfileV2) UpdateEvents ¶
UpdateEvents updates the devfile's events it only updates the events passed to it
func (*DevfileV2) UpdateProject ¶
UpdateProject updates the slice of Devfile projects parsed from the Devfile return an error if the project is not found
func (*DevfileV2) UpdateStarterProject ¶
func (d *DevfileV2) UpdateStarterProject(project v1.StarterProject) error
UpdateStarterProject updates the slice of Devfile starter projects parsed from the Devfile