MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / mockStore

Struct mockStore

internal/ws/handler_test.go:21–30  ·  view source on GitHub ↗

── Mock store ──────────────────────────────────────────────────

Source from the content-addressed store, hash-verified

19// ── Mock store ──────────────────────────────────────────────────
20
21type 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
32func (m *mockStore) GetPrincipalByAPIKey(_ context.Context, apiKey string) (*identity.Principal, error) {
33 if m.userErr != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected