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

Function EntityAndAttributeToString

pkg/attribute/attribute.go:148–157  ·  view source on GitHub ↗

EntityAndAttributeToString converts an entity and attribute to a single string.

(entity *base.Entity, attr string)

Source from the content-addressed store, hash-verified

146
147// EntityAndAttributeToString converts an entity and attribute to a single string.
148func EntityAndAttributeToString(entity *base.Entity, attr string) string {
149 // Convert the entity to string format
150 strEntity := EntityToString(entity)
151
152 // Combine the entity string with the attribute using a dollar sign as the separator
153 result := fmt.Sprintf("%s$%s", strEntity, attr)
154
155 // Return the combined string
156 return result
157}
158
159// EntityToString function takes an Entity object and converts it into a string.
160func EntityToString(entity *base.Entity) string {

Callers 2

WriteMethod · 0.92
attribute_test.goFile · 0.85

Calls 1

EntityToStringFunction · 0.70

Tested by

no test coverage detected