DirectInvoker is a struct that implements the Invoker interface. It holds references to various engines needed for permission-related operations.
| 54 | // DirectInvoker is a struct that implements the Invoker interface. |
| 55 | // It holds references to various engines needed for permission-related operations. |
| 56 | type DirectInvoker struct { |
| 57 | // schemaReader is responsible for reading schema information |
| 58 | schemaReader storage.SchemaReader |
| 59 | // relationshipReader is responsible for reading relationship information |
| 60 | dataReader storage.DataReader |
| 61 | // Check engine for permission checks |
| 62 | cc Check |
| 63 | // Expand engine for expanding permissions |
| 64 | ec Expand |
| 65 | // LookupEntity engine for looking up entities with permissions |
| 66 | lo Lookup |
| 67 | // LookupSubject |
| 68 | sp SubjectPermission |
| 69 | |
| 70 | checkHistogram metric.Int64Histogram |
| 71 | lookupEntityHistogram metric.Int64Histogram |
| 72 | lookupSubjectHistogram metric.Int64Histogram |
| 73 | subjectPermissionHistogram metric.Int64Histogram |
| 74 | } |
| 75 | |
| 76 | // NewDirectInvoker is a constructor for DirectInvoker. |
| 77 | // It takes pointers to CheckEngine, ExpandEngine, LookupSchemaEngine, and LookupEntityEngine as arguments |
nothing calls this directly
no outgoing calls
no test coverage detected