Documentation
¶
Index ¶
Constants ¶
View Source
const ( APIVersion100 supportedApiVersion = "1.0.0" APIVersion200 supportedApiVersion = "2.0.0" )
Supported devfile API versions in odo
Variables ¶
This section is empty.
Functions ¶
func GetDevfileJSONSchema ¶
GetDevfileJSONSchema returns the devfile JSON schema of the supported apiVersion
func IsApiVersionSupported ¶
IsApiVersionSupported returns true if the API version is supported in odo
Types ¶
type DevfileData ¶
type DevfileData interface {
SetSchemaVersion(version string)
GetMetadata() common.DevfileMetadata
SetMetadata(name, version string)
// parent related methods
GetParent() common.DevfileParent
SetParent(parent common.DevfileParent)
// event related methods
GetEvents() common.DevfileEvents
AddEvents(events common.DevfileEvents) error
UpdateEvents(postStart, postStop, preStart, preStop []string)
// component related methods
GetComponents() []common.DevfileComponent
AddComponents(components []common.DevfileComponent) error
UpdateComponent(component common.DevfileComponent)
GetAliasedComponents() []common.DevfileComponent
// project related methods
GetProjects() []common.DevfileProject
AddProjects(projects []common.DevfileProject) error
UpdateProject(project common.DevfileProject)
// starter projects related commands
GetStarterProjects() []common.DevfileStarterProject
AddStarterProjects(projects []common.DevfileStarterProject) error
UpdateStarterProject(project common.DevfileStarterProject)
// command related methods
GetCommands() map[string]common.DevfileCommand
AddCommands(commands ...common.DevfileCommand) error
UpdateCommand(command common.DevfileCommand)
AddVolume(volume common.Volume, path string) error
DeleteVolume(name string) error
GetVolumeMountPath(name string) (string, error)
}
DevfileData is an interface that defines functions for Devfile data operations
func NewDevfileData ¶
func NewDevfileData(version string) (obj DevfileData, err error)
NewDevfileData returns relevant devfile struct for the provided API version
Click to show internal directories.
Click to hide internal directories.