render

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentType

type ContentType int
const (
	Unknown ContentType = iota
	JSON
	YAML
)

type Jsonnet

type Jsonnet struct {
	Importer Importer
	Data     json.RawMessage
}

func (Jsonnet) Render

func (r Jsonnet) Render(entry string, outputType ContentType) (doc string, err error)

type Renderer

type Renderer interface {

	// Render returns the rendered document,
	// entry is the entry filename, any file imported by entry file will find from mounted storage.ReadonlyFs,
	// use JSON as the default outputType if outputType is Unknown
	Render(entry string, outputType ContentType) (doc string, err error)
}

type RoFsImporter

type RoFsImporter struct {
	Fs storage.ReadonlyFs
}

func (RoFsImporter) Import

func (s RoFsImporter) Import(importedFrom, importedPath string) (contents Contents, foundAt string, err error)

Jump to

Keyboard shortcuts

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