kcl

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxLogLength          = 3751
	IncludeSchemaTypePath = "include_schema_type_path"
)
View Source
const (
	KusionKclPathEnv = "KUSION_KCL_PATH"
	ID               = "id"
	Type             = "type"
	Attributes       = "attributes"
)

Variables

This section is empty.

Functions

func BuildKCLOptions

func BuildKCLOptions(o *builders.Options) ([]kcl.Option, error)

func CompileUsingCmd

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

CompileUsingCmd simply call kcl cmd

func EnableRPC

func EnableRPC() bool

func Init

func Init() error

func KCLResult2Intent

func KCLResult2Intent(kclResults []kcl.KCLResult) (*v1.Intent, error)

func Overwrite

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

Types

type Builder

type Builder struct{}

func (*Builder) Build

func (g *Builder) Build(o *builders.Options, _ *v1.Project, stack *v1.Stack) (*v1.Intent, error)

type CompileResult

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

CompileResult is the result of a KCL compilation

func NewCompileResult

func NewCompileResult(k *kcl.KCLResultList) *CompileResult

NewCompileResult news a CompileResult by KCLResultList

func NewCompileResultByMapList

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

NewCompileResultByMapList news a CompileResult by map array

func Run

func Run(o *builders.Options, stack *v1.Stack) (*CompileResult, error)

func (*CompileResult) RawYAML

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