transform

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Patch

func Patch(original interface{}, patchText string) (interface{}, error)

func Register

func Register(tType string, transFunc TransformFunc)

func Replace

func Replace(original interface{}, jsonString string) (interface{}, error)

Types

type TransformFunc

type TransformFunc func(original interface{}, transformText string) (target interface{}, err error)

func GetTransformFunc

func GetTransformFunc(transformerType string) (TransformFunc, bool)

type TransformFuncRegistry

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

func NewRegistry

func NewRegistry() *TransformFuncRegistry

func (*TransformFuncRegistry) Get

func (r *TransformFuncRegistry) Get(transformerType string) (transFunc TransformFunc, found bool)

func (*TransformFuncRegistry) Register

func (r *TransformFuncRegistry) Register(tType string, transFunc TransformFunc)

Jump to

Keyboard shortcuts

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