Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/kenn-io/msgvault
/ functions
Functions
5,225 in github.com/kenn-io/msgvault
⨍
Functions
5,225
◇
Types & classes
632
↓ 18 callers
Function
escapeILIKE
escapeILIKE escapes ILIKE wildcard characters (% and _) in user input.
internal/query/duckdb.go:421
↓ 18 callers
Function
keyEsc
keyEsc returns a KeyMsg for the Escape key.
internal/tui/setup_test.go:519
↓ 18 callers
Method
loadData
loadData fetches aggregate data based on current view settings.
internal/tui/model.go:340
↓ 18 callers
Function
newTestServerWithMockStore
(t *testing.T)
internal/api/handlers_test.go:41
↓ 18 callers
Function
truncateRunes
truncateRunes truncates a string to fit within maxWidth terminal cells. Uses runewidth to correctly handle full-width characters (CJK, emoji, etc.) th
internal/tui/format.go:159
↓ 18 callers
Function
writeZipFile
(t *testing.T, path string, entries map[string]string)
cmd/msgvault/cmd/import_mbox_test.go:23
↓ 17 callers
Method
CreateCollection
CreateCollection inserts a new collection with the given name, description, and member source IDs.
internal/store/collection.go:89
↓ 17 callers
Method
CreateSourceWithHistory
CreateSourceWithHistory creates a source and sets its sync cursor for incremental sync tests. The returned Source has SyncCursor populated so it can b
internal/sync/testenv_test.go:57
↓ 17 callers
Function
NewManifest
NewManifest creates a new deletion manifest.
internal/deletion/manifest.go:89
↓ 17 callers
Function
NewTestContext
NewTestContext creates a new test context with all dependencies initialized.
internal/deletion/executor_test.go:64
↓ 17 callers
Method
UpsertFTS
UpsertFTS inserts or updates the FTS index for a message. No-op if FTS is not available.
internal/store/messages.go:968
↓ 17 callers
Method
calls
()
internal/scheduler/scheduler_test.go:516
↓ 17 callers
Method
handleAggregateKeys
handleAggregateKeys handles keys in the aggregate and sub-aggregate views.
internal/tui/keys.go:124
↓ 17 callers
Function
runIncrementalSync
runIncrementalSync runs an incremental sync and fails the test on error. Looks up the Gmail source for testEmail (all sync tests use "gmail" type).
internal/sync/testenv_test.go:108
↓ 17 callers
Function
seedMessages
seedMessages sets the profile totals/historyID and adds messages to the mock.
internal/sync/testenv_test.go:90
↓ 16 callers
Method
AttachmentsDir
AttachmentsDir returns the path to the attachments directory.
internal/config/config.go:444
↓ 16 callers
Method
BackfillFTS
BackfillFTS populates the FTS table from existing message data. Processes in batches to avoid blocking for minutes on large archives. The progress cal
internal/store/messages.go:993
↓ 16 callers
Function
DiscoverMailboxes
DiscoverMailboxes walks an Apple Mail directory tree and returns all mailbox directories that contain .emlx files. If rootDir itself is a mailbox dir
internal/emlx/discover.go:36
↓ 16 callers
Method
GenerationFingerprint
GenerationFingerprint returns the full identifier used to compare an index generation against the configured policy. Format: "<model>:<dimension>:<pre
internal/vector/config.go:252
↓ 16 callers
Method
GetStats
()
cmd/msgvault/cmd/store_resolver.go:82
↓ 16 callers
Method
GetTotalStats
Stats
internal/query/engine.go:80
↓ 16 callers
Method
Release
Release returns claimed rows to the pool so another worker can pick them up (for embedding failures). Only rows whose claim_token matches token are re
internal/vector/embed/queue.go:178
↓ 16 callers
Method
SearchMessages
(query string, offset, limit int)
cmd/msgvault/cmd/store_resolver.go:85
↓ 16 callers
Method
Stop
Stop gracefully stops the scheduler, cancels running sync jobs, and waits for them to finish. Returns a context that is done when all work completes.
internal/scheduler/scheduler.go:288
↓ 16 callers
Method
UpdateSourceDisplayName
UpdateSourceDisplayName updates the display name for a source.
internal/store/sync.go:690
↓ 16 callers
Function
assertPending
assertPending asserts the number of pending rows for gen.
internal/vector/embed/testsupport_test.go:158
↓ 16 callers
Function
newTestHandlers
newTestHandlers creates a handlers instance with the given mock engine.
internal/mcp/server_test.go:69
↓ 16 callers
Function
nullString
(s string)
internal/synctechsms/parser.go:306
↓ 16 callers
Method
parquetCTEs
parquetCTEs returns common CTEs for reading all Parquet tables. This is used by aggregate queries that need to join across tables. parquetCTEs returns
internal/query/duckdb.go:274
↓ 16 callers
Function
setupTestSQLite
setupTestSQLite creates a test SQLite database with realistic email data.
cmd/msgvault/cmd/build_cache_test.go:20
↓ 16 callers
Function
sqlStr
--------------------------------------------------------------------------- SQL generation -----------------------------------------------------------
internal/query/testfixtures_test.go:302
↓ 15 callers
Method
ConfigFilePath
ConfigFilePath returns the path to the config file. If a config was loaded (including via --config), returns the actual path used. Otherwise returns t
internal/config/config.go:475
↓ 15 callers
Method
GetActiveSync
(sourceID int64)
internal/api/server.go:39
↓ 15 callers
Method
Save
Save writes the current configuration to disk atomically. Uses temp file + rename to prevent partial writes on crash. Enforces 0600 permissions regard
internal/config/config.go:485
↓ 15 callers
Method
Scan
Scan finds all duplicate groups that dedup would prune. AccountSourceIDs must be non-empty to prevent accidental cross-account grouping; the CLI ensur
internal/dedup/dedup.go:261
↓ 15 callers
Method
SearchFast
SearchFast searches message metadata only (no body text). This is much faster for large archives as it queries Parquet files directly. Searches: subje
internal/query/engine.go:51
↓ 15 callers
Function
captureStdout
captureStdout redirects os.Stdout to a pipe and returns a function that restores the original stdout and returns captured output. The pipe is drained
cmd/msgvault/cmd/search_test.go:22
↓ 15 callers
Function
confirmDefaultIdentity
confirmDefaultIdentity writes one confirmed identifier to a freshly created source's identity. Best-effort: any error is logged and swallowed so a par
cmd/msgvault/cmd/account_identity.go:43
↓ 15 callers
Method
goBack
()
internal/tui/navigation.go:157
↓ 15 callers
Function
openTestStore
(t *testing.T)
internal/importer/emlx_import_test.go:37
↓ 15 callers
Function
pgRebind
()
internal/vector/embed/queue_pg_test.go:106
↓ 15 callers
Function
seedThree
seedThree wires up a 3-message corpus with distinct vectors and distinct keyword content so each test below can mix-and-match signal/filter combinatio
internal/vector/pgvector/fused_test.go:109
↓ 14 callers
Method
CompleteSync
CompleteSync marks a sync as successfully completed.
internal/store/sync.go:366
↓ 14 callers
Method
EnsureConversationWithType
EnsureConversationWithType gets or creates a conversation with an explicit conversation_type. Unlike EnsureConversation (which hardcodes 'email_thread
internal/store/messages.go:1230
↓ 14 callers
Method
GetLastSuccessfulSync
(sourceID int64)
internal/api/server.go:41
↓ 14 callers
Function
IsPostgresURL
IsPostgresURL returns true if the path looks like a PostgreSQL connection URL. Exported so cmd-side helpers can decide whether to skip SQLite-only cod
internal/store/store.go:82
↓ 14 callers
Method
MustGetTotalStats
MustGetTotalStats calls GetTotalStats and fails the test on error.
internal/query/sqlite_testhelpers_test.go:51
↓ 14 callers
Function
NewDuckDBEngine
NewDuckDBEngine creates a new DuckDB-backed query engine. analyticsDir should point to ~/.msgvault/analytics/ sqlitePath should point to ~/.msgvault/m
internal/query/duckdb.go:81
↓ 14 callers
Function
Open
Open verifies the database is reachable, applies the embedding schema (creating the vector extension if necessary), and returns a Backend. The DB hand
internal/vector/pgvector/backend.go:70
↓ 14 callers
Method
Reset
Reset clears all state and call tracking.
internal/gmail/mock.go:312
↓ 14 callers
Method
SetEmptyTarget
SetEmptyTarget adds the given ViewType to EmptyValueTargets. Initializes the map if nil.
internal/query/models.go:266
↓ 14 callers
Method
Stats
(ctx context.Context, gen GenerationID)
internal/vector/backend.go:171
↓ 14 callers
Method
addEmptyTable
addEmptyTable adds an empty table (schema only, no rows) to be written as Parquet.
internal/query/testfixtures_test.go:513
↓ 14 callers
Function
assertSearchQuery
assertSearchQuery checks the model's searchQuery field.
internal/tui/setup_test.go:795
↓ 14 callers
Function
buildGenWithVectors
buildGenWithVectors creates a fresh building generation, upserts one chunk per supplied (message_id -> vector), clears pending, and returns the gen id
internal/vector/pgvector/backend_retire_test.go:137
↓ 14 callers
Function
findGmailSource
( s *store.Store, email string, )
cmd/msgvault/cmd/addaccount.go:316
↓ 14 callers
Function
hasClass
hasClass checks if an HTML element has the given class.
internal/gvoice/parser.go:432
↓ 14 callers
Method
hasDrillFilter
hasDrillFilter returns true if drillFilter has any filter criteria set.
internal/tui/model.go:725
↓ 14 callers
Function
historyAdded
History event builders — construct gmail.HistoryRecord values succinctly.
internal/sync/testenv_test.go:291
↓ 14 callers
Function
newRemoveAccountCmd
()
cmd/msgvault/cmd/remove_account.go:19
↓ 14 callers
Function
newTestModelWithRows
newTestModelWithRows creates a test model pre-populated with aggregate rows. The model is returned with loading=false since data is present. Use NewBu
internal/tui/setup_test.go:454
↓ 14 callers
Method
pushBreadcrumb
()
internal/tui/navigation.go:199
↓ 14 callers
Function
walkNodes
HTML parsing helpers walkNodes recursively walks the HTML node tree, calling fn for each node. If fn returns true, the children of that node are skipp
internal/gvoice/parser.go:422
↓ 13 callers
Method
AddLabel
AddLabel adds a label and returns its ID. Name must be non-empty.
internal/query/testfixtures_test.go:164
↓ 13 callers
Method
CreateMessages
CreateMessages inserts count messages with IDs "msg-0" .. "msg-(count-1)".
internal/testutil/storetest/storetest.go:56
↓ 13 callers
Method
Error
()
internal/oauth/oauth.go:51
↓ 13 callers
Method
GetMessageRaw
GetMessageRaw returns the decompressed raw MIME data for a message. Returns nil, nil if no raw data is stored for the given ID.
internal/query/engine.go:33
↓ 13 callers
Method
Helper
()
internal/testutil/dbtest/dbtest_test.go:35
↓ 13 callers
Function
HintRepairEncoding
HintRepairEncoding wraps err with a user-facing hint suggesting `msgvault repair-encoding` when the error is an encoding error. If err is nil or unrel
internal/query/encoding_hint.go:21
↓ 13 callers
Method
ListSources
(sourceType string)
internal/api/server.go:38
↓ 13 callers
Method
ListSyncRunItems
(syncRunID int64, status string, limit int)
internal/api/server.go:43
↓ 13 callers
Function
NewSQLiteEngine
NewSQLiteEngine creates a new SQLite-backed query engine.
internal/query/sqlite.go:32
↓ 13 callers
Function
NewServerWithOptions
NewServerWithOptions creates a new API server with full options including query engine.
internal/api/server.go:108
↓ 13 callers
Method
Next
(challenge []byte)
internal/imap/xoauth2.go:32
↓ 13 callers
Method
OnError
(err error)
internal/whatsapp/types.go:147
↓ 13 callers
Function
Parse
Parse parses an .emlx file from its raw bytes.
internal/emlx/reader.go:37
↓ 13 callers
Method
ReplaceMessageLabels
ReplaceMessageLabels replaces all labels for a message atomically.
internal/store/messages.go:694
↓ 13 callers
Function
SkipIfPostgres
SkipIfPostgres skips the calling test when MSGVAULT_TEST_DB targets PostgreSQL. Use this for tests that exercise SQLite-only constructs (FTS5 MATCH, P
internal/testutil/store_helpers.go:52
↓ 13 callers
Method
Skipf
(format string, args ...any)
internal/testutil/tbmock/mock_tb.go:55
↓ 13 callers
Method
Token
()
cmd/msgvault/cmd/root_test.go:397
↓ 13 callers
Method
TriggerSync
(email string)
internal/api/server.go:52
↓ 13 callers
Function
appendSourceFilter
appendSourceFilter returns conditions/args updated with a source-id filter drawn from either SourceIDs (multi) or SourceID (single). SourceIDs takes p
internal/query/source_filter.go:12
↓ 13 callers
Function
assertCmd
assertCmd checks whether a command is nil or non-nil as expected.
internal/tui/setup_test.go:785
↓ 13 callers
Function
assertMessageHasLabel
assertMessageHasLabel checks that a message has a specific label (by source_label_id).
internal/sync/testenv_test.go:262
↓ 13 callers
Function
createAttachmentFile
createAttachmentFile creates a file in the content-addressed storage layout (root/<hash[:2]>/<hash>) and returns the SHA-256 hex hash of the content.
internal/export/attachments_test.go:20
↓ 13 callers
Function
handleErrorResponse
handleErrorResponse reads an error response and returns an appropriate error.
internal/remote/store.go:115
↓ 13 callers
Function
isSQLiteError
isSQLiteError checks if err is a sqlite3.Error with a message containing substr. This is more robust than strings.Contains on err.Error() because it f
internal/store/store.go:67
↓ 13 callers
Function
keyTab
keyTab returns a KeyMsg for the Tab key.
internal/tui/setup_test.go:524
↓ 13 callers
Function
mustMkdirAll
(t *testing.T, path string)
internal/applemail/accounts_test.go:55
↓ 13 callers
Function
newRLFixture
()
internal/gmail/ratelimit_test.go:118
↓ 13 callers
Function
openPGQueueDB
openPGQueueDB stands up a per-test schema seeded with n pending rows and returns the *sql.DB. Thin wrapper over newPGQueueSchema for the common single
internal/vector/embed/queue_pg_test.go:88
↓ 13 callers
Function
openVectorsDBWithPending
openVectorsDBWithPending opens a fresh vectors.db with one generation (id=1) and n pending rows for that generation. The database is closed automatica
internal/vector/embed/testsupport_test.go:22
↓ 13 callers
Method
overlayModal
(background string)
internal/tui/view.go:1340
↓ 13 callers
Function
resizeModel
resizeModel sends a WindowSizeMsg and returns the updated model.
internal/tui/setup_test.go:688
↓ 13 callers
Function
runPostSourceCreateMigrations
runPostSourceCreateMigrations re-runs startup migrations after the caller has just created a source. The legacy identity migration defers when no sour
cmd/msgvault/cmd/store_resolver.go:75
↓ 13 callers
Function
seedAndEmbed
seedAndEmbed inserts any missing message rows, creates a building generation sized to the first vector, upserts every supplied vector as a chunk, and
internal/vector/pgvector/backend_testhelpers_test.go:153
↓ 13 callers
Method
showFlash
ensureThreadCursorVisible adjusts scroll offset to keep cursor visible in thread view. navigateDetailPrev navigates to the previous message in list/th
internal/tui/model.go:1353
↓ 13 callers
Function
testManager
testManager creates a Manager in a temp directory for testing.
internal/deletion/manifest_test.go:19
↓ 13 callers
Method
withTx
withTx executes fn within a database transaction. If fn returns an error, the transaction is rolled back; otherwise it is committed. The callback rece
internal/store/store.go:432
↓ 12 callers
Method
CreateSource
CreateSource creates a source without setting a sync cursor (for full sync tests).
internal/sync/testenv_test.go:67
← previous
next →
201–300 of 5,225, ranked by callers