Version: v1.2.6 Latest Latest

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

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




This section is empty.


This section is empty.



func YAMLToJSON(data []byte) ([]byte, error)

YAMLToJSON converts a single YAML document into a JSON document or returns an error. If the document appears to be JSON the YAML decoding path is not used.


type DevfileCtx

type DevfileCtx struct {

	// filesystem for devfile
	Fs filesystem.Filesystem
	// contains filtered or unexported fields

DevfileCtx stores context info regarding devfile

func FakeContext added in v1.2.6

func FakeContext(fs filesystem.Filesystem, absPath string) DevfileCtx

func NewDevfileCtx

func NewDevfileCtx(path string) DevfileCtx

NewDevfileCtx returns a new DevfileCtx type object

func NewURLDevfileCtx added in v1.2.5

func NewURLDevfileCtx(url string) DevfileCtx

NewURLDevfileCtx returns a new DevfileCtx type object

func (*DevfileCtx) GetAbsPath added in v1.2.6

func (d *DevfileCtx) GetAbsPath() string

func (*DevfileCtx) GetApiVersion

func (d *DevfileCtx) GetApiVersion() string

GetApiVersion returns apiVersion stored in devfile context

func (*DevfileCtx) GetDevfileContent

func (d *DevfileCtx) GetDevfileContent() []byte

GetDevfileContent returns the devfile content

func (*DevfileCtx) GetFs

func (d *DevfileCtx) GetFs() filesystem.Filesystem

GetFs returns the filesystem object

func (*DevfileCtx) IsApiVersionSupported

func (d *DevfileCtx) IsApiVersionSupported() bool

IsApiVersionSupported return true if the apiVersion in DevfileCtx is supported in odo

func (*DevfileCtx) Populate

func (d *DevfileCtx) Populate() (err error)

Populate fills the DevfileCtx struct with relevant context info

func (*DevfileCtx) PopulateFromURL added in v1.2.5

func (d *DevfileCtx) PopulateFromURL() (err error)

PopulateFromURL fills the DevfileCtx struct with relevant context info

func (*DevfileCtx) SetDevfileAPIVersion

func (d *DevfileCtx) SetDevfileAPIVersion() error

SetDevfileAPIVersion returns the devfile APIVersion

func (*DevfileCtx) SetDevfileContent

func (d *DevfileCtx) SetDevfileContent() error

SetDevfileContent reads devfile and if devfile is in YAML format converts it to JSON

func (*DevfileCtx) SetDevfileContentFromBytes added in v1.2.4

func (d *DevfileCtx) SetDevfileContentFromBytes(data []byte) error

SetDevfileContentFromBytes sets devfile content from byte input

func (*DevfileCtx) SetDevfileJSONSchema

func (d *DevfileCtx) SetDevfileJSONSchema() error

SetDevfileJSONSchema returns the JSON schema for the given devfile apiVersion

func (*DevfileCtx) Validate

func (d *DevfileCtx) Validate() error

Validate func validates devfile JSON schema for the given apiVersion

func (*DevfileCtx) ValidateDevfileSchema

func (d *DevfileCtx) ValidateDevfileSchema() error

ValidateDevfileSchema validate JSON schema of the provided devfile

Jump to

Keyboard shortcuts

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