transform

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pipe

func Pipe[T object.DataTypes](c Context[T], o object.Object[T], transformers ...Transformer[T]) (object.Object[T], error)

Types

type Context

type Context[T object.DataTypes] interface {
	context.Context
	Fork(object.Object[T]) Context[T] // forks keep same store
	Path() []any                      // ref added at each fork
	Store() Store[T]
}

func NewContext

func NewContext[T object.DataTypes](c context.Context, root ...any) Context[T]

type Item

type Item[T any] interface {
	Exist() bool
	Get() T
	Set(T) (T, error)
	Del() error
}

type Store

type Store[T object.DataTypes] interface {
	String(string) Item[string]
	Bytes(string) Item[[]byte]
	Object(string) Item[object.Object[T]]
	Validators() Item[[]engine.NextValidation]
}

type Transformer

type Transformer[T object.DataTypes] interface {
	Process(Context[T], object.Object[T]) (object.Object[T], error)
}

Jump to

Keyboard shortcuts

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