{"modulePath":"github.com/redhat-developer/ODO","version":"v1.2.6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parser\n\n## Functions\n\n```go\nfunc YAMLToJSON(data []byte) ([]byte, error)\n```\nYAMLToJSON 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.\n\n## Types\n\n```go\ntype DevfileCtx struct {\n\n\t// filesystem for devfile\n\tFs filesystem.Filesystem\n\t// contains filtered or unexported fields\n}\n```\nDevfileCtx stores context info regarding devfile\n\n```go\nfunc FakeContext(fs filesystem.Filesystem, absPath string) DevfileCtx\n```\n\n```go\nfunc NewDevfileCtx(path string) DevfileCtx\n```\nNewDevfileCtx returns a new DevfileCtx type object\n\n```go\nfunc NewURLDevfileCtx(url string) DevfileCtx\n```\nNewURLDevfileCtx returns a new DevfileCtx type object\n\n```go\nfunc (d *DevfileCtx) GetAbsPath() string\n```\n\n```go\nfunc (d *DevfileCtx) GetApiVersion() string\n```\nGetApiVersion returns apiVersion stored in devfile context\n\n```go\nfunc (d *DevfileCtx) GetDevfileContent() []byte\n```\nGetDevfileContent returns the devfile content\n\n```go\nfunc (d *DevfileCtx) GetFs() filesystem.Filesystem\n```\nGetFs returns the filesystem object\n\n```go\nfunc (d *DevfileCtx) IsApiVersionSupported() bool\n```\nIsApiVersionSupported return true if the apiVersion in DevfileCtx is supported in odo\n\n```go\nfunc (d *DevfileCtx) Populate() (err error)\n```\nPopulate fills the DevfileCtx struct with relevant context info\n\n```go\nfunc (d *DevfileCtx) PopulateFromURL() (err error)\n```\nPopulateFromURL fills the DevfileCtx struct with relevant context info\n\n```go\nfunc (d *DevfileCtx) SetDevfileAPIVersion() error\n```\nSetDevfileAPIVersion returns the devfile APIVersion\n\n```go\nfunc (d *DevfileCtx) SetDevfileContent() error\n```\nSetDevfileContent reads devfile and if devfile is in YAML format converts it to JSON\n\n```go\nfunc (d *DevfileCtx) SetDevfileContentFromBytes(data []byte) error\n```\nSetDevfileContentFromBytes sets devfile content from byte input\n\n```go\nfunc (d *DevfileCtx) SetDevfileJSONSchema() error\n```\nSetDevfileJSONSchema returns the JSON schema for the given devfile apiVersion\n\n```go\nfunc (d *DevfileCtx) Validate() error\n```\nValidate func validates devfile JSON schema for the given apiVersion\n\n```go\nfunc (d *DevfileCtx) ValidateDevfileSchema() error\n```\nValidateDevfileSchema validate JSON schema of the provided devfile\n\n","path":"github.com/redhat-developer/ODO/pkg/devfile/parser/context","name":"parser","synopsis":"","isRedistributable":true}
