Documentation
¶
Index ¶
- type Config
- type Transformer
- func (t *Transformer) ApplyFiltering(data interface{}, allow, deny []string) interface{}
- func (t *Transformer) ApplyMapping(data interface{}, mapping map[string]string) interface{}
- func (t *Transformer) ApplyTarget(data interface{}, target string) interface{}
- func (t *Transformer) DeleteNestedField(data map[string]interface{}, field string)
- func (t *Transformer) GetNestedField(data map[string]interface{}, field string) interface{}
- func (t *Transformer) SetNestedField(data map[string]interface{}, field string, value interface{})
- func (t *Transformer) Transform(ctx context.Context, data interface{}, backend config.Backend) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transformer ¶
type Transformer struct {
// contains filtered or unexported fields
}
Transformer handles response transformations
func (*Transformer) ApplyFiltering ¶
func (t *Transformer) ApplyFiltering(data interface{}, allow, deny []string) interface{}
ApplyFiltering applies allow and deny filters to the data
func (*Transformer) ApplyMapping ¶
func (t *Transformer) ApplyMapping(data interface{}, mapping map[string]string) interface{}
ApplyMapping renames fields according to the mapping configuration
func (*Transformer) ApplyTarget ¶
func (t *Transformer) ApplyTarget(data interface{}, target string) interface{}
ApplyTarget extracts data from a nested target field
func (*Transformer) DeleteNestedField ¶
func (t *Transformer) DeleteNestedField(data map[string]interface{}, field string)
DeleteNestedField deletes a nested field using dot notation
func (*Transformer) GetNestedField ¶
func (t *Transformer) GetNestedField(data map[string]interface{}, field string) interface{}
GetNestedField gets a nested field using dot notation
func (*Transformer) SetNestedField ¶
func (t *Transformer) SetNestedField(data map[string]interface{}, field string, value interface{})
SetNestedField sets a nested field using dot notation
Click to show internal directories.
Click to hide internal directories.