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

Method UpdateAttributeReferences

pkg/dsl/ast/references.go:147–154  ·  view source on GitHub ↗

UpdateAttributeReferences updates the attribute references for a given key. It associates a specific attribute type with the key. If the key is empty, it returns an error.

(key string, typ AttributeTypeStatement)

Source from the content-addressed store, hash-verified

145// It associates a specific attribute type with the key.
146// If the key is empty, it returns an error.
147func (refs *References) UpdateAttributeReferences(key string, typ AttributeTypeStatement) error {
148 if len(key) == 0 {
149 return fmt.Errorf("key cannot be empty")
150 }
151 refs.attributeReferences[key] = typ // Set the attribute type for the key.
152 refs.references[key] = ATTRIBUTE // Mark this key as an attribute reference.
153 return nil
154}
155
156// RemoveRelationReferences removes the relationship references associated with a given key.
157// If the key is empty, it returns an error.

Callers 1

UpdateStatementMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected