Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TestOutput io.Writer = os.Stderr
Functions ¶
func ExtractSchema ¶
ExtractSchema extracts an openAPI schema from a CRD/ XRD-like object and returns the equivalent cue types.
func GenerateOpenAPISchema ¶
GenerateOpenAPISchema generates an openapi schema using the contents of the supplied directory and returns it prefixing it with a package declaration for the supplied package.
func PackageScript ¶
func PackageScript(dir string, opts PackageScriptOpts) (_ []byte, finalErr error)
PackageScript generates self-contained definitions from the supplied directory and returns cue code for an object with a _script property that contains the code as a string. The returned object has a package declaration for the package supplied.
Types ¶
type OutputFormat ¶
type OutputFormat string
const ( FormatRaw OutputFormat = "raw" FormatCue OutputFormat = "cue" )
type PackageScriptOpts ¶
type PackageScriptOpts struct { OutputPackage string Format OutputFormat }
type TestConfig ¶
Click to show internal directories.
Click to hide internal directories.