── Mock store ──────────────────────────────────────────────────
| 19 | // ── Mock store ────────────────────────────────────────────────── |
| 20 | |
| 21 | type mockStore struct { |
| 22 | user *identity.User |
| 23 | userErr error |
| 24 | scope string // "" → unscoped (legacy/account-equivalent); ScopeAgent pins to agentID |
| 25 | agentID string // bound agent id when scope == ScopeAgent |
| 26 | agent *identity.AgentIdentity |
| 27 | agentErr error |
| 28 | messages []identity.Message |
| 29 | msgErr error |
| 30 | } |
| 31 | |
| 32 | func (m *mockStore) GetPrincipalByAPIKey(_ context.Context, apiKey string) (*identity.Principal, error) { |
| 33 | if m.userErr != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected