Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/kenn-io/msgvault
/ functions
Functions
5,225 in github.com/kenn-io/msgvault
⨍
Functions
5,225
◇
Types & classes
632
↓ 4 callers
Function
DefaultHome
DefaultHome returns the default msgvault home directory. Respects MSGVAULT_HOME environment variable and expands ~ in its value.
internal/config/config.go:243
↓ 4 callers
Method
DeleteAllDeduped
DeleteAllDeduped permanently deletes every dedup-hidden row regardless of batch. Returns the number of rows deleted and the number of distinct batches
internal/store/dedup.go:413
↓ 4 callers
Method
DeleteCollection
DeleteCollection drops the collection. Sources and messages untouched. Rejects deletion of the auto-managed default collection.
internal/store/collection.go:290
↓ 4 callers
Method
DeleteDedupedBatch
DeleteDedupedBatch permanently deletes all hidden rows associated with a dedup batch. Only deletes rows where deleted_at IS NOT NULL AND delete_batch_
internal/store/dedup.go:379
↓ 4 callers
Method
DeleteToken
DeleteToken revokes the refresh token at Microsoft (best-effort) and removes the local token file. Revocation failures are logged but do not prevent l
internal/microsoft/oauth.go:667
↓ 4 callers
Function
DiscoverBackupFiles
(path string)
internal/synctechsms/files.go:24
↓ 4 callers
Function
DriverName
DriverName returns the driver name to pass to sql.Open.
internal/vector/sqlitevec/ext.go:62
↓ 4 callers
Method
EnsureParticipantByIdentifier
(identifierType, identifierValue, displayName string)
internal/store/messages.go:1299
↓ 4 callers
Function
FormatSize
FormatSize formats bytes as a human-readable string.
internal/update/update.go:811
↓ 4 callers
Method
GetAccountSchedule
GetAccountSchedule returns the schedule for a specific account email. Returns nil if the account is not configured for scheduling. The returned value
internal/config/config.go:559
↓ 4 callers
Method
GetLatestSync
(sourceID int64)
internal/api/server.go:40
↓ 4 callers
Method
GetMessage
GetMessage retrieves a full message from SQLite. Uses direct SQLite connection when available for better BLOB handling.
internal/query/duckdb.go:1509
↓ 4 callers
Method
GetMessageBody
GetMessageBody returns the body_text and body_html for a message.
internal/testutil/storetest/storetest.go:117
↓ 4 callers
Method
GetMessageSummariesByIDs
GetMessageSummariesByIDs returns summary-level rows (no body, no raw MIME) for the supplied IDs in the same order as ids. Missing IDs are silently dro
internal/query/engine.go:42
↓ 4 callers
Method
GetProfile
GetProfile returns the authenticated user's profile.
internal/gmail/api.go:9
↓ 4 callers
Method
GetSourceImportItem
(sourceID int64, provider, providerID string)
internal/store/sync.go:477
↓ 4 callers
Method
GetTextStats
GetTextStats returns aggregate stats for text messages.
internal/query/text_engine.go:27
↓ 4 callers
Method
HasToken
(email string)
internal/microsoft/oauth.go:658
↓ 4 callers
Function
IngestRawMessage
IngestRawMessage parses and stores a raw MIME message into the database. This is the shared ingestion path for all importers (mbox, emlx, etc.). Para
internal/importer/ingest.go:30
↓ 4 callers
Method
InspectParticipantDisplayName
InspectParticipantDisplayName returns the display_name from the participants table for an email.
internal/store/inspect.go:156
↓ 4 callers
Method
IsBusyError
IsBusyError returns true if the error indicates the database is held by another connection, either busy (SQLITE_BUSY) or locked (SQLITE_LOCKED). Used
internal/store/dialect.go:194
↓ 4 callers
Method
IsEmpty
IsEmpty reports whether the filter has no restrictions. A zero-value Filter is empty and backends should skip filter resolution entirely.
internal/vector/backend.go:101
↓ 4 callers
Method
ListImportedSourceItemChecksums
(sourceID int64, provider string)
internal/store/sync.go:500
↓ 4 callers
Method
ListInProgress
ListInProgress returns all in-progress deletion manifests.
internal/deletion/manifest.go:264
↓ 4 callers
Method
MarkMessageDeleted
MarkMessageDeleted marks a message as deleted from the source.
internal/store/messages.go:767
↓ 4 callers
Method
MarkMessagesDeletedBatch
MarkMessagesDeletedBatch marks multiple messages as deleted from the source in a single transaction.
internal/store/messages.go:777
↓ 4 callers
Method
MarkMigrationApplied
MarkMigrationApplied records that a migration has run. Idempotent.
internal/store/migrations.go:21
↓ 4 callers
Function
NewClient
NewClient creates a new Gmail API client.
internal/gmail/client.go:64
↓ 4 callers
Function
NewManager
(clientID, tenantID, tokensDir string, logger *slog.Logger)
internal/microsoft/oauth.go:119
↓ 4 callers
Function
NewRateLimiter
NewRateLimiter creates a new rate limiter. rps is requests per second, burst is the maximum burst size.
internal/api/middleware.go:92
↓ 4 callers
Function
NewReaderWithMaxMessageBytes
NewReaderWithMaxMessageBytes creates a new MBOX reader that rejects messages larger than maxMessageBytes. If maxMessageBytes <= 0, no limit is enforce
internal/mbox/reader.go:81
↓ 4 callers
Function
NormalizeAddress
(raw string)
internal/textimport/phone.go:86
↓ 4 callers
Method
Read
(p []byte)
cmd/msgvault/cmd/repair_encoding.go:686
↓ 4 callers
Method
ReclaimStale
ReclaimStale clears the claim on any pending row whose claimed_at is older than olderThan. Returns the number of rows reclaimed.
internal/vector/embed/queue.go:264
↓ 4 callers
Method
SearchByDomains
SearchByDomains returns messages where any participant (from, to, cc, or bcc) belongs to one of the given domains.
internal/query/engine.go:74
↓ 4 callers
Method
SetupMessages
SetupMessages adds multiple pre-built RawMessage values to the mock store in a thread-safe manner. Nil entries in the input slice are silently skipped
internal/gmail/mock.go:282
↓ 4 callers
Method
Shutdown
Shutdown gracefully shuts down the server.
internal/api/server.go:245
↓ 4 callers
Method
SimulateTrashError
SimulateTrashError injects a trash error for a specific message ID.
internal/deletion/executor_test.go:174
↓ 4 callers
Function
StripDomain
StripDomain returns the local part of a synthetic "<slug>@facebook.messenger" email. If the input lacks the expected domain suffix, it is returned as-
internal/fbmessenger/slug.go:91
↓ 4 callers
Method
TextSearch
TextSearch performs plain full-text search over text messages. Uses FTS5 if available; otherwise returns empty results.
internal/query/sqlite_text.go:420
↓ 4 callers
Method
TimerCount
TimerCount returns the number of pending timers.
internal/gmail/ratelimit_test.go:70
↓ 4 callers
Method
ToJSON
ToJSON serializes the config to JSON.
internal/imap/config.go:88
↓ 4 callers
Function
TruncateRunes
TruncateRunes truncates a string to maxRunes runes (not bytes), adding "..." if truncated. This is UTF-8 safe and won't split multi-byte characters.
internal/textutil/encoding.go:125
↓ 4 callers
Method
UpdateSourceSyncConfig
UpdateSourceSyncConfig updates the JSON sync configuration for an IMAP source. The sync_config column is JSONB on PG; the dialect supplies the appropr
internal/store/sync.go:702
↓ 4 callers
Function
ValidateCronExpr
ValidateCronExpr validates a cron expression without scheduling anything.
internal/scheduler/scheduler.go:489
↓ 4 callers
Method
WithGmailIDs
(ids ...string)
internal/tui/setup_test.go:131
↓ 4 callers
Function
WithLogger
WithLogger sets the logger for the client.
internal/gmail/client.go:43
↓ 4 callers
Method
WithProgress
WithProgress sets the progress reporter.
internal/sync/sync.go:96
↓ 4 callers
Method
WithReason
WithReason adds an entry to the errors[].reason array.
internal/gmail/client_test.go:48
↓ 4 callers
Method
WithSummary
WithSummary sets the manifest summary.
internal/deletion/manifest_test.go:63
↓ 4 callers
Function
WriteAndVerifyFile
WriteAndVerifyFile writes content to a file, asserts it exists, and verifies its content matches. Returns the full path to the written file.
internal/testutil/fs_helpers.go:102
↓ 4 callers
Method
add
(obj types.Object)
tools/testifyhelpercheck/analyzer.go:202
↓ 4 callers
Function
aggRowMap
aggRowMap builds a map from key to count, failing on duplicate keys.
internal/query/sqlite_testhelpers_test.go:74
↓ 4 callers
Function
appleTimestampToTime
appleTimestampToTime converts an Apple epoch timestamp to time.Time. macOS High Sierra+ stores dates as nanoseconds since Apple epoch; older versions
internal/imessage/parser.go:20
↓ 4 callers
Function
assertDedupDeleted
( t *testing.T, st *store.Store, msgID int64, wantDeleted bool, )
internal/store/dedup_test.go:114
↓ 4 callers
Function
assertMessageNotHasLabel
assertMessageNotHasLabel checks that a message does NOT have a specific label.
internal/sync/testenv_test.go:276
↓ 4 callers
Function
assertRow
assertRow finds a single key in the aggregate rows and asserts its count is 1.
internal/query/sqlite_testhelpers_test.go:100
↓ 4 callers
Function
assertRowsContain
assertRowsContain verifies that a subset of expected key/count pairs exist in the aggregate rows (order-independent). Also checks for duplicate keys.
internal/query/sqlite_testhelpers_test.go:87
↓ 4 callers
Function
assertTempDirSecured
assertTempDirSecured checks that a temp dir has permissions no more permissive than 0700. This is umask-tolerant (stricter is fine).
internal/config/config_test.go:498
↓ 4 callers
Function
attrs
(start xml.StartElement)
internal/synctechsms/parser.go:279
↓ 4 callers
Method
batchPopulate
batchPopulate batch-loads recipients and labels for a slice of messages.
internal/store/api.go:756
↓ 4 callers
Function
buildRecipientSet
buildRecipientSet deduplicates addresses and returns a RecipientSet ready for store.PersistMessage.
internal/importer/ingest.go:259
↓ 4 callers
Method
buildWhereClause
keyColumns are passed through to buildAggregateSearchConditions to control which columns text search terms filter on.
internal/query/duckdb.go:650
↓ 4 callers
Function
confirmEmbed
confirmEmbed reads a y/N answer from the command input. Default is no.
cmd/msgvault/cmd/confirm.go:91
↓ 4 callers
Method
connect
connect establishes and authenticates the IMAP connection. Caller must hold mu.
internal/imap/client.go:86
↓ 4 callers
Method
contains
(sub string)
internal/vector/pgvector/review_fixes_test.go:41
↓ 4 callers
Method
countLive
(sourceID int64)
internal/deletion/executor_e2e_test.go:102
↓ 4 callers
Function
countMessages
(t *testing.T, st *store.Store, where string)
internal/fbmessenger/importer_test.go:33
↓ 4 callers
Function
createEngineFromBuilder
--------------------------------------------------------------------------- Shared helpers -----------------------------------------------------------
internal/query/testfixtures_test.go:601
↓ 4 callers
Method
drain
drain sets tokens to zero.
internal/gmail/ratelimit_test.go:127
↓ 4 callers
Function
ensureAddressUTF8
ensureAddressUTF8 validates and converts address names to valid UTF-8 in place.
internal/sync/sync.go:752
↓ 4 callers
Function
executeQuery
executeQuery opens an in-memory DuckDB, registers views over the Parquet files in analyticsDir, runs the SQL, and writes the results in the requested
cmd/msgvault/cmd/query.go:83
↓ 4 callers
Method
exitInlineSearchMode
exitInlineSearchMode resets inline search UI state without changing filter state.
internal/tui/keys.go:1267
↓ 4 callers
Function
extractBaseSemver
extractBaseSemver extracts the base semver from a version string.
internal/update/update.go:711
↓ 4 callers
Function
extractValue
extractValue extracts the value part from a vCard line, handling both "KEY:value" and "KEY;params:value" formats.
internal/vcard/vcard.go:121
↓ 4 callers
Function
formatAddresses
formatAddresses formats a slice of addresses as a comma-separated string.
internal/tui/format.go:176
↓ 4 callers
Function
formatAddresses
(addrs []query.Address)
cmd/msgvault/cmd/show_message.go:250
↓ 4 callers
Function
formatCount
formatCount formats a number with thousand separators.
cmd/msgvault/cmd/list_accounts.go:174
↓ 4 callers
Method
formatDuration
(d time.Duration)
cmd/msgvault/cmd/deletions.go:657
↓ 4 callers
Function
formatInspectTime
(t sql.NullTime)
internal/store/inspect.go:14
↓ 4 callers
Function
getIDArg
getIDArg extracts a required positive integer ID from the arguments map.
internal/mcp/handlers.go:154
↓ 4 callers
Function
guessMime
(uri string)
internal/fbmessenger/json_parser.go:393
↓ 4 callers
Function
hasAttr
hasAttr checks whether attr is in the attrs list.
internal/imap/client.go:529
↓ 4 callers
Function
historyLabelRemoved
(id string, labels ...string)
internal/sync/testenv_test.go:318
↓ 4 callers
Function
identObject
(pass *analysis.Pass, ident *ast.Ident)
tools/testifyhelpercheck/analyzer.go:220
↓ 4 callers
Function
idsToJSON
idsToJSON encodes an int64 slice as a JSON array for the json_each pattern used in the fused CTE. Returns a NULL NullString when the slice is empty, s
internal/vector/sqlitevec/fused.go:451
↓ 4 callers
Function
imapScopeForTenant
imapScopeForTenant returns the correct IMAP scope based on the tenant ID. The consumer tenant has a fixed, well-known ID; all others are org tenants.
internal/microsoft/oauth.go:91
↓ 4 callers
Function
inClause
inClause returns "col IN (?,?,?)" for len(ids) placeholders. Caller must append the ids to the args slice in the same order.
internal/vector/sqlitevec/backend.go:1275
↓ 4 callers
Function
indexNames
indexNames returns the names of every index on the embeddings table in the connection's own (per-test) schema. Used by the V3 and V5 tests to assert w
internal/vector/pgvector/review_fixes_test.go:168
↓ 4 callers
Function
inferTimeGranularity
inferTimeGranularity adjusts the granularity based on the time period string length.
internal/query/duckdb.go:1059
↓ 4 callers
Method
initSyncState
initSyncState initializes sync state, resuming from checkpoint if possible.
internal/sync/sync.go:116
↓ 4 callers
Function
isExchangeDN
isExchangeDN reports whether s looks like an Exchange Distinguished Name.
internal/pst/reader.go:309
↓ 4 callers
Function
isOwnerOnly
isOwnerOnly returns true if the permission mode grants nothing to group or other.
internal/fileutil/secure_windows.go:15
↓ 4 callers
Function
keyLeft
keyLeft returns a KeyMsg for the Left arrow key.
internal/tui/setup_test.go:539
↓ 4 callers
Function
keyRight
keyRight returns a KeyMsg for the Right arrow key.
internal/tui/setup_test.go:544
↓ 4 callers
Function
loadParticipants
(ctx context.Context, db *sql.DB, messageID int64, recipientType string)
scripts/mimeshootout/main.go:334
↓ 4 callers
Method
loadTextConversations
loadTextConversations fetches text conversations matching the current filter.
internal/tui/text_commands.go:44
↓ 4 callers
Function
makeRealStreamtypedBlob
makeRealStreamtypedBlob builds a blob matching the actual macOS Sequoia format where the multi-byte length has extra framing bytes (0x81, 0x92, 0x00)
internal/imessage/parser_test.go:227
↓ 4 callers
Function
makeRows
makeRows creates 10 AggregateRows with sequential keys ("row-0", "row-1", ...).
internal/tui/setup_test.go:563
↓ 4 callers
Function
mapConversation
mapConversation maps a WhatsApp chat to a msgvault conversation. Returns the source_conversation_id, conversation_type, and title.
internal/whatsapp/mapping.go:23
← previous
next →
801–900 of 5,225, ranked by callers