jsonnet

package
v0.0.0-...-726e4b6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HeaderMarker = "\n###\n"

Functions

func NewJsonnetVM

func NewJsonnetVM(useColor bool, paths ...string) *_jsonnet.VM

Types

type EngineOptions

type EngineOptions struct {
	Debug        bool
	DryRun       bool
	UseColor     bool
	LibraryPaths []string
	Meta         any
}

type JsonnetEngine

type JsonnetEngine struct {
	Options EngineOptions
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(tmpl string, opts ...TemplateOption) *JsonnetEngine

func (*JsonnetEngine) Debug

func (e *JsonnetEngine) Debug() bool

func (*JsonnetEngine) DryRun

func (e *JsonnetEngine) DryRun() bool

func (*JsonnetEngine) Execute

func (e *JsonnetEngine) Execute(topic, input string, variables string) (string, error)

type TemplateOption

type TemplateOption func(*EngineOptions) *EngineOptions

func WithColorStackTrace

func WithColorStackTrace(v bool) TemplateOption

func WithDebug

func WithDebug(v bool) TemplateOption

func WithDryRun

func WithDryRun(v bool) TemplateOption

func WithLibraryPaths

func WithLibraryPaths(paths ...string) TemplateOption

func WithMetaData

func WithMetaData(v any) TemplateOption

Jump to

Keyboard shortcuts

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