Documentation ¶
Index ¶
- func EvaluateBooleanArray(array []bool, expected bool) ([]bool, error)
- func EvaluateIntArray(operator string, array []int, expected int) ([]bool, error)
- func EvaluateNumericArray(operator string, array []float64, expected float64) ([]bool, error)
- func EvaluateStringArray(array []string, operator, expected string) ([]bool, error)
- func FormatSearchResultsV5(results []mb_search.SearchResult) string
- func GetBooleanEvalComparisonResult(actual, expected bool) bool
- func GetIntEvalComparisonResult(operator string, actual, expected int) bool
- func GetNumericEvalComparisonResult(operator string, actual, expected float64) bool
- func GetStringEvalComparisonResult(operator string, actual, expected string) bool
- func Pass(results []bool) bool
- func TransformJSONToEvalScoredMetrics(jsonSchemaDef *JsonSchemaDefinition) error
- type EvalMetaDataResult
- type EvalMetric
- type EvalMetricComparisonValues
- type EvalMetricResult
- type FieldValue
- type JsonSchemaDefinition
- type JsonSchemaField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvaluateIntArray ¶
func EvaluateNumericArray ¶
func EvaluateStringArray ¶
func FormatSearchResultsV5 ¶
func FormatSearchResultsV5(results []mb_search.SearchResult) string
func TransformJSONToEvalScoredMetrics ¶
func TransformJSONToEvalScoredMetrics(jsonSchemaDef *JsonSchemaDefinition) error
Types ¶
type EvalMetaDataResult ¶
type EvalMetaDataResult struct { EvalOpCtxStr string `json:"evalOpCtxStr"` Operator string `json:"operator"` *EvalMetricComparisonValues *FieldValue }
type EvalMetric ¶
type EvalMetric struct { EvalMetricStrID *string `json:"evalMetricStrID,omitempty"` EvalMetricID *int `json:"evalMetricID"` EvalField *JsonSchemaField `json:"evalField,omitempty"` EvalName *string `json:"evalName,omitempty"` EvalMetricResult *EvalMetricResult `json:"evalMetricResult,omitempty"` EvalOperator string `json:"evalOperator"` EvalState string `json:"evalState"` EvalExpectedResultState string `json:"evalExpectedResultState"` EvalMetricComparisonValues *EvalMetricComparisonValues `json:"evalMetricComparisonValues,omitempty"` }
type EvalMetricComparisonValues ¶
type EvalMetricComparisonValues struct { EvalComparisonBoolean *bool `json:"evalComparisonBoolean,omitempty"` EvalComparisonNumber *float64 `json:"evalComparisonNumber,omitempty"` EvalComparisonString *string `json:"evalComparisonString,omitempty"` EvalComparisonInteger *int `json:"evalComparisonInteger,omitempty"` }
type EvalMetricResult ¶
type EvalMetricResult struct { EvalMetricResultStrID *string `json:"evalMetricsResultStrID"` EvalMetricResultID *int `json:"evalMetricsResultID"` EvalResultOutcomeBool *bool `json:"evalResultOutcomeBool,omitempty"` // true if eval passed, false if eval failed EvalResultOutcomeStateStr *string `json:"evalResultOutcomeStateStr,omitempty"` // true if eval passed, false if eval failed RunningCycleNumber *int `json:"runningCycleNumber,omitempty"` EvalIterationCount *int `json:"evalIterationCount,omitempty"` SearchWindowUnixStart *int `json:"searchWindowUnixStart,omitempty"` SearchWindowUnixEnd *int `json:"searchWindowUnixEnd,omitempty"` EvalMetadata json.RawMessage `json:"evalMetadata,omitempty"` }
type FieldValue ¶
type FieldValue struct { IntegerValue *int `db:"-" json:"intValue,omitempty"` StringValue *string `db:"-" json:"stringValue,omitempty"` NumberValue *float64 `db:"-" json:"numberValue,omitempty"` BooleanValue *bool `db:"-" json:"booleanValue,omitempty"` IntegerValueSlice []int `db:"-" json:"intValueSlice,omitempty"` StringValueSlice []string `db:"-" json:"stringValueSlice,omitempty"` NumberValueSlice []float64 `db:"-" json:"numberValueSlice,omitempty"` BooleanValueSlice []bool `db:"-" json:"booleanValueSlice,omitempty"` IsValidated bool `db:"-" json:"isValidated,omitempty"` }
type JsonSchemaDefinition ¶
type JsonSchemaDefinition struct { SchemaID int `db:"schema_id" json:"schemaID"` SchemaStrID string `db:"-" json:"schemaStrID,omitempty"` SchemaName string `db:"schema_name" json:"schemaName"` SchemaGroup string `db:"schema_group" json:"schemaGroup"` SchemaDescription string `db:"schema_description" json:"schemaDescription"` IsObjArray bool `db:"is_obj_array" json:"isObjArray"` Fields []JsonSchemaField `db:"-" json:"fields"` FieldsMap map[string]*JsonSchemaField ScoredEvalMetrics []*EvalMetric `db:"-" json:"totalEvalMetrics,omitempty"` }
type JsonSchemaField ¶
type JsonSchemaField struct { FieldID int `db:"field_id" json:"fieldID"` FieldStrID string `db:"-" json:"fieldStrID,omitempty"` FieldName string `db:"field_name" json:"fieldName"` FieldDescription string `db:"field_description" json:"fieldDescription"` DataType string `db:"data_type" json:"dataType"` FieldValue EvalMetrics []*EvalMetric `db:"-" json:"evalMetrics,omitempty"` }
Click to show internal directories.
Click to hide internal directories.