joinResponseMetas - a helper function that merges multiple PermissionCheckResponseMetadata structs into one.
(meta ...*base.PermissionCheckResponseMetadata)
| 59 | |
| 60 | // joinResponseMetas - a helper function that merges multiple PermissionCheckResponseMetadata structs into one. |
| 61 | func 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. |
| 70 | type SubjectPermissionResponse struct { |
no outgoing calls
no test coverage detected