data

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

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

func GetDevfileJSONSchema(version string) (string, error)

GetDevfileJSONSchema returns the devfile JSON schema of the supported apiVersion

func IsApiVersionSupported

func IsApiVersionSupported(version string) bool

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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