object

package
v0.2.75 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectGoTemplateMiddleware

type ObjectGoTemplateMiddleware struct {
	// contains filtered or unexported fields
}

func NewObjectGoTemplateMiddleware

func NewObjectGoTemplateMiddleware(
	templateStrings map[types.FieldName]string,
) (*ObjectGoTemplateMiddleware, error)

NewObjectGoTemplateMiddleware creates a new template firmware used to process individual objects.

It will render the template for each object and return a single field.

TODO(manuel, 2023-02-02) Add support for passing in custom funcmaps See #110 https://github.com/go-go-golems/glazed/issues/110

func (*ObjectGoTemplateMiddleware) Process

func (rgtm *ObjectGoTemplateMiddleware) Process(object map[string]interface{}) ([]map[string]interface{}, error)

Process will render each template for the input object and return an object with the newly created fields.

TODO(manuel, 2022-11-21) This should allow merging the new results straight back

Jump to

Keyboard shortcuts

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