Documentation ¶
Index ¶
- func ApplyFieldForceUpdate(fieldUpdate []string, enricherSource map[string]interface{}, ...)
- func ApplyFieldKeepEarliest(fieldKeepEarliest []string, enricherSource map[string]interface{}, ...)
- func ApplyFieldKeepLatest(fieldKeepLatest []string, enricherSource map[string]interface{}, ...)
- func ApplyFieldMath(config []FieldMath, newDoc *models.Document, existingDoc *models.Document, ...)
- func ApplyFieldMerge(fieldMerge []string, enricherSource map[string]interface{}, ...)
- func ApplyFieldReplace(fieldReplace []string, enricherSource map[string]interface{}, ...)
- func ApplyFieldReplaceIfMissing(fieldReplace []string, enricherSource map[string]interface{}, ...)
- type Config
- type FieldMath
- type Group
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFieldForceUpdate ¶ added in v4.1.2
func ApplyFieldForceUpdate(fieldUpdate []string, enricherSource map[string]interface{}, outputSource map[string]interface{})
ApplyFieldForceUpdate applies FieldForceUpdate merging configuration on input documents
func ApplyFieldKeepEarliest ¶
func ApplyFieldKeepEarliest(fieldKeepEarliest []string, enricherSource map[string]interface{}, outputSource map[string]interface{})
ApplyFieldKeepEarliest applies all FieldKeepEarliest merging configuration on input documents
func ApplyFieldKeepLatest ¶
func ApplyFieldKeepLatest(fieldKeepLatest []string, enricherSource map[string]interface{}, outputSource map[string]interface{})
ApplyFieldKeepLatest applies all FieldKeepLatest merging configuration on input documents
func ApplyFieldMath ¶
func ApplyFieldMath(config []FieldMath, newDoc *models.Document, existingDoc *models.Document, outputSource map[string]interface{})
ApplyFieldMath applies all FieldMath merging configuration on input documents
func ApplyFieldMerge ¶
func ApplyFieldMerge(fieldMerge []string, enricherSource map[string]interface{}, outputSource map[string]interface{})
ApplyFieldMerge applies all FieldReplace merging configuration on input documents
func ApplyFieldReplace ¶
func ApplyFieldReplace(fieldReplace []string, enricherSource map[string]interface{}, outputSource map[string]interface{})
ApplyFieldReplace applies all FieldReplace merging configuration on input documents
func ApplyFieldReplaceIfMissing ¶
func ApplyFieldReplaceIfMissing(fieldReplace []string, enricherSource map[string]interface{}, outputSource map[string]interface{})
ApplyFieldReplaceIfMissing applies all FieldReplace merging configuration on input documents
Types ¶
type Config ¶
type Config struct { Mode Mode `json:"mode"` ExistingAsMaster bool `json:"existingAsMaster"` Type string `json:"type,omitempty"` LinkKey string `json:"linkKey,omitempty"` Groups []Group `json:"groups,omitempty"` }
Config wraps all rules for document merging
type FieldMath ¶
type FieldMath struct { Expression string `json:"expression"` OutputField string `json:"outputField"` }
FieldMath specify a merge rule using a math expression
type Group ¶
type Group struct { Condition string `json:"condition,omitempty"` FieldReplace []string `json:"fieldReplace,omitempty"` FieldReplaceIfMissing []string `json:"fieldReplaceIfMissing,omitempty"` FieldMerge []string `json:"fieldMerge,omitempty"` FieldMath []FieldMath `json:"fieldMath,omitempty"` FieldKeepLatest []string `json:"fieldKeepLatest,omitempty"` FieldKeepEarliest []string `json:"fieldKeepEarliest,omitempty"` FieldForceUpdate []string `json:"fieldForceUpdate,omitempty"` }
Group allows to group un set of merge fields and to define an optional condition to applay the merge fields
type Mode ¶
type Mode int
Mode ...
func (Mode) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*Mode) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to the enum value