object

package
v0.4.26 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateMiddleware added in v0.3.0

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

func NewTemplateMiddleware added in v0.3.0

func NewTemplateMiddleware(
	templateStrings map[types.FieldName]string,
) (*TemplateMiddleware, error)

NewTemplateMiddleware 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 (*TemplateMiddleware) Close added in v0.3.1

func (rgtm *TemplateMiddleware) Close(ctx context.Context) error

func (*TemplateMiddleware) Process added in v0.3.0

func (rgtm *TemplateMiddleware) Process(ctx context.Context, object types.Row) ([]types.Row, 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