Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(tType string, transFunc TransformFunc)
Register function registers a transformation function with the given type.
Types ¶
type TransformFunc ¶
TransformFunc is a type definition for transformation functions that take an original data structure and a transformation string, and return a transformed data structure and an error.
func GetTransformFunc ¶
func GetTransformFunc(transformerType string) (TransformFunc, bool)
GetTransformFunc retrieves a registered transformation function by type.
type TransformFuncRegistry ¶
type TransformFuncRegistry struct {
// contains filtered or unexported fields
}
TransformFuncRegistry is a struct that holds a map of transformation functions.
func NewRegistry ¶
func NewRegistry() *TransformFuncRegistry
NewRegistry creates and returns a new instance of TransformFuncRegistry.
func (*TransformFuncRegistry) Get ¶
func (r *TransformFuncRegistry) Get(transformerType string) (transFunc TransformFunc, found bool)
Get method of TransformFuncRegistry retrieves a registered transformation function by type.
func (*TransformFuncRegistry) Register ¶
func (r *TransformFuncRegistry) Register(tType string, transFunc TransformFunc)
Register method of TransformFuncRegistry registers a transformation function with the given type.