jsonnet

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ArgsFileName string = "render"

ArgsFileName is the name of the arguments file the jsonnet renderer looks for to pass to the pipeline as TLA veriables.

View Source
const JsonnetFileName string = "jsonnetfile.json"
View Source
const ShareLibsPath string = "vendor"

ShareLibsPath - the path that jsonnet should look into when looking for shared libraries.

Designed to work with - https://github.com/jsonnet-bundler/jsonnet-bundler/

Variables

View Source
var RenderFiles = map[renderer.RenderType]string{

	renderer.MainFileName:    "main.pipeline.jsonnet",
	renderer.CleanUpFileName: "cleanup/cleanup.pipeline.jsonnet",
}

Functions

This section is empty.

Types

type FileImporter

type FileImporter struct {
	JPaths []string
	// contains filtered or unexported fields
}

func NewImporter

func NewImporter(fs afero.Fs, projectPath string, jbFile jbV1.JsonnetFile) *FileImporter

NewImporter - Get the Jsonnet File Import customized to the Jsonnet Bundler type.

func (*FileImporter) Import

func (importer *FileImporter) Import(importedFrom, importedPath string) (contents jsonnet.Contents, foundAt string, err error)

Import imports file from the filesystem.

type Jsonnet

type Jsonnet struct {
	renderer.Renderer
	// contains filtered or unexported fields
}

Jsonnet - A Jsonnet renderer instance. The struct holds the required parameters to render a standard shore pipeline.

func NewRenderer

func NewRenderer(fs afero.Fs, logger logrus.FieldLogger) *Jsonnet

NewRenderer - Create new instance of the JSONNET renderer.

func (*Jsonnet) Render

func (j *Jsonnet) Render(projectPath string, renderArgs string, renderType renderer.RenderType) (string, error)

Render - Render the code with the VM.

type SharedLibErr

type SharedLibErr struct {
	Require string
	Path    string
	Err     error
}

SharedLibErr - Custom error for the custom implementation of JSONNET shared libraries.

func (SharedLibErr) Error

func (s SharedLibErr) Error() string

Jump to

Keyboard shortcuts

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