Documentation
¶
Overview ¶
Provide general KCL compilation method
Index ¶
- Constants
- func CompileUsingCmd(sourceKclFiles []string, targetFile string, args map[string]string, ...) (string, string, error)
- func EnableRPC() bool
- func GenerateSpec(o *Options, stack *projectstack.Stack) (*models.Spec, error)
- func GetKclPath() string
- func GetKclvmPath() string
- func Init() error
- func Overwrite(fileName string, overrides []string) (bool, error)
- type CompileResult
- type Options
Constants ¶
View Source
const ( KusionKclPathEnv = "KUSION_KCL_PATH" ID = "id" Type = "type" Attributes = "attributes" )
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 GenerateSpec ¶ added in v0.7.2
Types ¶
type CompileResult ¶
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
Click to show internal directories.
Click to hide internal directories.