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

Method LinkedEntrances

internal/schema/linked_schema.go:89–96  ·  view source on GitHub ↗

RelationshipLinkedEntrances returns a slice of LinkedEntrance objects that represent entry points into the LinkedSchemaGraph for the specified target and source relations. The function recursively searches the graph for all entry points that can be reached from the target relation through the specif

(target, source *base.Entrance)

Source from the content-addressed store, hash-verified

87// - slice of LinkedEntrance objects that represent entry points into the LinkedSchemaGraph, or an error if the target or
88// source relation does not exist in the schema graph
89func (g *LinkedSchemaGraph) LinkedEntrances(target, source *base.Entrance) ([]*LinkedEntrance, error) {
90 entries, err := g.findEntrance(target, source, map[string]struct{}{})
91 if err != nil {
92 return nil, err
93 }
94
95 return entries, nil
96}
97
98// findEntrance is a recursive helper function that searches the LinkedSchemaGraph for all entry points that can be reached
99// from the specified target relation through the specified source relation. The function uses a depth-first search to traverse

Callers 3

EntityFilterMethod · 0.80
ltMethod · 0.80

Calls 1

findEntranceMethod · 0.95

Tested by

no test coverage detected