Documentation ¶
Index ¶
- Variables
- func ContainsFilter2CypherWhereConditions(cypherNodeName string, filter ContainsFilter, startsWhereClause bool) string
- func FieldFilterCypher(nodeName string, fields []string) string
- func FieldFilterCypherWithAlias(nodeName string, fields []string) string
- func GetCategoryCounts[T Categorizable](entries []T) map[string]int32
- func Neo4jGetSliceRecord(rec *neo4j.Record, key string, defaultVal []interface{}) []interface{}
- func Neo4jGetStringRecord(rec *neo4j.Record, key, defaultVal string) string
- func OrderFilter2CypherCondition(cypherNodeName string, filter OrderFilter, allNodes []string) string
- func ParseFieldFilters2CypherWhereConditions(cypherNodeName string, filters mo.Option[FieldsFilters], ...) string
- type Categorizable
- type CompareFilter
- type ContainsFilter
- type Cypherable
- type CypherableAndCategorizable
- type FieldsFilters
- type FilterOperations
- type MatchFilter
- type OrderFilter
- type OrderSpec
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("resource not found") ScanResultMaskNode = map[utils.Neo4jScanType]string{ utils.NEO4JVulnerabilityScan: "VulnerabilityStub", utils.NEO4JSecretScan: "Secret", utils.NEO4JMalwareScan: "Malware", utils.NEO4JComplianceScan: "Compliance", utils.NEO4JCloudComplianceScan: "CloudCompliance", } ScanResultIDField = map[utils.Neo4jScanType]string{ utils.NEO4JVulnerabilityScan: "cve_id", utils.NEO4JSecretScan: "node_id", utils.NEO4JMalwareScan: "node_id", utils.NEO4JComplianceScan: "node_id", utils.NEO4JCloudComplianceScan: "node_id", } )
Functions ¶
func ContainsFilter2CypherWhereConditions ¶
func ContainsFilter2CypherWhereConditions(cypherNodeName string, filter ContainsFilter, startsWhereClause bool) string
func FieldFilterCypher ¶
func GetCategoryCounts ¶
func GetCategoryCounts[T Categorizable](entries []T) map[string]int32
func Neo4jGetSliceRecord ¶
func Neo4jGetStringRecord ¶
func OrderFilter2CypherCondition ¶
func OrderFilter2CypherCondition(cypherNodeName string, filter OrderFilter, allNodes []string) string
Types ¶
type Categorizable ¶
type CompareFilter ¶
type ContainsFilter ¶
type ContainsFilter struct {
FieldsValues map[string][]interface{} `json:"filter_in" required:"true"`
}
type Cypherable ¶
type CypherableAndCategorizable ¶
type CypherableAndCategorizable interface { Categorizable Cypherable }
type FieldsFilters ¶
type FieldsFilters struct { ContainsFilter ContainsFilter `json:"contains_filter" required:"true"` NotContainsFilter ContainsFilter `json:"not_contains_filter"` ContainsInArrayFilter ContainsFilter `json:"contains_in_array_filter"` MatchFilter MatchFilter `json:"match_filter" required:"true"` MatchInArrayFilter MatchFilter `json:"match_in_array_filter"` OrderFilter OrderFilter `json:"order_filter" required:"true"` CompareFilters []CompareFilter `json:"compare_filter" required:"true"` }
type FilterOperations ¶
type FilterOperations string
const (
CONTAINS FilterOperations = "contains"
)
type MatchFilter ¶
type MatchFilter struct {
FieldsValues map[string][]interface{} `json:"filter_in" required:"true"`
}
type OrderFilter ¶
type OrderFilter struct {
OrderFields []OrderSpec `json:"order_fields" required:"true"`
}
Click to show internal directories.
Click to hide internal directories.