Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
28,840 in github.com/PerpetualSoftware/pad
⨍
Functions
28,840
◇
Types & classes
3,245
↓ 6 callers
Function
scanItems
(rows *sql.Rows)
internal/store/items.go:6962
↓ 6 callers
Function
scanRequestBody
scanRequestBody reads the whole body once. A body that is not exactly one well-formed JSON value reports nothing: the caller's own decode reports the
internal/server/middleware_request_text.go:542
↓ 6 callers
Function
scanSchedule
(row interface{ Scan(...any) error })
internal/store/schedules.go:365
↓ 6 callers
Function
scanUser
scanUser scans a user row into a User struct. The TOTP secret column is read and discarded: the User struct does not carry it, so no ordinary read can
internal/store/users.go:38
↓ 6 callers
Function
schema
(options: string[])
web/e2e/bug-3043-lane-draft-rehome.spec.ts:31
↓ 6 callers
Function
searchOne
TASK-4514: matched_in and the snippet choice come from per-column match flags computed in SQL, not from "<mark>" appearing in the snippet text, so sto
internal/store/search_matched_in_test.go:15
↓ 6 callers
Function
seedBackfillWorkspace
(t *testing.T, s *Store, name, ownerID string)
internal/store/oauth_connections_backfill_test.go:52
↓ 6 callers
Function
seedOrphanImage
seedOrphanImage creates an UNATTACHED image original uploaded by uploader, plus its thumb-md variant (unattached too, as upload leaves them), and retu
internal/server/handlers_attachments_attach_test.go:53
↓ 6 callers
Function
seedParentAndChild
(t *testing.T, srv *Server, slug string)
internal/server/handlers_items_parent_ambiguity_test.go:21
↓ 6 callers
Function
seedVersionedItem
seedVersionedItem creates an item and edits it n times, producing n+1 versions' worth of history (the create plus each content change). Edits go thro
internal/server/handlers_item_versions_bounds_test.go:39
↓ 6 callers
Function
selectSortItem
(t *testing.T, s *Store, wsID, colID, title, field, value string)
internal/store/bug4400_select_sort_test.go:38
↓ 6 callers
Method
send
* Send `body`. The bubble is shown at once; the outcome says what the caller * should do (see SendOutcome). Nothing is sent for a draft the server w
web/src/lib/stores/chatThread.svelte.ts:413
↓ 6 callers
Method
seq
(t *testing.T)
internal/server/handlers_items_bug3133_pending_guard_test.go:57
↓ 6 callers
Function
serverTrimmedTitle
(title: string)
web/src/lib/items/titleLimit.ts:35
↓ 6 callers
Method
sessionKey
sessionKey is the per-session entry: one key, one TTL, one owner.
internal/server/session_presence_redis.go:362
↓ 6 callers
Function
setAsideOne
(t *testing.T, s *store.Store, itemID string)
internal/store/bug3244_set_aside_test.go:30
↓ 6 callers
Function
setSurface
(path: string | null, state: Record<string, unknown>)
web/src/lib/stores/chatSurface.svelte.test.ts:668
↓ 6 callers
Function
settle
()
web/src/routes/(console)/needs/needsPage.svelte.test.ts:70
↓ 6 callers
Function
setupEnsureWorkspaceTest
setupEnsureWorkspaceTest produces a clean tempdir, points HOME at a tempdir (so credential/config writes don't leak), chdirs into the project so cli.D
cmd/pad/init_test.go:20
↓ 6 callers
Function
showCmd
--- show ---
cmd/pad/cmd_item.go:793
↓ 6 callers
Method
sleep
(_ context.Context, d time.Duration)
internal/materialize/supervisor_test.go:271
↓ 6 callers
Function
sniffEBMLDocType
sniffEBMLDocType returns the MIME for an EBML file by READING ITS DOCTYPE ELEMENT, not by searching for a string. The mimesniff table maps the bare E
internal/attachments/mime_magic.go:211
↓ 6 callers
Function
splitOnUnescapedPipe
splitOnUnescapedPipe scans `body` for the first `|` that isn't preceded by an unescaped `\`, splitting the body into (key, display, found). Mirrors sp
internal/links/extract.go:628
↓ 6 callers
Function
stalledStreamServer
BUG-3637: a client that connects to an event stream and then stops reading must not pin its handler. Once the socket buffers fill, a frame write block
internal/server/bug3637_sse_stalled_reader_test.go:33
↓ 6 callers
Function
stamp
* The server time to vouch for a full reload with. Take it BEFORE the reload * reads, and hand it to `markSynced` once they succeed (BUG-3207). *
web/src/lib/services/sync.svelte.ts:355
↓ 6 callers
Method
startMCPSessionTracker
startMCPSessionTracker constructs the tracker + spawns the sweep goroutine. Called once at startup from SetMCPTransport (alongside startMCPAuditWriter
internal/server/middleware_mcp_session.go:225
↓ 6 callers
Function
statIdentity
statIdentity returns the inode and device of a stat'd file on unix, which together identify a specific filesystem node — a recreated node at the same
internal/cli/stat_identity_unix.go:15
↓ 6 callers
Function
state
(s string)
cmd/pad/bug3476_import_watch_test.go:87
↓ 6 callers
Method
stopPresence
()
web/src/lib/stores/chatInbox.svelte.ts:187
↓ 6 callers
Function
storage
()
web/src/lib/items/refusedRawDraft.ts:83
↓ 6 callers
Function
storedOffset
(o schedule.Offset)
internal/store/commitment_links.go:170
↓ 6 callers
Function
streamWatchEventsTo
(w io.Writer, resp *http.Response, lastEventID string, sinks ...chatSink)
cmd/pad/cmd_watch.go:711
↓ 6 callers
Function
stripV2
(b *models.WorkspaceExport)
internal/store/commitment_bundle_v2_test.go:75
↓ 6 callers
Method
syncAppItemActionsTx
syncAppItemActionsTx makes the install's action rows match specs, on the caller's transaction (provisioning, upgrade, the backfill), which holds the i
internal/store/app_item_actions.go:91
↓ 6 callers
Method
take
()
cmd/pad/chatgpt_catalog_test.go:90
↓ 6 callers
Function
task3392Install
(t *testing.T, s *Store, workspaceID, installID, state string)
internal/store/task3392_bot_principal_test.go:463
↓ 6 callers
Function
task3392Member
(t *testing.T, s *Store, workspaceID, botID, role string)
internal/store/task3392_bot_principal_test.go:68
↓ 6 callers
Function
task3397LifecycleFix
(t *testing.T, installID string)
internal/store/task3397_lifecycle_test.go:101
↓ 6 callers
Function
task4105FixtureFor
TASK-4105: schedules and the agenda on pad_item. Every action rides the `pad item remind` CLI on stdio and a route on /mcp. task4105FixtureFor adjusts
internal/mcp/task4105_schedule_test.go:27
↓ 6 callers
Function
testOverride
(key string)
internal/store/commitment_bundle_v2_test.go:57
↓ 6 callers
Function
tlsServerFor
tlsServerFor starts a TLS listener whose certificate is valid for the given names, and returns its address plus a config that trusts it.
internal/redisdial/redisdial_test.go:22
↓ 6 callers
Method
token
(u *models.User)
internal/server/workspace_access_notify_test.go:56
↓ 6 callers
Function
toolsCall
BUG-3217. mcp-go decodes a tool call's arguments with a plain json.Unmarshal, so a `fields` number reached the dispatcher as a float64: 90071992547409
internal/mcp/bug3217_fields_number_literals_test.go:23
↓ 6 callers
Function
tracePGConnected
Duplicated from storetest.TracePGConnected: storetest imports store, so these white-box tests cannot import it. Keep the gate and marker format in syn
internal/store/pgtrace_test.go:11
↓ 6 callers
Method
trackMCPSession
(reqHeader, respHeader func(string) string, method string, httpStatus int)
internal/server/middleware_mcp_session.go:300
↓ 6 callers
Function
tzStub
(zone string, hits *int)
cmd/pad/task4101_timezone_test.go:85
↓ 6 callers
Function
unescapeWikiBody
unescapeWikiBody undoes the editor's body-escape sequences: `\]` → `]`, `\|` → `|`, `\\` → `\`. Other backslash sequences are left as-is (the renderer
internal/links/extract.go:647
↓ 6 callers
Function
unsealChatRecords
()
web/src/lib/chat/chatRecords.ts:106
↓ 6 callers
Method
update
(t *testing.T, itemID, body, actor, source string)
internal/store/plan2348_u2_versions_test.go:38
↓ 6 callers
Function
uploadChannels
uploadChannels drives the real route (no users exist in these tests, so RequireWorkspaceAccess grants implicit owner) with independent control over th
internal/server/handlers_attachments_test.go:393
↓ 6 callers
Function
uploadEncodedName
uploadEncodedName uploads body under an RFC 5987 encoded filename. That is the reachable spelling for these bytes: Go's multipart reader refuses a raw
internal/server/handlers_attachments_bug2818_test.go:33
↓ 6 callers
Method
validateSessionCookie
validateSessionCookie validates a session cookie and returns the user if valid, nil otherwise. A User-Agent change is logged but NOT rejected — this m
internal/server/handlers_auth.go:301
↓ 6 callers
Function
variantRow
variantRow looks up a derived variant of parentID. GetAttachmentVariant is workspace-scoped (PLAN-2391 DR-16), so the scope is read back off the paren
internal/server/handlers_attachments_thumbnails_test.go:28
↓ 6 callers
Function
verifyIdentityTranscript
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_server_identity_test.go:43
↓ 6 callers
Function
waitForAuditRows
waitForAuditRows polls ListMCPAuditByUser until we see the expected count or the deadline expires. The middleware writes async via a buffered channel
internal/server/middleware_mcp_audit_test.go:77
↓ 6 callers
Function
walk
(cur, root *cobra.Command, doc *Document, depth, maxDepth int)
internal/cmdhelp/json.go:111
↓ 6 callers
Function
watchEventPayloadFor
watchEventPayloadFor builds a Notification's wire payload. Its "workspace" is the slug (DOC-2479's payload carries a human-facing "workspace", matchin
internal/server/handlers_watch_events.go:958
↓ 6 callers
Function
whoamiCmd
()
cmd/pad/cmd_auth.go:924
↓ 6 callers
Function
wikiLinksToMarkdown
(content: string, items: Item[], workspaceSlug: string, username?: string)
web/src/lib/utils/markdown.ts:890
↓ 6 callers
Function
withLocalFetcher
withLocalFetcher replaces the package-level fetcher with one that allows loopback dials so httptest.NewServer addresses (127.0.0.1) can be reached. Re
internal/server/handlers_import_test.go:17
↓ 6 callers
Method
workspaceLimitMintOpts
workspaceLimitMintOpts is the option set for a workspace-scoped limited insert (items, members, webhooks): the limit applies in cloud mode only, the s
internal/server/handlers_cloud.go:1680
↓ 6 callers
Function
writeBootstrapToken
writeBootstrapToken drops a token file at <dataDir>/.bootstrap-token in the same shape EnsureBootstrapToken would produce — token + trailing newline,
internal/cli/bootstrap_test.go:52
↓ 6 callers
Function
writeCredStore
(t *testing.T, home, serverURL, token string)
cmd/pad/env_token_override_test.go:33
↓ 6 callers
Function
writeSkillFile
(t *testing.T, project, content string)
cmd/pad/bug3466_skill_overwrite_test.go:34
↓ 6 callers
Function
writeStoreErrorBusyAs
writeStoreErrorBusyAs is writeStoreErrorR for the paths where the default busy wording would be untrue: a step that runs AFTER the main write committe
internal/server/server.go:3136
↓ 6 callers
Function
writeTokenWorkspaceDeniedFor
writeTokenWorkspaceDeniedFor writes the 403 for a token refused a workspace. A pinned token gets the pin reason, naming its workspace and how to mint
internal/server/pinned_token.go:154
↓ 6 callers
Method
writeTypedItemRefusal
writeTypedItemRefusal writes the structured refusal for any of the four typed, permanent failures store.UpdateItem can return, and reports whether it
internal/server/handlers_items_content_route.go:505
↓ 5 callers
Method
#run
()
web/src/lib/stores/chat.svelte.ts:186
↓ 5 callers
Method
AcquireParentChildrenLocks
AcquireParentChildrenLocks is the CANONICAL helper for taking `pad:parent-children:<id>` advisory locks. Every call site that needs to serialize again
internal/store/items.go:5765
↓ 5 callers
Method
AddOAuthProvider
AddOAuthProvider adds a provider to the user's oauth_providers list. No-op if the provider is already linked. It takes the account lock, like every pr
internal/store/users.go:869
↓ 5 callers
Method
AppAPIAudience
AppAPIAudience returns the configured app API resource, or "".
internal/store/install_clients.go:177
↓ 5 callers
Function
ApplyWorkspaceContext
(raw string, context *WorkspaceContext)
internal/models/workspace_settings.go:99
↓ 5 callers
Method
AttachmentReferenced
AttachmentReferenced returns true when anything in the workspace mentions "pad-attachment:<id>" — either a live item's content/fields JSON or a commen
internal/store/attachments.go:1427
↓ 5 callers
Method
BackfillSelfHostedPlans
BackfillSelfHostedPlans is the non-cloud boot's plan conversion: free and empty plans become `self-hosted` (unlimited). On a cloud-owned database it w
internal/store/instance_mode.go:108
↓ 5 callers
Method
BackfillYjsContentBearing
BackfillYjsContentBearing classifies every op-log row whose content_hash IS NULL: rows written before migration 091, and the step2/update rows migrati
internal/store/yjs_content_bearing.go:239
↓ 5 callers
Function
Blocked
Blocked reports whether ip is in a private, reserved or otherwise non-public range that a server-side fetch must never connect to. The stdlib predica
internal/netpolicy/netpolicy.go:28
↓ 5 callers
Method
BootstrapAgenda
BootstrapAgenda reads the caller's agenda for the bootstrap: for each open schedule the caller receives (the item's assignee, else its creator) whose
internal/store/schedule_bootstrap.go:71
↓ 5 callers
Method
BootstrapIncludeForKey
BootstrapIncludeForKey returns the declaration feeding the named bootstrap payload, or nil when this collection feeds no such payload.
internal/models/collection_traits.go:134
↓ 5 callers
Function
Box
(props)
plugin/hooks/register.js:518
↓ 5 callers
Function
BuildAppEventDTO
BuildAppEventDTO builds the app body for one outbox event and returns it with the companion collection its visibility is decided by. It reads the stor
internal/store/app_event_dto.go:105
↓ 5 callers
Function
BuildItemState
BuildItemState builds an item's state from its row and trail. ONE SERIALISATION PATH: the bytes returned are both hashed and sent. The runner passes
internal/decision/runner.go:281
↓ 5 callers
Function
CapabilityLine
CapabilityLine returns the single-line capability bit a conforming CLI emits in response to `<cmd> help --capabilities` (or the `--cmdhelp-capabilitie
internal/cmdhelp/json.go:27
↓ 5 callers
Method
CloseWorkspaceTab
CloseWorkspaceTab removes a workspace from the user's open set. Closing a tab that is not open is not an error. It takes the per-user lock like every
internal/store/workspace_tabs.go:279
↓ 5 callers
Function
CommitmentKind
CommitmentKind is a display label derived from roles, with deadline first.
internal/schedule/commitment_flags.go:160
↓ 5 callers
Method
CompleteIdempotencyKeyTx
CompleteIdempotencyKeyTx records the answer inside the write's own transaction. It fails, rolling the write back, unless this token still holds the cl
internal/store/idempotency.go:108
↓ 5 callers
Method
CountBillingAggregates
CountBillingAggregates returns the per-plan customer counts and the count of new "pro" signups since `since`. Implemented as two scalar SQL queries so
internal/store/users.go:756
↓ 5 callers
Method
CountLiveOAuthConnections
Counts for the console's MCP readiness panel (PLAN-2310 DR-7). Turning MCP off revokes nothing; these are what would start working again if it were tu
internal/store/mcp_resume.go:22
↓ 5 callers
Method
CountPendingContentRowsTx
CountPendingContentRowsTx counts the item's content-bearing op-log rows above its flush watermark, inside tx. Zero means content_state would read clea
internal/store/content_pending_guard.go:59
↓ 5 callers
Method
CreateCalendarFeed
(ctx context.Context, userID, layer string, ids []string, name string)
internal/store/calendar_feeds.go:42
↓ 5 callers
Method
CreateComment
CreateComment writes a comment on a companion item, in one FencedTx.
internal/appstore/comments.go:42
↓ 5 callers
Method
CreateSessionFenced
CreateSessionFenced is CreateSessionIssuedAt for a sign-in: it mints only if the account's credential_epoch still equals epoch, the value read when th
internal/store/sessions.go:95
↓ 5 callers
Method
Crop
Crop returns the rectangular sub-image bounded by `rect`. The rectangle is interpreted in the image's coordinate space (origin top-left) and intersect
internal/attachments/processor.go:55
↓ 5 callers
Method
DeleteAccountAtomicReportCtx
DeleteAccountAtomicReportCtx is DeleteAccountAtomicReport under ctx; see DeleteAccountAtomicCtx.
internal/store/users.go:1433
↓ 5 callers
Method
DeleteInvitation
DeleteInvitation removes a pending invitation.
internal/store/workspace_members.go:1520
↓ 5 callers
Method
DeleteUserSessionsAndRevokeCalendarFeeds
DeleteUserSessionsAndRevokeCalendarFeeds invalidates both bearer credentials atomically after password recovery, under the same user lock as creation.
internal/store/calendar_feeds.go:174
↓ 5 callers
Function
Detect
Detect classifies a fetched document by inspecting its Content-Type header and the leading bytes of its body. It returns TypeOpenAPI when the document
internal/urlimport/detect.go:33
↓ 5 callers
Method
DisableTOTP
DisableTOTP disables 2FA and clears the secret and recovery codes. It also clears the totp_last_step single-use watermark (BUG-2054) so it doesn't out
internal/store/users.go:2015
↓ 5 callers
Method
DismissEndedSchedule
DismissEndedSchedule records that an editor dismissed an ended schedule from Outstanding while its item stays open. The dismissal is shared, like an a
internal/store/schedule_end_dismiss.go:17
↓ 5 callers
Function
DocumentDecodesNULAnyShape
DocumentDecodesNULAnyShape is DocumentDecodesNUL widened to every JSON document shape a jsonb column accepts, scalars included. The store's write gua
internal/textguard/textguard.go:95
↓ 5 callers
Method
DropCarriedUniqueCollisionsQ
DropCarriedUniqueCollisionsQ removes from fields every CARRIED value that collides on a destination unique_scope field, and describes each removal (BU
internal/store/unique_fields.go:101
← previous
next →
2,801–2,900 of 28,840, ranked by callers