Documentation ¶
Index ¶
- type Op
- type OpAdd
- type OpApplier
- type OpFlatten
- func (op *OpFlatten) Apply(e *entry.Entry) error
- func (op OpFlatten) MarshalJSON() ([]byte, error)
- func (op OpFlatten) MarshalYAML() (interface{}, error)
- func (op *OpFlatten) Type() string
- func (op *OpFlatten) UnmarshalJSON(raw []byte) error
- func (op *OpFlatten) UnmarshalYAML(unmarshal func(interface{}) error) error
- type OpMove
- type OpRemove
- func (op *OpRemove) Apply(e *entry.Entry) error
- func (op OpRemove) MarshalJSON() ([]byte, error)
- func (op OpRemove) MarshalYAML() (interface{}, error)
- func (op *OpRemove) Type() string
- func (op *OpRemove) UnmarshalJSON(raw []byte) error
- func (op *OpRemove) UnmarshalYAML(unmarshal func(interface{}) error) error
- type OpRetain
- func (op *OpRetain) Apply(e *entry.Entry) error
- func (op OpRetain) MarshalJSON() ([]byte, error)
- func (op OpRetain) MarshalYAML() (interface{}, error)
- func (op *OpRetain) Type() string
- func (op *OpRetain) UnmarshalJSON(raw []byte) error
- func (op *OpRetain) UnmarshalYAML(unmarshal func(interface{}) error) error
- type RestructureOperator
- type RestructureOperatorConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Op ¶
type Op struct {
OpApplier
}
Op is a designated operation on an entry
func (Op) MarshalJSON ¶
MarshalJSON will marshal an operation as JSON
func (Op) MarshalYAML ¶
MarshalYAML will marshal an operation as YAML
func (*Op) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into an operation
func (*Op) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into an operation
type OpAdd ¶
type OpAdd struct { Field entry.Field `json:"field" yaml:"field"` Value interface{} `json:"value,omitempty" yaml:"value,omitempty"` ValueExpr *string `json:"value_expr,omitempty" yaml:"value_expr,omitempty"` // contains filtered or unexported fields }
OpAdd is an operation for adding fields to an entry
func (*OpAdd) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into the add operation
func (*OpAdd) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into the add operation
type OpFlatten ¶
type OpFlatten struct {
Field entry.RecordField
}
OpFlatten is an operation for flattening fields
func (OpFlatten) MarshalJSON ¶
MarshalJSON will marshal a flatten operation into JSON
func (OpFlatten) MarshalYAML ¶
MarshalYAML will marshal a flatten operation into YAML
func (*OpFlatten) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into a flatten operation
func (*OpFlatten) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into a flatten operation
type OpMove ¶
type OpMove struct { From entry.Field `json:"from" yaml:"from,flow"` To entry.Field `json:"to" yaml:"to,flow"` }
OpMove is an operation for moving entry fields
type OpRemove ¶
OpRemove is operation for removing fields from an entry
func (OpRemove) MarshalJSON ¶
MarshalJSON will marshal a remove operation into JSON
func (OpRemove) MarshalYAML ¶
MarshalYAML will marshal a remove operation into YAML
func (*OpRemove) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into a remove operation
func (*OpRemove) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into a remove operation
type OpRetain ¶
OpRetain is an operation for retaining fields
func (OpRetain) MarshalJSON ¶
MarshalJSON will marshal a retain operation into JSON
func (OpRetain) MarshalYAML ¶
MarshalYAML will marshal a retain operation into YAML
func (*OpRetain) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into a retain operation
func (*OpRetain) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into a retain operation
type RestructureOperator ¶
type RestructureOperator struct { helper.TransformerOperator // contains filtered or unexported fields }
RestructureOperator is an operator that can restructure incoming entries using operations
type RestructureOperatorConfig ¶
type RestructureOperatorConfig struct { helper.TransformerConfig `yaml:",inline"` Ops []Op `json:"ops" yaml:"ops"` }
RestructureOperatorConfig is the configuration of a restructure operator
func NewRestructureOperatorConfig ¶
func NewRestructureOperatorConfig(operatorID string) *RestructureOperatorConfig
NewRestructureOperatorConfig creates a new restructure operator config with default values
func (RestructureOperatorConfig) Build ¶
func (c RestructureOperatorConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a restructure operator from the supplied configuration