common

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

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 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

func GetExecCommandLine(dc v1.Command) string

GetExecCommandLine returns the command line of the exec command

func GetExecComponent

func GetExecComponent(dc v1.Command) string

GetExecComponent returns the component of the exec command

func GetExecWorkingDir

func GetExecWorkingDir(dc v1.Command) string

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 IsContainer

func IsContainer(component v1.Component) bool

IsContainer checks if the component is a container

func IsVolume

func IsVolume(component v1.Component) bool

IsVolume checks if the component is a volume

Types

type DevfileOptions

type DevfileOptions struct {
	// Filter is a map that lets you filter devfile object against their attributes. Interface can be string, float, boolean or a map
	Filter map[string]interface{}
}

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

Jump to

Keyboard shortcuts

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