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

Method ToSubjectCollection

pkg/database/collections.go:40–46  ·  view source on GitHub ↗

ToSubjectCollection - Converts new subject collection from given tuple collection

()

Source from the content-addressed store, hash-verified

38
39// ToSubjectCollection - Converts new subject collection from given tuple collection
40func (t *TupleCollection) ToSubjectCollection() *SubjectCollection {
41 subjects := make([]*base.Subject, len(t.tuples))
42 for index, tuple := range t.tuples {
43 subjects[index] = tuple.GetSubject()
44 }
45 return NewSubjectCollection(subjects...)
46}
47
48// SUBJECT
49

Callers 1

TestToSubjectCollectionFunction · 0.95

Calls 2

NewSubjectCollectionFunction · 0.85
GetSubjectMethod · 0.45

Tested by 1

TestToSubjectCollectionFunction · 0.76