Documentation
¶
Index ¶
- func NewTemplate(tmpl string) (*template.Template, error)
- func Patch(original interface{}, patchText string) (interface{}, error)
- func Register(tType string, transFunc TransformFunc)
- func Replace(original interface{}, jsonString string) (interface{}, error)
- type TransformFunc
- type TransformFuncRegistry
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(tType string, transFunc TransformFunc)
Types ¶
type TransformFunc ¶
func GetTransformFunc ¶
func GetTransformFunc(transformerType string) (TransformFunc, bool)
type TransformFuncRegistry ¶
type TransformFuncRegistry struct {
// contains filtered or unexported fields
}
func (*TransformFuncRegistry) Get ¶
func (r *TransformFuncRegistry) Get(transformerType string) (transFunc TransformFunc, found bool)
func (*TransformFuncRegistry) Register ¶
func (r *TransformFuncRegistry) Register(tType string, transFunc TransformFunc)
type Transformer ¶
type Transformer struct {
// contains filtered or unexported fields
}
func NewTransformer ¶
func NewTransformer(tType string, tmpl string, cluster string) (*Transformer, error)
func (*Transformer) Transform ¶
func (t *Transformer) Transform(original interface{}) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.