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

Function ReferenceToString

pkg/tuple/tuple.go:237–242  ·  view source on GitHub ↗

ReferenceToString -

(ref *base.RelationReference)

Source from the content-addressed store, hash-verified

235
236// ReferenceToString -
237func ReferenceToString(ref *base.RelationReference) string {
238 if ref.GetRelation() != "" {
239 return fmt.Sprintf(REFERENCE, ref.GetType(), ref.GetRelation())
240 }
241 return ref.GetType()
242}
243
244// RelationReference parses a relation reference string and returns a RelationReference object.
245func RelationReference(ref string) *base.RelationReference {

Callers 2

LookupSubjectMethod · 0.92
tuple_test.goFile · 0.85

Calls 2

GetTypeMethod · 0.65
GetRelationMethod · 0.45

Tested by

no test coverage detected