operator

package
v0.0.0-...-27ec096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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

@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

@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

This section is empty.

Variables

This section is empty.

Functions

func AInB

func AInB(a []interface{}, b []interface{}) bool

jundge array A in Array B

func Compare

func Compare(operator string, left interface{}, right interface{}) (bool, error)

compare operator expression left operator right operator: [eq,neq,gt,lt,ge,le]

func Evaluate

func Evaluate(exprStr string, params map[string]interface{}) (bool, error)

using govalute to execute expression

func EvaluateBoolExpr

func EvaluateBoolExpr(expr string, variables map[string]bool) (bool, error)

evaluate 计算逻辑表达式的值

func InArray

func InArray(arr []interface{}, val interface{}) bool

jundge val in arr

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL