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
↓ 4,015 callers
Method
NoError
(error, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/require/require.go:12
↓ 2,488 callers
Method
Equal
(any, any, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/assert/assert.go:12
↓ 1,916 callers
Method
Errorf
(format string, args ...any)
internal/testutil/tbmock/mock_tb.go:33
↓ 586 callers
Method
Scan
(dest ...any)
internal/store/sync.go:53
↓ 509 callers
Method
True
(bool, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/assert/assert.go:13
↓ 506 callers
Method
Run
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 callers
Method
Helper
()
internal/testutil/tbmock/mock_tb.go:32
↓ 408 callers
Method
Exec
(query string, args ...any)
internal/store/messages.go:22
↓ 356 callers
Method
QueryRow
(query string, args ...any)
internal/store/messages.go:23
↓ 348 callers
Method
Close
Close releases any resources held by the client.
internal/gmail/api.go:52
↓ 321 callers
Method
DB
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 callers
Method
Error
()
internal/gmail/client.go:210
↓ 275 callers
Method
Close
()
cmd/msgvault/cmd/store_resolver.go:86
↓ 262 callers
Method
ExecContext
(ctx context.Context, query string, args ...any)
internal/vector/pgvector/migrate.go:21
↓ 231 callers
Method
Build
()
internal/tui/setup_test.go:230
↓ 223 callers
Method
NotNil
(any, ...any)
tools/testifyhelpercheck/testdata/src/github.com/stretchr/testify/require/require.go:13
↓ 223 callers
Method
String
()
internal/query/models.go:110
↓ 214 callers
Function
NewBuilder
()
internal/tui/setup_test.go:107
↓ 189 callers
Function
New
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 callers
Method
QueryRowContext
QueryRowContext logs and delegates.
internal/store/db_logger.go:132
↓ 175 callers
Method
GetOrCreateSource
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 callers
Method
Cleanup
(fn func())
internal/testutil/tbmock/mock_tb.go:34
↓ 142 callers
Method
Query
(query string, args ...any)
internal/store/store.go:525
↓ 136 callers
Function
Open
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 callers
Method
Date
Date sets the Date header.
internal/testutil/email/builder.go:72
↓ 122 callers
Method
InitSchema
InitSchema initializes the database schema. This creates all tables if they don't exist.
internal/store/store.go:662
↓ 116 callers
Method
Close
()
internal/vector/backend.go:191
↓ 113 callers
Method
Now
()
internal/gmail/ratelimit.go:11
↓ 108 callers
Method
Add
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 callers
Method
Header
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 callers
Method
WithLevel
(level viewLevel)
internal/tui/setup_test.go:153
↓ 98 callers
Method
Next
Next returns the next message from the MBOX stream. Returns io.EOF when there are no more messages.
internal/mbox/reader.go:112
↓ 96 callers
Method
WithPageSize
(size int)
internal/tui/setup_test.go:164
↓ 96 callers
Method
WithSize
(width, height int)
internal/tui/setup_test.go:147
↓ 96 callers
Function
unitVec
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 callers
Function
unitVec
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 callers
Function
asModel
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 callers
Method
CreateGeneration
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 callers
Method
Rebind
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 callers
Method
Bytes
Bytes builds the complete MIME message.
internal/testutil/email/builder.go:120
↓ 86 callers
Function
NewTestStore
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 callers
Method
Router
Router returns the chi router for testing.
internal/api/server.go:257
↓ 84 callers
Method
Execute
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 callers
Function
writeError
writeError writes an error response.
internal/api/handlers.go:223
↓ 81 callers
Function
newTestEnv
newTestEnv creates a test environment with an in-memory SQLite database and test data.
internal/query/sqlite_testhelpers_test.go:23
↓ 80 callers
Method
Error
()
internal/store/sqlite_error_test.go:95
↓ 79 callers
Function
DefaultAggregateOptions
DefaultAggregateOptions returns sensible defaults.
internal/query/models.go:327
↓ 74 callers
Method
WithRows
(rows ...query.AggregateRow)
internal/tui/setup_test.go:116
↓ 73 callers
Method
Error
()
internal/vector/embed/client.go:227
↓ 73 callers
Method
Scan
(dest ...any)
cmd/msgvault/cmd/embeddings_manage.go:411
↓ 69 callers
Function
newTestEnv
(t *testing.T)
internal/sync/testenv_test.go:27
↓ 66 callers
Method
Aggregate
Aggregate performs grouping based on the provided ViewType (Sender, Domain, etc.)
internal/query/engine.go:16
↓ 66 callers
Function
key
----------------------------------------------------------------------------- Key Event Helpers - reduce verbosity of tea.KeyMsg construction --------
internal/tui/setup_test.go:509
↓ 65 callers
Method
AddMessage
AddMessage adds a message and returns its ID.
internal/query/testfixtures_test.go:188
↓ 65 callers
Method
Write
(p []byte)
internal/pst/reader.go:230
↓ 59 callers
Function
newTestRootCmd
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 callers
Method
WithViewType
(vt query.ViewType)
internal/tui/setup_test.go:158
↓ 58 callers
Function
assertLevel
assertLevel checks that the model is at the expected view level.
internal/tui/setup_test.go:418
↓ 57 callers
Method
Update
Update implements tea.Model.
internal/tui/model.go:831
↓ 56 callers
Method
ListMessages
Message queries
internal/query/engine.go:26
↓ 56 callers
Function
LiveMessagesWhere
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 callers
Method
Now
Now returns the SQL expression for the current timestamp. SQLite: "datetime('now')" PostgreSQL: "NOW()"
internal/store/dialect.go:38
↓ 56 callers
Method
WithMessages
(msgs ...query.MessageSummary)
internal/tui/setup_test.go:121
↓ 55 callers
Method
UpsertMessage
UpsertMessage inserts or updates a message.
internal/store/messages.go:206
↓ 54 callers
Method
QueryContext
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 callers
Method
CreateMessage
CreateMessage inserts a minimal message and returns its internal ID.
internal/testutil/storetest/storetest.go:42
↓ 53 callers
Function
Parse
Parse is a convenience function that parses using default settings.
internal/search/parser.go:231
↓ 52 callers
Method
ActivateGeneration
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 callers
Method
Parse
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 callers
Method
Upsert
(ctx context.Context, gen GenerationID, chunks []Chunk)
internal/vector/backend.go:168
↓ 50 callers
Method
Body
Body sets the message body text.
internal/testutil/email/builder.go:78
↓ 50 callers
Method
Skip
(args ...any)
internal/testutil/tbmock/mock_tb.go:50
↓ 49 callers
Method
AddAccountIdentity
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 callers
Method
DatabaseDSN
DatabaseDSN returns the database connection string or file path.
internal/config/config.go:391
↓ 48 callers
Method
FusedSearch
(ctx context.Context, req FusedRequest)
internal/vector/backend.go:209
↓ 47 callers
Method
Next
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 callers
Method
ReplaceMessageRecipients
ReplaceMessageRecipients replaces all recipients for a message atomically.
internal/store/messages.go:434
↓ 47 callers
Method
Subject
Subject sets the Subject header. Use NoSubject() to omit it entirely.
internal/testutil/email/builder.go:62
↓ 47 callers
Function
applyAggregateKey
applyAggregateKey sends a key through handleAggregateKeys and returns the concrete Model.
internal/tui/setup_test.go:625
↓ 46 callers
Function
assertSummary
assertSummary checks SyncSummary fields against expected values. Only non-nil fields in want are checked.
internal/sync/testenv_test.go:134
↓ 44 callers
Method
AddMessage
AddMessage adds a message to the mock store.
internal/gmail/mock.go:297
↓ 44 callers
Method
Close
Close releases any resources held by the engine.
internal/query/engine.go:83
↓ 44 callers
Function
keyEnter
keyEnter returns a KeyMsg for the Enter key.
internal/tui/setup_test.go:514
↓ 44 callers
Function
newParquetEngine
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 callers
Function
NewMessage
NewMessage creates a MessageBuilder with sensible defaults.
internal/testutil/email/builder.go:36
↓ 43 callers
Method
StartSync
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 callers
Method
EnsureConversation
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 callers
Function
attr
(start xml.StartElement, name string)
internal/synctechsms/parser.go:270
↓ 42 callers
Function
runFullSync
runFullSync runs a full sync and fails the test on error.
internal/sync/testenv_test.go:99
↓ 41 callers
Method
AddParticipant
AddParticipant adds a participant and returns its ID.
internal/query/testfixtures_test.go:142
↓ 41 callers
Function
makeMessages
makeMessages creates n MessageSummary values with sequential IDs and subjects.
internal/tui/setup_test.go:576
↓ 40 callers
Function
NewWorker
NewWorker constructs a Worker, applying defaults for BatchSize (32), StaleThreshold (auto-derived; see derivedStaleThreshold), MaxConsecutiveFailures
internal/vector/embed/worker.go:103
↓ 40 callers
Method
Search
(ctx context.Context, gen GenerationID, queryVec []float32, k int, filter Filter)
internal/vector/backend.go:169
↓ 40 callers
Function
testLogger
testLogger returns a logger for tests that discards output.
internal/api/server_test.go:21
↓ 39 callers
Function
newBackendForTest
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 callers
Method
After
(d time.Duration)
internal/gmail/ratelimit.go:12
↓ 38 callers
Method
ListAccountIdentities
ListAccountIdentities returns all identities for one source, ordered by address.
internal/store/account_identities.go:171
↓ 38 callers
Function
buildCache
(dbPath, analyticsDir string, fullRebuild bool)
cmd/msgvault/cmd/build_cache.go:124
↓ 37 callers
Function
usageErr
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 callers
Method
From
From sets the From header.
internal/testutil/email/builder.go:50
next →
1–100 of 5,225, ranked by callers