kcl

package
v0.8.3-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KusionKclPathEnv = "KUSION_KCL_PATH"
	ID               = "id"
	Type             = "type"
	Attributes       = "attributes"
)

Variables

This section is empty.

Functions

func BuildOptions

func BuildOptions(workDir string, settings, arguments, overrides []string, disableNone, overrideAST bool) ([]kcl.Option, error)

func CompileUsingCmd

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

Simply call kcl cmd

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 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 Run

func (*CompileResult) RawYAML

func (c *CompileResult) RawYAML() string

type Generator

type Generator struct{}

func (*Generator) GenerateSpec

func (g *Generator) GenerateSpec(o *generator.Options, stack *projectstack.Stack) (*models.Spec, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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