compile

package
v0.4.2-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Provide general KCL compilation method

Index

Constants

View Source
const KusionKclPathEnv = "KUSION_KCL_PATH"

Variables

This section is empty.

Functions

func CompileUsingCmd

func CompileUsingCmd(sourceKclFiles []string, targetFile string, args map[string]string, settings []string) (string, string, error)

Simply call kcl cmd

func CompileWithSpinner

func CompileWithSpinner(workDir string, filenames, settings, arguments, overrides []string,
	stack *projectstack.Stack,
) (*models.Spec, *pterm.SpinnerPrinter, error)

func EnableRPC

func EnableRPC() bool

func GetKclPath

func GetKclPath() string

Get kcl cli path

func GetKclvmPath

func GetKclvmPath() string

Get kclvm cli path

func Init

func Init() error

func Overwrite

func Overwrite(fileName string, overrides []string) (bool, error)

Types

type CompileResult

type CompileResult struct {
	Documents     []kcl.KCLResult
	RawYAMLResult string
}

The result of a KCL compilation

func Compile

func Compile(workDir string, filenames, settings, arguments, overrides []string, disableNone bool, overrideAST bool) (*CompileResult, error)

Compile General KCL compilation method

func NewCompileResult

func NewCompileResult(k *kcl.KCLResultList) *CompileResult

New a CompileResult by KCLResultList

func NewCompileResultByMapList

func NewCompileResultByMapList(mapList []map[string]interface{}) *CompileResult

New a CompileResult by map array

func (*CompileResult) RawYAML added in v0.4.1

func (c *CompileResult) RawYAML() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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