templater

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnDataStream

type OnDataStream func(val map[string]interface{}) error

OnDataStream is a function that gets called when new data should be streamed to the client. The data has the generic type map[string]interface{}.

type TemplateReader

type TemplateReader interface {
	ValuesFromTarget() (map[string]interface{}, error)
	RegisterQuery(query *TemplateReaderQuery) error
	Read() (map[string]interface{}, error)
	ReadStream(
		on OnDataStream,
		stopCh <-chan struct{},
	) error
}

TemplateReader retrieves data from a target data source, registers a set of queries against that data, and returns it via the Read() operation

type TemplateReaderQuery

type TemplateReaderQuery struct {
	Key         string
	QueryString string

	Template *gojq.Query
}

type TemplateWriter

type TemplateWriter interface {
	Transform() error
	Create(vals map[string]interface{}) (map[string]interface{}, error)
	Update(vals map[string]interface{}) (map[string]interface{}, error)
}

TemplateWriter transforms input data and writes to a deployment target

Directories

Path Synopsis
helm

Jump to

Keyboard shortcuts

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