KBLookup is the minimum surface ResolveKBAccess needs from the knowledge-base service: a single method that turns an ID into a KnowledgeBase pointer (or repo.ErrKnowledgeBaseNotFound). Defining it as a tiny dedicated interface keeps the guard testable without forcing test stubs to satisfy the full K
| 85 | // it as a tiny dedicated interface keeps the guard testable without |
| 86 | // forcing test stubs to satisfy the full KnowledgeBaseService surface. |
| 87 | type KBLookup interface { |
| 88 | GetKnowledgeBaseByID(ctx context.Context, id string) (*types.KnowledgeBase, error) |
| 89 | } |
| 90 | |
| 91 | // KnowledgeLookup mirrors KBLookup but for resolving a knowledge id |
| 92 | // (document id) back to its parent KB. Used by the chunk routes whose |
no outgoing calls
no test coverage detected