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

Function Relation

pkg/schema/builder.go:137–142  ·  view source on GitHub ↗

Relation - Relation builder function that creates a new RelationDefinition instance with the given name and references. Parameters: - name: a string representing the name of the relation. - references: a variadic parameter representing the relation references associated with this relation. Returns

(name string, references ...*base.RelationReference)

Source from the content-addressed store, hash-verified

135// Returns:
136// - a pointer to a new RelationDefinition instance with the given name and references.
137func Relation(name string, references ...*base.RelationReference) *base.RelationDefinition {
138 return &base.RelationDefinition{
139 Name: name,
140 RelationReferences: references,
141 }
142}
143
144// Attribute is a function that generates an attribute definition
145// given a name and an attribute type.

Callers 1

builder_test.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected