MCPcopy Create free account

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

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

↓ 5 callersMethodSeedStandardDataSet
SeedStandardDataSet inserts the standard test data set: 1 source (test@gmail.com), 3 participants (Alice, Bob, Carol), 1 conversation, 5 messages, 3 l
internal/testutil/dbtest/dbtest.go:57
↓ 5 callersMethodSetEmbedEnqueuer
SetEmbedEnqueuer wires up the optional vector-search enqueuer. Safe to call with nil to disable.
internal/sync/sync.go:103
↓ 5 callersMethodSimulateDeleteError
SimulateDeleteError injects a delete error for a specific message ID.
internal/deletion/executor_test.go:179
↓ 5 callersMethodSimulateNotFound
SimulateNotFound injects a 404 not-found error for a specific message ID.
internal/deletion/executor_test.go:184
↓ 5 callersMethodStart
Start begins listening for HTTP requests. Returns an error if the security posture is invalid.
internal/api/server.go:210
↓ 5 callersMethodString
()
internal/gvoice/models.go:17
↓ 5 callersFunctionValidateExtractedMboxCache
(zipPath, destDir string, limits ExtractLimits)
internal/importer/mboxzip/mbox_zip.go:388
↓ 5 callersFunctionVectorTableName
VectorTableName returns the dimension-specific vec0 table name.
internal/vector/sqlitevec/migrate.go:443
↓ 5 callersMethodWithModal
(mt modalType)
internal/tui/setup_test.go:182
↓ 5 callersMethodaddMessage
(gmailID string, sourceID, convID int64)
internal/deletion/executor_e2e_test.go:80
↓ 5 callersFunctionapplyAggregateKeyWithCmd
applyAggregateKeyWithCmd sends a key through handleAggregateKeys and returns Model and Cmd.
internal/tui/setup_test.go:632
↓ 5 callersFunctionapplySearchResultsWithStats
applySearchResultsWithStats simulates search results that include aggregate stats.
internal/tui/setup_test.go:733
↓ 5 callersFunctionassertAttachmentCount
assertAttachmentCount checks the attachment count in the store.
internal/sync/testenv_test.go:187
↓ 5 callersFunctionassertSearchCount
assertSearchCount runs a search and verifies the number of results.
internal/query/sqlite_testhelpers_test.go:127
↓ 5 callersFunctionassertSoftDeleted
( t *testing.T, st *store.Store, msgID int64, wantDeleted bool, )
internal/dedup/dedup_test.go:45
↓ 5 callersMethodattachmentRowsForMessage
(gmailID string)
internal/deletion/executor_e2e_test.go:124
↓ 5 callersMethodbuildAggregateSearchConditions
buildWhereClause builds WHERE conditions for Parquet queries. Column references use msg. prefix to be explicit since aggregate queries join multiple C
internal/query/duckdb.go:436
↓ 5 callersMethodbuildSearchConditions
buildSearchConditions builds WHERE conditions for search queries. Shared by SearchFast and SearchFastCount. Note: These conditions reference msg and m
internal/query/duckdb.go:2441
↓ 5 callersMethodbuildSearchQueryParts
Search performs a Gmail-style search query. buildSearchQueryParts builds the WHERE conditions, args, and FTS join for a search query. This is shared b
internal/query/sqlite.go:1395
↓ 5 callersFunctioncomputeMessageID
computeMessageID computes a deterministic 16-char hex ID from the given parts.
internal/gvoice/parser.go:394
↓ 5 callersFunctioncountEmbeddingRowsPG
countEmbeddingRowsPG returns the number of embedding rows for a generation in a live PG database. Used by the CLI delete-on-retire regression tests.
cmd/msgvault/cmd/embed_pg_test.go:28
↓ 5 callersFunctioncreateMessagesForSource
createMessagesForSource inserts count messages under srcID/convID and returns their IDs.
internal/store/store_test.go:1540
↓ 5 callersFunctioncreateNASBundle
(bundleDir, apiKey, oauthSecretsPath string, port int)
cmd/msgvault/cmd/setup.go:237
↓ 5 callersFunctiondecodeAll
(t *testing.T, buf *bytes.Buffer)
internal/store/db_logger_test.go:506
↓ 5 callersFunctionerrOAuthNotConfigured
errOAuthNotConfigured returns a helpful error when OAuth client secrets are missing. It also searches for client_secret*.json files in common location
cmd/msgvault/cmd/root.go:348
↓ 5 callersMethodfindDetailMatches
findDetailMatches finds all lines matching the detail search query.
internal/tui/model.go:1375
↓ 5 callersFunctionfindLogLine
---- test helpers ---- findLogLine returns the first record whose msg is exactly "sql".
internal/store/db_logger_test.go:478
↓ 5 callersFunctionfloat32SliceBlob
float32SliceBlob converts a float32 slice to the little-endian byte representation that sqlite-vec expects.
internal/vector/sqlitevec/backend.go:772
↓ 5 callersFunctiongenStateSV
genStateSV reads index_generations.state for a generation.
internal/vector/sqlitevec/backend_test.go:90
↓ 5 callersFunctiongetEmbeddingGeneration
(ctx context.Context, db *sql.DB, rebind func(string) string, gen vector.GenerationID)
cmd/msgvault/cmd/embeddings_manage.go:372
↓ 5 callersMethodhandleGlobalKeys
handleGlobalKeys handles keys common to all views (quit, help, mode toggle). Returns (model, cmd, true) if the key was handled, or (model, nil, false)
internal/tui/keys.go:92
↓ 5 callersMethodhasSQLite
hasSQLite returns true if DuckDB's sqlite_scanner extension is loaded, allowing sqlite_db.* queries. On Windows this is always false.
internal/query/duckdb.go:229
↓ 5 callersFunctionhashFile
hashFile computes the SHA-256 hash of a file on disk.
internal/update/update.go:138
↓ 5 callersFunctionhighlightTerms
highlightTerms applies highlight styling to all occurrences of search terms in text. Terms are extracted from a search query string using search.Parse
internal/tui/format.go:18
↓ 5 callersFunctionhistoryDeleted
(id string)
internal/sync/testenv_test.go:299
↓ 5 callersFunctionidSeq
(hits []vector.FusedHit)
internal/vector/pgvector/parity_test.go:142
↓ 5 callersFunctioninstallBinaryTo
installBinaryTo performs the actual binary installation with backup/restore logic. This is separated from installBinary for testability. On Windows,
internal/update/update.go:239
↓ 5 callersFunctionisMediaType
isMediaType returns true if the WhatsApp message_type represents media.
internal/whatsapp/mapping.go:101
↓ 5 callersFunctionlinkLabel
( t *testing.T, st *store.Store, sourceID, msgID int64, sourceLabelID, name, typ string, )
internal/dedup/dedup_test.go:61
↓ 5 callersFunctionlistEmbeddingGenerations
nolint:unparam // rebind is a no-op here (no ? placeholders) but kept for signature symmetry with the other embedding-generation query helpers and the
cmd/msgvault/cmd/embeddings_manage.go:342
↓ 5 callersMethodlistManifests
(dir string)
internal/deletion/manifest.go:283
↓ 5 callersMethodloadSearch
loadSearch executes the search query based on current mode.
internal/tui/model.go:527
↓ 5 callersMethodloadStats
loadStats fetches total statistics.
internal/tui/model.go:411
↓ 5 callersMethodloadTokenFile
loadTokenFile loads the full token file including scope metadata.
internal/oauth/oauth.go:402
↓ 5 callersFunctionlooksLikeEmail
looksLikeEmail returns true for tokens that have the shape of an email address. Emails are matched case-insensitively in the identity store; other ide
internal/store/account_identities.go:28
↓ 5 callersFunctionmcpShouldUseParquet
mcpShouldUseParquet reports whether the MCP server should use the DuckDB/Parquet engine. This is the SQLite-only branch of the engine selection: Postg
cmd/msgvault/cmd/mcp.go:150
↓ 5 callersMethodnavigateList
(key string, itemCount int)
internal/tui/navigation.go:203
↓ 5 callersFunctionnewParquetBuilder
newParquetBuilder creates a new builder for Parquet test fixtures.
internal/query/testfixtures_test.go:495
↓ 5 callersFunctionnewPendingDB
newPendingDB returns an in-memory SQLite handle with just the pending_embeddings table the activation gate counts against.
internal/scheduler/scheduler_test.go:821
↓ 5 callersFunctionnormalizeMessageID
(id string)
internal/importer/ingest.go:214
↓ 5 callersFunctionopenEmbeddingsMetadataDB
openEmbeddingsMetadataDB opens the database that holds embedding generation metadata and returns a handle, a rebind function for SQL placeholders, a c
cmd/msgvault/cmd/embeddings_manage.go:217
↓ 5 callersFunctionopenPGEnqueueDB
openPGEnqueueDB stands up a per-test schema on MSGVAULT_TEST_DB with the pgvector schema (index_generations + pending_embeddings). The Enqueuer only r
internal/vector/embed/enqueue_pg_test.go:27
↓ 5 callersFunctionopenServePGSchema
openServePGSchema creates an isolated per-test schema on MSGVAULT_TEST_DB and returns a pgx *sql.DB scoped to it plus the schema-scoped DSN string. se
cmd/msgvault/cmd/serve_vector_pg_test.go:26
↓ 5 callersFunctionopenTestDB
(t *testing.T, path string)
internal/vector/sqlitevec/migrate_test.go:325
↓ 5 callersFunctionopenVectorsDBForEnqueue
openVectorsDBForEnqueue opens a vectors.db with the schema applied but NO generations. Useful for Enqueuer tests that insert their own generations.
internal/vector/embed/testsupport_test.go:135
↓ 5 callersFunctionparseAddressList
parseAddressList parses an address header using enmime's AddressList method.
internal/mime/parse.go:103
↓ 5 callersFunctionparseTextHTML
parseTextHTML parses a Google Voice text/SMS conversation HTML file. Returns the individual messages, group participant phones (if any), and any error
internal/gvoice/parser.go:138
↓ 5 callersFunctionparseViewType
parseViewType parses a view type string into query.ViewType.
internal/api/handlers.go:1225
↓ 5 callersFunctionpgEnqueuer
(db *sql.DB)
internal/vector/embed/enqueue_pg_test.go:88
↓ 5 callersFunctionprobeColumns
probeColumns checks which columns exist in a Parquet file. Returns a set of column names present in the schema. On any error, returns an empty map (ca
internal/query/views.go:26
↓ 5 callersFunctionreadDisplayName
(t *testing.T, st *store.Store, pid int64)
internal/store/messages_test.go:334
↓ 5 callersMethodresolveParticipant
resolveParticipant resolves a handle ID to a participant ID in the store, creating the participant if needed.
internal/imessage/client.go:779
↓ 5 callersFunctionrunExportAttachments
(cmd *cobra.Command, args []string)
cmd/msgvault/cmd/export_attachments.go:34
↓ 5 callersFunctionrunSynctechSMSDriveSourceWithClient
(ctx context.Context, st *store.Store, src config.SynctechSMSSource, opts synctechsms.ImportOptions, client sy
cmd/msgvault/cmd/add_synctech_sms_drive.go:181
↓ 5 callersFunctionsanitizeHeaderValue
sanitizeHeaderValue strips CR and LF characters to prevent header injection.
internal/pst/mime.go:243
↓ 5 callersMethodsaveToken
saveToken saves a token for the given email with the specified scopes.
internal/oauth/oauth.go:454
↓ 5 callersFunctionsearchFast
searchFast is a test helper that parses a query string and calls SearchFast.
internal/query/duckdb_test.go:45
↓ 5 callersFunctionselectRow
----------------------------------------------------------------------------- Key Application Helpers - remove handleXKeys casting boilerplate -------
internal/tui/setup_test.go:610
↓ 5 callersFunctionsetupExportAttachmentsTest
setupExportAttachmentsTest creates a temp directory with a SQLite database containing a message with attachments and corresponding content-addressed f
cmd/msgvault/cmd/export_attachments_test.go:35
↓ 5 callersFunctionsetupTestSQLiteEmpty
setupTestSQLiteEmpty creates a test SQLite database with schema and metadata (sources, labels, participants) but zero messages. This simulates a fresh
cmd/msgvault/cmd/build_cache_test.go:1121
↓ 5 callersFunctionsnippet
snippet returns the first snippetMaxLen characters of s, suitable for message preview.
internal/gvoice/parser.go:384
↓ 5 callersFunctionsynctechImportOptions
(src config.SynctechSMSSource)
cmd/msgvault/cmd/add_synctech_sms_drive.go:349
↓ 5 callersFunctiontextContent
textContent returns the concatenated text content of a node and its children.
internal/gvoice/parser.go:452
↓ 5 callersFunctiontimeExpr
timeExpr returns the SQL expression for time grouping based on granularity.
internal/query/duckdb.go:683
↓ 5 callersFunctiontruncateBytesRuneSafe
truncateBytesRuneSafe returns s truncated to at most maxFTSBodyBytes bytes without splitting a multibyte UTF-8 rune. If s already fits it is returned
internal/store/dialect_pg.go:136
↓ 5 callersFunctiontruncateTestString
truncateTestString truncates a string to 60 characters for test output display.
internal/tui/view_render_test.go:516
↓ 5 callersFunctionunixMillis
(s string)
internal/synctechsms/parser.go:295
↓ 5 callersFunctionvectorLiteral
vectorLiteral formats a float32 slice as pgvector's text input format, e.g. "[1.0,2.5,-3.14]". Bound via $N::vector this works without the pgvector-go
internal/vector/pgvector/backend.go:760
↓ 5 callersFunctionviewTypeToString
============================================================================ Helper Functions ========================================================
internal/remote/engine.go:134
↓ 5 callersFunctionwithAfter
()
internal/mcp/server.go:53
↓ 5 callersFunctionwithAttachmentsDir
withAttachmentsDir creates a syncer with an attachments directory and returns the dir path.
internal/sync/testenv_test.go:194
↓ 5 callersFunctionwithBefore
()
internal/mcp/server.go:59
↓ 4 callersMethodAddAccountsFromConfig
AddAccountsFromConfig adds all enabled accounts from the config. Returns the number of accounts scheduled and any errors encountered.
internal/scheduler/scheduler.go:153
↓ 4 callersMethodAddSourceWithType
AddSourceWithType adds a source with a specific type and returns its ID.
internal/query/testfixtures_test.go:134
↓ 4 callersMethodAddSourcesToCollection
AddSourcesToCollection attaches sources to a collection. Idempotent. Rejects mutations of the auto-managed default collection.
internal/store/collection.go:233
↓ 4 callersMethodAddr
Addr returns the "host:port" string.
internal/imap/config.go:43
↓ 4 callersMethodAssertBatchDeleteCalls
AssertBatchDeleteCalls verifies the number of BatchDeleteMessages calls.
internal/deletion/executor_test.go:194
↓ 4 callersMethodAssertDeleteCalls
AssertDeleteCalls verifies the number of DeleteMessage calls.
internal/deletion/executor_test.go:136
↓ 4 callersMethodAssertInProgressCount
AssertInProgressCount verifies the number of in-progress manifests.
internal/deletion/executor_test.go:256
↓ 4 callersMethodAssertMessageNotDeleted
AssertMessageNotDeleted asserts that a message has NOT been marked as deleted.
internal/testutil/storetest/storetest.go:201
↓ 4 callersMethodAssertResult
AssertResult verifies the final success and failure counts.
internal/deletion/executor_test.go:111
↓ 4 callersMethodAssertTrashCalls
AssertTrashCalls verifies the number of TrashMessage calls.
internal/deletion/executor_test.go:130
↓ 4 callersFunctionAttachmentsToDir
AttachmentsToDir exports attachments as individual files into outputDir. It reads attachment content from attachmentsDir using content-hash based path
internal/export/attachments.go:263
↓ 4 callersMethodAvailable
Available returns the current number of available tokens.
internal/gmail/ratelimit.go:206
↓ 4 callersMethodBackfillRFC822IDs
( sourceIDs []int64, progress func(done, total int64), )
internal/store/dedup.go:482
↓ 4 callersMethodBegin
Begin returns a *loggedTx that inherits the rebind function, so statements issued inside the transaction are also rebound before reaching the driver.
internal/store/db_logger.go:174
↓ 4 callersMethodBoundary
Boundary sets the multipart boundary string.
internal/testutil/email/builder.go:104
↓ 4 callersMethodClose
Close logs out and disconnects from the IMAP server.
internal/imap/client.go:933
↓ 4 callersMethodCountActiveMessages
(sourceIDs ...int64)
internal/store/dedup.go:447
↓ 4 callersMethodCountMessagesWithoutRFC822ID
(sourceIDs ...int64)
internal/store/dedup.go:463
← previousnext →701–800 of 5,225, ranked by callers