MCPcopy Create free account
hub / github.com/Permify/permify / extractAttributes

Function extractAttributes

pkg/development/coverage/coverage.go:141–150  ·  view source on GitHub ↗

extractAttributes extracts all attribute references from an entity

(entity *base.EntityDefinition)

Source from the content-addressed store, hash-verified

139
140// extractAttributes extracts all attribute references from an entity
141func extractAttributes(entity *base.EntityDefinition) []string {
142 attributes := []string{}
143
144 for _, attr := range entity.GetAttributes() {
145 formatted := formatAttribute(entity.GetName(), attr.GetName())
146 attributes = append(attributes, formatted)
147 }
148
149 return attributes
150}
151
152// extractAssertions extracts all permission/assertion references from an entity
153func extractAssertions(entity *base.EntityDefinition) []string {

Callers 1

extractEntityReferencesFunction · 0.85

Calls 3

formatAttributeFunction · 0.85
GetNameMethod · 0.65
GetAttributesMethod · 0.45

Tested by

no test coverage detected