parser

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func YAMLToJSON

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.

Types

type DevfileCtx

type DevfileCtx struct {

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

DevfileCtx stores context info regarding devfile

func NewDevfileCtx

func NewDevfileCtx(path string) DevfileCtx

NewDevfileCtx returns a new DevfileCtx type object

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) 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 is to JSON

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