Documentation ¶
Index ¶
- Constants
- Variables
- func HandleEquals(pipeline *[]bson.M, fieldName string, fieldValue interface{})
- func HandleGreaterThan(pipeline *[]bson.M, fieldName string, fieldValue interface{})
- func HandleGreaterThanEquals(pipeline *[]bson.M, fieldName string, fieldValue interface{})
- func HandleIn(pipeline *[]bson.M, fieldName string, fieldValue interface{})
- func HandleLessThan(pipeline *[]bson.M, fieldName string, fieldValue interface{})
- func HandleLessThanEquals(pipeline *[]bson.M, fieldName string, fieldValue interface{})
- func HandleNotEquals(pipeline *[]bson.M, fieldName string, fieldValue interface{})
- func HandleOperations(operation string, pipeline *[]bson.M, fieldName string, fieldValue interface{}) bool
- type OPAClient
- type Queries
Constants ¶
View Source
const ( LtOp = "lt" LteOp = "lte" GtOp = "gt" GteOp = "gte" EqOp = "eq" EqualOp = "equal" NeqOp = "neq" // https://github.com/open-policy-agent/opa/blob/main/ast/builtins.go#L345 InOp = "internal.member_2" )
Variables ¶
View Source
var ErrEmptyQuery = errors.New("empty query")
Functions ¶
func HandleEquals ¶
Parse the == into equivalent mongo query.
func HandleGreaterThan ¶
Parse the > into equivalent mongo query.
func HandleGreaterThanEquals ¶
Parse the >= into equivalent mongo query.
func HandleLessThan ¶
Parse the < into equivalent mongo query.
func HandleLessThanEquals ¶
Parse the <= into equivalent mongo query.
func HandleNotEquals ¶
Parse the != into equivalent mongo query.
Types ¶
Click to show internal directories.
Click to hide internal directories.