MCPcopy Index your code

hub / github.com/kenn-io/msgvault / functions

Functions5,225 in github.com/kenn-io/msgvault

↓ 4,015 callersMethodNoError
(error, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/require/require.go:12
↓ 2,488 callersMethodEqual
(any, any, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/assert/assert.go:12
↓ 1,916 callersMethodErrorf
(format string, args ...any)
internal/testutil/tbmock/mock_tb.go:33
↓ 586 callersMethodScan
(dest ...any)
internal/store/sync.go:53
↓ 509 callersMethodTrue
(bool, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/assert/assert.go:13
↓ 506 callersMethodRun
Run executes one embed cycle. Safe to call from cron or as a post-sync hook. Returns immediately when vector search has no pending work (no active and
internal/scheduler/embed_job.go:77
↓ 439 callersMethodHelper
()
internal/testutil/tbmock/mock_tb.go:32
↓ 408 callersMethodExec
(query string, args ...any)
internal/store/messages.go:22
↓ 356 callersMethodQueryRow
(query string, args ...any)
internal/store/messages.go:23
↓ 348 callersMethodClose
Close releases any resources held by the client.
internal/gmail/api.go:52
↓ 321 callersMethodDB
DB returns the underlying *sql.DB for consumers that need to pass the raw handle elsewhere (e.g. the DuckDB engine's sqlite_scan wrapper). The wrapper
internal/store/store.go:373
↓ 298 callersMethodError
()
internal/gmail/client.go:210
↓ 275 callersMethodClose
()
cmd/msgvault/cmd/store_resolver.go:86
↓ 262 callersMethodExecContext
(ctx context.Context, query string, args ...any)
internal/vector/pgvector/migrate.go:21
↓ 231 callersMethodBuild
()
internal/tui/setup_test.go:230
↓ 223 callersMethodNotNil
(any, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/require/require.go:13
↓ 223 callersMethodString
()
internal/query/models.go:110
↓ 214 callersFunctionNewBuilder
()
internal/tui/setup_test.go:107
↓ 189 callersFunctionNew
New creates a Fixture with a fresh test database, one source ("test@example.com") and one default conversation.
internal/testutil/storetest/storetest.go:31
↓ 181 callersMethodQueryRowContext
QueryRowContext logs and delegates.
internal/store/db_logger.go:132
↓ 175 callersMethodGetOrCreateSource
GetOrCreateSource gets or creates a source by type and identifier. Concurrent first-inserts converge via INSERT ... ON CONFLICT DO UPDATE RETURNING: t
internal/store/sync.go:578
↓ 162 callersMethodCleanup
(fn func())
internal/testutil/tbmock/mock_tb.go:34
↓ 142 callersMethodQuery
(query string, args ...any)
internal/store/store.go:525
↓ 136 callersFunctionOpen
Open opens or creates the database at the given path. If dbPath is a postgres:// or postgresql:// URL, opens a PostgreSQL connection. Otherwise, opens
internal/store/store.go:97
↓ 132 callersMethodDate
Date sets the Date header.
internal/testutil/email/builder.go:72
↓ 122 callersMethodInitSchema
InitSchema initializes the database schema. This creates all tables if they don't exist.
internal/store/store.go:662
↓ 116 callersMethodClose
()
internal/vector/backend.go:191
↓ 113 callersMethodNow
()
internal/gmail/ratelimit.go:11
↓ 108 callersMethodAdd
Add records one batch sample. Samples with non-positive elapsed are silently skipped: they would either divide by zero (elapsed == 0) or contribute ne
cmd/msgvault/cmd/embed_progress.go:42
↓ 103 callersMethodHeader
Header sets an arbitrary header. If the key already exists, its value is overwritten (last-write-wins); otherwise the header is appended.
internal/testutil/email/builder.go:82
↓ 101 callersMethodWithLevel
(level viewLevel)
internal/tui/setup_test.go:153
↓ 98 callersMethodNext
Next returns the next message from the MBOX stream. Returns io.EOF when there are no more messages.
internal/mbox/reader.go:112
↓ 96 callersMethodWithPageSize
(size int)
internal/tui/setup_test.go:164
↓ 96 callersMethodWithSize
(width, height int)
internal/tui/setup_test.go:147
↓ 96 callersFunctionunitVec
unitVec returns a unit vector of the given dimension with 1.0 at position axis and 0.0 elsewhere.
internal/vector/sqlitevec/backend_testhelpers_test.go:66
↓ 95 callersFunctionunitVec
unitVec returns a unit vector of the given dimension with 1.0 at position axis and 0.0 elsewhere — the building block for similarity assertions where
internal/vector/pgvector/backend_testhelpers_test.go:142
↓ 93 callersFunctionasModel
asModel asserts that a tea.Model is the concrete Model type, failing the test otherwise. Centralizes the checked type assertion used across the TUI te
internal/tui/setup_test.go:354
↓ 92 callersMethodCreateGeneration
CreateGeneration starts (or resumes) a building generation. fingerprint is stored verbatim on the row; pass Config.GenerationFingerprint() so a later
internal/vector/backend.go:138
↓ 92 callersMethodRebind
Rebind converts ? placeholders to the driver's native form. No-op for SQLite; converts to $1, $2, ... for PostgreSQL.
internal/query/dialect.go:27
↓ 87 callersMethodBytes
Bytes builds the complete MIME message.
internal/testutil/email/builder.go:120
↓ 86 callersFunctionNewTestStore
NewTestStore creates a temporary database for testing. The database is automatically cleaned up when the test completes. Backend selection via MSGVAU
internal/testutil/store_helpers.go:26
↓ 85 callersMethodRouter
Router returns the chi router for testing.
internal/api/server.go:257
↓ 84 callersMethodExecute
Execute merges every duplicate group: unions labels onto the survivor, soft-deletes the pruned duplicates, and — when DeleteDupsFromSourceServer is en
internal/dedup/dedup.go:824
↓ 83 callersFunctionwriteError
writeError writes an error response.
internal/api/handlers.go:223
↓ 81 callersFunctionnewTestEnv
newTestEnv creates a test environment with an in-memory SQLite database and test data.
internal/query/sqlite_testhelpers_test.go:23
↓ 80 callersMethodError
()
internal/store/sqlite_error_test.go:95
↓ 79 callersFunctionDefaultAggregateOptions
DefaultAggregateOptions returns sensible defaults.
internal/query/models.go:327
↓ 74 callersMethodWithRows
(rows ...query.AggregateRow)
internal/tui/setup_test.go:116
↓ 73 callersMethodError
()
internal/vector/embed/client.go:227
↓ 73 callersMethodScan
(dest ...any)
cmd/msgvault/cmd/embeddings_manage.go:411
↓ 69 callersFunctionnewTestEnv
(t *testing.T)
internal/sync/testenv_test.go:27
↓ 66 callersMethodAggregate
Aggregate performs grouping based on the provided ViewType (Sender, Domain, etc.)
internal/query/engine.go:16
↓ 66 callersFunctionkey
----------------------------------------------------------------------------- Key Event Helpers - reduce verbosity of tea.KeyMsg construction --------
internal/tui/setup_test.go:509
↓ 65 callersMethodAddMessage
AddMessage adds a message and returns its ID.
internal/query/testfixtures_test.go:188
↓ 65 callersMethodWrite
(p []byte)
internal/pst/reader.go:230
↓ 59 callersFunctionnewTestRootCmd
newTestRootCmd creates a fresh root command for testing, avoiding mutation of the global rootCmd which could cause race conditions in parallel tests.
cmd/msgvault/cmd/root_test.go:94
↓ 58 callersMethodWithViewType
(vt query.ViewType)
internal/tui/setup_test.go:158
↓ 58 callersFunctionassertLevel
assertLevel checks that the model is at the expected view level.
internal/tui/setup_test.go:418
↓ 57 callersMethodUpdate
Update implements tea.Model.
internal/tui/model.go:831
↓ 56 callersMethodListMessages
Message queries
internal/query/engine.go:26
↓ 56 callersFunctionLiveMessagesWhere
LiveMessagesWhere returns the SQL predicate that selects live messages. Dedup-hidden rows (deleted_at IS NOT NULL) are filtered always — they must not
internal/store/live_messages.go:35
↓ 56 callersMethodNow
Now returns the SQL expression for the current timestamp. SQLite: "datetime('now')" PostgreSQL: "NOW()"
internal/store/dialect.go:38
↓ 56 callersMethodWithMessages
(msgs ...query.MessageSummary)
internal/tui/setup_test.go:121
↓ 55 callersMethodUpsertMessage
UpsertMessage inserts or updates a message.
internal/store/messages.go:206
↓ 54 callersMethodQueryContext
QueryContext returns a *loggedRows whose Close emits the real wall-clock duration of prepare + scan. The immediate post-Query log line is emitted only
internal/store/db_logger.go:105
↓ 53 callersMethodCreateMessage
CreateMessage inserts a minimal message and returns its internal ID.
internal/testutil/storetest/storetest.go:42
↓ 53 callersFunctionParse
Parse is a convenience function that parses using default settings.
internal/search/parser.go:231
↓ 52 callersMethodActivateGeneration
ActivateGeneration atomically retires the current active generation (if any, deleting its embeddings on backends that share an index graph) and promot
internal/vector/backend.go:150
↓ 52 callersMethodParse
Parse parses a Gmail-like search query string into a Query object. Supported operators: - from:, to:, cc:, bcc: - address filters - subject: - subjec
internal/search/parser.go:198
↓ 51 callersMethodUpsert
(ctx context.Context, gen GenerationID, chunks []Chunk)
internal/vector/backend.go:168
↓ 50 callersMethodBody
Body sets the message body text.
internal/testutil/email/builder.go:78
↓ 50 callersMethodSkip
(args ...any)
internal/testutil/tbmock/mock_tb.go:50
↓ 49 callersMethodAddAccountIdentity
AddAccountIdentity confirms an identifier for one source. Behavior: - If (source_id, address) does not exist: insert with the given signal and confir
internal/store/account_identities.go:61
↓ 49 callersMethodDatabaseDSN
DatabaseDSN returns the database connection string or file path.
internal/config/config.go:391
↓ 48 callersMethodFusedSearch
(ctx context.Context, req FusedRequest)
internal/vector/backend.go:209
↓ 47 callersMethodNext
Next delegates to the embedded *sql.Rows but, on the first false return, runs the timing finalizer so duration_ms is captured at end-of-scan rather th
internal/store/db_logger.go:293
↓ 47 callersMethodReplaceMessageRecipients
ReplaceMessageRecipients replaces all recipients for a message atomically.
internal/store/messages.go:434
↓ 47 callersMethodSubject
Subject sets the Subject header. Use NoSubject() to omit it entirely.
internal/testutil/email/builder.go:62
↓ 47 callersFunctionapplyAggregateKey
applyAggregateKey sends a key through handleAggregateKeys and returns the concrete Model.
internal/tui/setup_test.go:625
↓ 46 callersFunctionassertSummary
assertSummary checks SyncSummary fields against expected values. Only non-nil fields in want are checked.
internal/sync/testenv_test.go:134
↓ 44 callersMethodAddMessage
AddMessage adds a message to the mock store.
internal/gmail/mock.go:297
↓ 44 callersMethodClose
Close releases any resources held by the engine.
internal/query/engine.go:83
↓ 44 callersFunctionkeyEnter
keyEnter returns a KeyMsg for the Enter key.
internal/tui/setup_test.go:514
↓ 44 callersFunctionnewParquetEngine
newParquetEngine creates a DuckDBEngine backed by the standard Parquet test data. It registers cleanup via t.Cleanup so callers don't need defer.
internal/query/duckdb_test.go:22
↓ 43 callersFunctionNewMessage
NewMessage creates a MessageBuilder with sensible defaults.
internal/testutil/email/builder.go:36
↓ 43 callersMethodStartSync
StartSync creates a new sync run record and returns its ID. The supersede UPDATE and the INSERT run inside a writer-locked transaction so concurrent S
internal/store/sync.go:188
↓ 42 callersMethodEnsureConversation
EnsureConversation gets or creates a conversation (thread) for a message. Concurrent first-inserts converge via INSERT ... ON CONFLICT DO UPDATE RETUR
internal/store/messages.go:164
↓ 42 callersFunctionattr
(start xml.StartElement, name string)
internal/synctechsms/parser.go:270
↓ 42 callersFunctionrunFullSync
runFullSync runs a full sync and fails the test on error.
internal/sync/testenv_test.go:99
↓ 41 callersMethodAddParticipant
AddParticipant adds a participant and returns its ID.
internal/query/testfixtures_test.go:142
↓ 41 callersFunctionmakeMessages
makeMessages creates n MessageSummary values with sequential IDs and subjects.
internal/tui/setup_test.go:576
↓ 40 callersFunctionNewWorker
NewWorker constructs a Worker, applying defaults for BatchSize (32), StaleThreshold (auto-derived; see derivedStaleThreshold), MaxConsecutiveFailures
internal/vector/embed/worker.go:103
↓ 40 callersMethodSearch
(ctx context.Context, gen GenerationID, queryVec []float32, k int, filter Filter)
internal/vector/backend.go:169
↓ 40 callersFunctiontestLogger
testLogger returns a logger for tests that discards output.
internal/api/server_test.go:21
↓ 39 callersFunctionnewBackendForTest
newBackendForTest opens a per-test database with one live message and returns a Backend ready for assertions.
internal/vector/pgvector/backend_testhelpers_test.go:128
↓ 38 callersMethodAfter
(d time.Duration)
internal/gmail/ratelimit.go:12
↓ 38 callersMethodListAccountIdentities
ListAccountIdentities returns all identities for one source, ordered by address.
internal/store/account_identities.go:171
↓ 38 callersFunctionbuildCache
(dbPath, analyticsDir string, fullRebuild bool)
cmd/msgvault/cmd/build_cache.go:124
↓ 37 callersFunctionusageErr
usageErr re-enables the usage block for cmd and returns err. Use inside RunE for validation that's semantically part of the invocation contract (mutua
cmd/msgvault/cmd/root.go:291
↓ 36 callersMethodFrom
From sets the From header.
internal/testutil/email/builder.go:50
next →1–100 of 5,225, ranked by callers