Documentation ¶
Overview ¶
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 StreamSets Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func Evaluate(value string, configName string, parameters map[string]interface{}, ...) (interface{}, error)
- func IsElString(configValue string) bool
- type Definitions
- type Evaluator
- type JobEL
- func (j *JobEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
- func (j *JobEL) GetId(args ...interface{}) (interface{}, error)
- func (j *JobEL) GetName(args ...interface{}) (interface{}, error)
- func (j *JobEL) GetStartTime(args ...interface{}) (interface{}, error)
- func (j *JobEL) GetUser(args ...interface{}) (interface{}, error)
- type MapListEL
- func (mapListEL *MapListEL) EmptyList(args ...interface{}) (interface{}, error)
- func (mapListEL *MapListEL) EmptyMap(args ...interface{}) (interface{}, error)
- func (mapListEL *MapListEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
- func (mapListEL *MapListEL) IsEmptyList(args ...interface{}) (interface{}, error)
- func (mapListEL *MapListEL) IsEmptyMap(args ...interface{}) (interface{}, error)
- func (mapListEL *MapListEL) Length(args ...interface{}) (interface{}, error)
- func (mapListEL *MapListEL) Size(args ...interface{}) (interface{}, error)
- type MathEL
- func (m *MathEL) Abs(args ...interface{}) (interface{}, error)
- func (m *MathEL) Ceil(args ...interface{}) (interface{}, error)
- func (m *MathEL) Floor(args ...interface{}) (interface{}, error)
- func (m *MathEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
- func (m *MathEL) Max(args ...interface{}) (interface{}, error)
- func (m *MathEL) Min(args ...interface{}) (interface{}, error)
- type PipelineEL
- func (p *PipelineEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
- func (p *PipelineEL) GetId(args ...interface{}) (interface{}, error)
- func (p *PipelineEL) GetStartTime(args ...interface{}) (interface{}, error)
- func (p *PipelineEL) GetTitle(args ...interface{}) (interface{}, error)
- func (p *PipelineEL) GetUser(args ...interface{}) (interface{}, error)
- type RecordEL
- func (r *RecordEL) Exists(args ...interface{}) (interface{}, error)
- func (r *RecordEL) GetAttribute(args ...interface{}) (interface{}, error)
- func (r *RecordEL) GetAttributeOrDefault(args ...interface{}) (interface{}, error)
- func (r *RecordEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
- func (r *RecordEL) GetType(args ...interface{}) (interface{}, error)
- func (r *RecordEL) GetValue(args ...interface{}) (interface{}, error)
- func (r *RecordEL) GetValueOrDefault(args ...interface{}) (interface{}, error)
- type SdcEL
- type StringEL
- func (stringEL *StringEL) Concat(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Contains(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) EndsWith(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) EscapeXML10(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) EscapeXML11(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
- func (stringEL *StringEL) IndexOf(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Length(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) RegExCapture(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Replace(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) ReplaceAll(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Split(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) StartsWith(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Substring(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) ToLower(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) ToUpper(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Trim(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Truncate(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) UnescapeJava(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) UnescapeXML(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) UrlEncode(args ...interface{}) (interface{}, error)
- func (stringEL *StringEL) Uuid(args ...interface{}) (interface{}, error)
Constants ¶
const ( PARAMETER_PREFIX = "${" PARAMETER_SUFFIX = "}" )
const ( JobElContextVar = "JOB_EL" JobIdContextVar = "JOB_ID" JobNameContextVar = "JOB_NAME" JobUserContextVar = "JOB_USER" JobStartTimeContextVar = "JOB_START_TIME" )
const ( WRONG_ARGS_MESSAGE = "Wrong number of arguments '%d' to function '%s', Expected : '%d'" CAST_TO_FLOAT_ERROR_MESSAGE = "Cannot convert argument idx: '%d' with value '%v' and type '%v' to float64 for operation '%s'" MATH_PREFIX = "math" ABS = "abs" CEIL = "ceil" FLOOR = "floor" MAX = "max" MIN = "min" )
const ( PipelineElContextVar = "PIPELINE_EL" PipelineIdContextVar = "PIPELINE_ID" PipelineTitleContextVar = "PIPELINE_TITLE" PipelineUserContextVar = "PIPELINE_USER" PipelineStartTimeContextVar = "PIPELINE_START_TIME" UndefinedValue = "UNDEFINED" )
const (
NAMESPACE_FN_SEPARATOR = ":"
)
const (
RecordContextVar = "record"
)
Variables ¶
This section is empty.
Functions ¶
func IsElString ¶
Types ¶
type Definitions ¶
type Definitions interface {
GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
}
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
func NewEvaluator ¶
func NewEvaluator( configName string, parameters map[string]interface{}, definitionsList []Definitions, ) (*Evaluator, error)
type JobEL ¶
func (*JobEL) GetELFunctionDefinitions ¶
func (j *JobEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
func (*JobEL) GetStartTime ¶
type MapListEL ¶
type MapListEL struct { }
func (*MapListEL) GetELFunctionDefinitions ¶
func (mapListEL *MapListEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
func (*MapListEL) IsEmptyList ¶
func (*MapListEL) IsEmptyMap ¶
type MathEL ¶
type MathEL struct { }
func (*MathEL) GetELFunctionDefinitions ¶
func (m *MathEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
type PipelineEL ¶
func (*PipelineEL) GetELFunctionDefinitions ¶
func (p *PipelineEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
func (*PipelineEL) GetId ¶
func (p *PipelineEL) GetId(args ...interface{}) (interface{}, error)
func (*PipelineEL) GetStartTime ¶
func (p *PipelineEL) GetStartTime(args ...interface{}) (interface{}, error)
func (*PipelineEL) GetTitle ¶
func (p *PipelineEL) GetTitle(args ...interface{}) (interface{}, error)
func (*PipelineEL) GetUser ¶
func (p *PipelineEL) GetUser(args ...interface{}) (interface{}, error)
type RecordEL ¶
func (*RecordEL) GetAttribute ¶
func (*RecordEL) GetAttributeOrDefault ¶
func (*RecordEL) GetELFunctionDefinitions ¶
func (r *RecordEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
func (*RecordEL) GetValueOrDefault ¶
type SdcEL ¶
type SdcEL struct { }
func (*SdcEL) GetELFunctionDefinitions ¶
func (j *SdcEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction
func (*SdcEL) GetHostName ¶
type StringEL ¶
type StringEL struct { }
func (*StringEL) EscapeXML10 ¶
func (*StringEL) EscapeXML11 ¶
func (*StringEL) GetELFunctionDefinitions ¶
func (stringEL *StringEL) GetELFunctionDefinitions() map[string]govaluate.ExpressionFunction