Documentation
¶
Index ¶
- func FilterDevfileObject(attributes apiAttributes.Attributes, options DevfileOptions) (bool, error)
- func GetApplyComponent(dc v1.Command) string
- func GetCommandType(command v1.Command) (v1.CommandType, error)
- func GetCommandsFromEvent(commandsMap map[string]v1.Command, eventName string) []string
- func GetCommandsMap(commands []v1.Command) map[string]v1.Command
- func GetComponentType(component v1.Component) (v1.ComponentType, error)
- func GetDefaultSource(ps v1.GitLikeProjectSource) (remoteName string, remoteURL string, revision string, err error)
- func GetExecCommandLine(dc v1.Command) string
- func GetExecComponent(dc v1.Command) string
- func GetExecWorkingDir(dc v1.Command) string
- func GetGroup(dc v1.Command) *v1.CommandGroup
- func GetProjectSourceType(projectSrc v1.ProjectSource) (v1.ProjectSourceType, error)
- func IsContainer(component v1.Component) bool
- func IsVolume(component v1.Component) bool
- type CommandOptions
- type ComponentOptions
- type DevfileOptions
- type FieldAlreadyExistError
- type FieldNotFoundError
- type ProjectOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterDevfileObject ¶
func FilterDevfileObject(attributes apiAttributes.Attributes, options DevfileOptions) (bool, error)
FilterDevfileObject filters devfile attributes with the given options
func GetApplyComponent ¶
GetApplyComponent returns the component of the apply command
func GetCommandType ¶
func GetCommandType(command v1.Command) (v1.CommandType, error)
GetCommandType returns the command type of a given command
func GetCommandsFromEvent ¶
GetCommandsFromEvent returns the list of commands from the event name. If the event is a composite command, it returns the sub-commands from the tree
func GetCommandsMap ¶
GetCommandsMap returns a map of the command Id to the command
func GetComponentType ¶
func GetComponentType(component v1.Component) (v1.ComponentType, error)
GetComponentType returns the component type of a given component
func GetDefaultSource ¶
func GetDefaultSource(ps v1.GitLikeProjectSource) (remoteName string, remoteURL string, revision string, err error)
GetDefaultSource get information about primary source returns 3 strings: remote name, remote URL, reference(revision)
func GetExecCommandLine ¶
GetExecCommandLine returns the command line of the exec command
func GetExecComponent ¶
GetExecComponent returns the component of the exec command
func GetExecWorkingDir ¶
GetExecWorkingDir returns the working dir of the exec command
func GetGroup ¶
func GetGroup(dc v1.Command) *v1.CommandGroup
GetGroup returns the group the command belongs to
func GetProjectSourceType ¶
func GetProjectSourceType(projectSrc v1.ProjectSource) (v1.ProjectSourceType, error)
GetProjectSourceType returns the source type of a given project source
func IsContainer ¶
IsContainer checks if the component is a container
Types ¶
type CommandOptions ¶
type CommandOptions struct { // CommandGroupKind is an option that allows to filter command based on their kind CommandGroupKind v1.CommandGroupKind // CommandType is an option that allows to filter command based on their type CommandType v1.CommandType }
CommandOptions specifies the various options available to filter commands
type ComponentOptions ¶
type ComponentOptions struct { // ComponentType is an option that allows to filter component based on their type ComponentType v1.ComponentType }
ComponentOptions specifies the various options available to filter components
type DevfileOptions ¶
type DevfileOptions struct { // Filter is a map that lets filter devfile object against their attributes. Interface can be string, float, boolean or a map Filter map[string]interface{} // CommandOptions specifies the various options available to filter commands CommandOptions CommandOptions // ComponentOptions specifies the various options available to filter components ComponentOptions ComponentOptions // ProjectOptions specifies the various options available to filter projects/starterProjects ProjectOptions ProjectOptions }
DevfileOptions provides options for Devfile operations
type FieldAlreadyExistError ¶
type FieldAlreadyExistError struct { // field which already exist Field string // field name Name string }
FieldAlreadyExistError error returned if tried to add already exisitng field
func (*FieldAlreadyExistError) Error ¶
func (e *FieldAlreadyExistError) Error() string
type FieldNotFoundError ¶
type FieldNotFoundError struct { // field which doesn't exist Field string // field name Name string }
FieldNotFoundError error returned if the field with the name is not found
func (*FieldNotFoundError) Error ¶
func (e *FieldNotFoundError) Error() string
type ProjectOptions ¶
type ProjectOptions struct { // ProjectSourceType is an option that allows to filter project based on their source type ProjectSourceType v1.ProjectSourceType }
ProjectOptions specifies the various options available to filter projects/starterProjects