Documentation
¶
Overview ¶
Copyright (c) 2023
@author 贺鹏Kavin 微信公众号:技术岁月 https://github.com/skyhackvip/risk_engine
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
Copyright (c) 2023 ¶
@author 贺鹏Kavin 微信公众号:技术岁月 https://github.com/skyhackvip/risk_engine
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
Index ¶
Constants ¶
View Source
const ( CONSOLE = "console" FILE = "file" DB = "db" PARALLEL = "parallel" )
keywords for execute
View Source
const ( GT = "GT" LT = "LT" GE = "GE" LE = "LE" EQ = "EQ" NEQ = "NEQ" BETWEEN = "BETWEEN" LIKE = "LIKE" IN = "IN" CONTAIN = "CONTAIN" BEFORE = "BEFORE" AFTER = "AFTER" KEYEXIST = "KEYEXIST" VALUEEXIST = "VALUEEXIST" AND = "and" OR = "or" )
all operators
View Source
const ( START = "start" END = "end" RULESET = "ruleset" ABTEST = "abtest" CONDITIONAL = "conditional" DECISIONTREE = "tree" DECISIONMATRIX = "matrix" SCORECARD = "scorecard" )
all support node
View Source
const ( MATRIXX = "matrixX" MATRIXY = "matrixY" )
matrix
View Source
const ( INT = "int" FLOAT = "float" STRING = "string" BOOL = "bool" DATE = "date" ARRAY = "array" MAP = "map" DEFAULT = "default" )
all type
View Source
const ( DATE_FORMAT = "2006-01-02" DATE_FORMAT_DETAIL = "2006-01-02 15:04:05" )
date type
Variables ¶
View Source
var ArraySupportOperator = map[string]struct{}{ EQ: struct{}{}, NEQ: struct{}{}, CONTAIN: struct{}{}, IN: struct{}{}, }
View Source
var BoolSupportOperator = map[string]struct{}{ EQ: struct{}{}, NEQ: struct{}{}, }
View Source
var BooleanOperators = map[string]string{ AND: OperatorMap[AND], OR: OperatorMap[OR], }
View Source
var CompareOperators = map[string]struct{}{ EQ: struct{}{}, NEQ: struct{}{}, GT: struct{}{}, LT: struct{}{}, GE: struct{}{}, LE: struct{}{}, }
View Source
var DateSupportOperator = map[string]struct{}{ BEFORE: struct{}{}, AFTER: struct{}{}, EQ: struct{}{}, NEQ: struct{}{}, BETWEEN: struct{}{}, }
View Source
var DefaultSupportOperator = map[string]struct{}{ EQ: struct{}{}, NEQ: struct{}{}, }
View Source
var EnumSupportOperator = map[string]struct{}{ EQ: struct{}{}, NEQ: struct{}{}, }
View Source
var MapSupportOperator = map[string]struct{}{ KEYEXIST: struct{}{}, VALUEEXIST: struct{}{}, }
View Source
var NumSupportOperator = map[string]struct{}{ GT: struct{}{}, LT: struct{}{}, GE: struct{}{}, LE: struct{}{}, EQ: struct{}{}, NEQ: struct{}{}, BETWEEN: struct{}{}, IN: struct{}{}, }
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { Server ServerConf `yaml:"Server"` App AppConf `yaml:"App"` }
func LoadConfig ¶
type ServerConf ¶
Click to show internal directories.
Click to hide internal directories.