Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Json is the JSON output format. Json string = "json" // Yaml is the YAML output format. Yaml string = "yaml" GoStruct string = "gostruct" Auto string = "auto" Crd string = "crd" OpenAPI string = "openapi" JsonSchema string = "jsonschema" TerraformSchema string = "terraformschema" )
Variables ¶
This section is empty.
Functions ¶
func CompileOptionFromCli ¶
func CompileOptionFromCli(o *RunOptions) *opt.CompileOptions
CompileOptionFromCli will parse the kcl options from the cli options.
Types ¶
type ImportOptions ¶
type ImportOptions struct {
Mode string
Files []string
Output string
Force bool
SkipValidation bool
ModelPackage string
Recursive bool
}
func NewImportOptions ¶
func NewImportOptions() *ImportOptions
NewImportOptions returns a new instance of ImportOptions with default values.
func (*ImportOptions) Run ¶
func (o *ImportOptions) Run() error
Run runs the kcl import command with options.
type RunOptions ¶
type RunOptions struct {
// Entries is the list of the kcl code entry including filepath, folder, OCI package, etc.
Entries []string
// Output is the result output filepath. Default is os.Stdout.
Output string
// Settings is the list of kcl setting files including all of the CLI config.
Settings []string
// Arguments is the list of top level dynamic arguments for the kcl option function, e.g., env="prod"
Arguments []string
// Overrides is the list of override paths and values, e.g., app.image="v2"
Overrides []string
// PathSelectors is the list of path selectors to select output result, e.g., a.b.c
PathSelectors []string
// ExternalPackages denotes the list of external packages, e.g., k8s=./vendor/k8s
ExternalPackages []string
// NoStyle denotes disabling the output information style and color.
NoStyle bool
// Quiet denotes disabling all the output information.
Quiet bool
// Vendor denotes running kcl in the vendor mode.
Vendor bool
// SortKeys denotes sorting the output result keys, e.g., `{b = 1, a = 2} => {a = 2, b = 1}`.
SortKeys bool
// DisableNone denotes running kcl and disable dumping None values.
DisableNone bool
// Debug denotes running kcl in debug mode.
Debug bool
// StrictRangeCheck performs the 32-bit strict numeric range checks on numbers.
StrictRangeCheck bool
// Tag is the package tag of the OCI or Git artifact.
Tag string
// CompileOnly is used to check a local package and all of its dependencies for errors.
CompileOnly bool
// Format is the output type, e.g., Json, Yaml, etc. Default is Yaml.
Format string
// Writer is used to output the run result. Default is os.Stdout.
Writer io.Writer
}
RunOptions is a struct that holds the options for the run command.
func NewRunOptions ¶
func NewRunOptions() *RunOptions
NewRunOptions returns a new instance of RunOptions with default values.
func (*RunOptions) Complete ¶
func (o *RunOptions) Complete(args []string) error
Complete completes the options based on the provided arguments.
func (*RunOptions) Run ¶
func (o *RunOptions) Run() error
Run runs the kcl run command with options.
Click to show internal directories.
Click to hide internal directories.