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

Function joinResponseMetas

internal/engines/utils.go:61–67  ·  view source on GitHub ↗

joinResponseMetas - a helper function that merges multiple PermissionCheckResponseMetadata structs into one.

(meta ...*base.PermissionCheckResponseMetadata)

Source from the content-addressed store, hash-verified

59
60// joinResponseMetas - a helper function that merges multiple PermissionCheckResponseMetadata structs into one.
61func joinResponseMetas(meta ...*base.PermissionCheckResponseMetadata) *base.PermissionCheckResponseMetadata {
62 response := &base.PermissionCheckResponseMetadata{}
63 for _, m := range meta {
64 response.CheckCount += m.CheckCount
65 }
66 return response
67}
68
69// SubjectPermissionResponse - a struct that holds a SubjectPermissionResponse and an error for a single subject permission check result.
70type SubjectPermissionResponse struct {

Callers 3

checkUnionFunction · 0.85
checkIntersectionFunction · 0.85
checkExclusionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected