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

Function NewSubjectCollection

pkg/database/collections.go:56–63  ·  view source on GitHub ↗

NewSubjectCollection - Create new subject collection.

(subjects ...*base.Subject)

Source from the content-addressed store, hash-verified

54
55// NewSubjectCollection - Create new subject collection.
56func NewSubjectCollection(subjects ...*base.Subject) *SubjectCollection {
57 if len(subjects) == 0 {
58 return &SubjectCollection{}
59 }
60 return &SubjectCollection{
61 subjects: subjects,
62 }
63}
64
65// CreateSubjectIterator - Create subject iterator according to collection.
66func (s *SubjectCollection) CreateSubjectIterator() *SubjectIterator {

Callers 6

expandDirectRelationMethod · 0.92
TestSubjectIteratorFunction · 0.85
TestSubjectCollectionFunction · 0.85
TestEmptyCollectionsFunction · 0.85
ToSubjectCollectionMethod · 0.85

Calls

no outgoing calls

Tested by 3

TestSubjectIteratorFunction · 0.68
TestSubjectCollectionFunction · 0.68
TestEmptyCollectionsFunction · 0.68