MCPcopy Create free account
hub / github.com/elimity-com/scim / MultiValuedFilterAttributes

Function MultiValuedFilterAttributes

internal/filter/path.go:11–18  ·  view source on GitHub ↗

MultiValuedFilterAttributes returns the attributes of the given attribute on which can be filtered. In the case of a complex attribute, the sub-attributes get returned. Otherwise if the given attribute is not complex, a "value" sub- attribute gets created to filter against.

(attr schema.CoreAttribute)

Source from the content-addressed store, hash-verified

9// complex attribute, the sub-attributes get returned. Otherwise if the given attribute is not complex, a "value" sub-
10// attribute gets created to filter against.
11func MultiValuedFilterAttributes(attr schema.CoreAttribute) schema.Attributes {
12 switch attr.AttributeType() {
13 case "complex":
14 return attr.SubAttributes()
15 default:
16 return schema.Attributes{schema.SimpleCoreAttribute(getSimpleParams(attr))}
17 }
18}
19
20// getSimpleParams returns simple params based on the type of the attribute. The simple params only have their name
21// assigned to "value", everything else is left out (i.e. default values). Can not be used for complex attributes.

Callers 1

validatePathMethod · 0.85

Calls 4

SimpleCoreAttributeFunction · 0.92
getSimpleParamsFunction · 0.85
AttributeTypeMethod · 0.80
SubAttributesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…