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
↓ 16 callers
Method
PurgeWorkspaceData
PurgeWorkspaceData hard-deletes every child row of a soft-deleted workspace and the workspace row itself, in a single transaction. Blob bytes are NOT
internal/store/workspace_purge.go:253
↓ 16 callers
Function
Resolve
Resolve returns the zone for a stored users.timezone value. Nil, empty or a value that no longer loads is UTC with Set=false.
internal/usertz/usertz.go:41
↓ 16 callers
Method
Save
Save writes the persisted Pad config to disk.
internal/config/config.go:695
↓ 16 callers
Method
SendConversationMessage
SendConversationMessage appends a message and returns it. The seq comes from conversations.last_seq under that row's lock, in the same statement that
internal/store/conversations.go:223
↓ 16 callers
Method
SetAttachments
SetAttachments wires the attachment storage Registry that the upload and download handlers use. Pass maxBytes = 0 to keep the defaultAttachmentMaxByte
internal/server/server.go:1329
↓ 16 callers
Method
SubscribeAndReplaySince
SubscribeAndReplaySince atomically checks the per-workspace limit, registers the subscriber, and captures the buffered events above sinceID — all in O
internal/events/bus.go:277
↓ 16 callers
Method
UpdateSchedule
UpdateSchedule applies a partial update. It returns (nil, nil) when the item has no schedule. A timing edit (dtstart, tz, floating, rrule, rdates, ex
internal/store/schedules.go:718
↓ 16 callers
Function
ValidWorkerID
ValidWorkerID reports whether s is a well-formed worker id. The shape is strict (lowercase hex only), which is also what lets the column skip the NUL
internal/models/lease_worker.go:18
↓ 16 callers
Method
acquire
acquire reserves one stream slot for a PRINCIPAL. The returned release MUST be called when the connection ends; it is idempotent so a handler can defe
internal/server/stream_admission.go:107
↓ 16 callers
Function
appOAuthServer
appOAuthServer is an OAuth server that also knows the app API resource. cloud=true makes both MCP and apps available; cloud=false is a self-host with
internal/server/task3394_install_tokens_test.go:27
↓ 16 callers
Method
archiveSource
()
internal/server/item_moved_to_test.go:108
↓ 16 callers
Function
bundleScheduleIDs
bundleScheduleIDs maps item title to source schedule id in a bundle.
internal/store/schedule_link_carry_test.go:84
↓ 16 callers
Function
compileScheduleSpec
compileScheduleSpec is the ONLY door a schedule's timing text goes through, called by CreateSchedule and UpdateSchedule, so no caller can store a rule
internal/store/schedules.go:130
↓ 16 callers
Function
contentFrame
contentFrame is a content-bearing Update frame, distinct per n.
internal/server/materialize_recovery_test.go:176
↓ 16 callers
Function
countItemsIn
(t *testing.T, s *Store, workspaceID string)
internal/store/items_cross_workspace_copy_test.go:106
↓ 16 callers
Method
cycledCount
()
internal/events/observer_test.go:95
↓ 16 callers
Function
fetchTestCalendarFeed
(s *Server, token string)
internal/server/handlers_calendar_feeds_test.go:47
↓ 16 callers
Function
fullVersion
()
cmd/pad/main.go:37
↓ 16 callers
Function
itemRefOrSlug
itemRefOrSlug formats an item's issue ref (e.g. "TASK-5") when its collection prefix + item number are populated, falling back to its slug. Avoids pul
internal/server/handlers_items_open_children_guard.go:100
↓ 16 callers
Method
journal
(t *testing.T, scheduleID string)
internal/store/commitment_c1_test.go:68
↓ 16 callers
Function
linkTime
(t *testing.T, s string)
internal/schedule/links_test.go:13
↓ 16 callers
Function
liveGen
--- reconciliation on the receive path --------------------------------- liveGen subscribes the workspace and returns the generation a real receive lo
internal/events/redis_idspace_test.go:263
↓ 16 callers
Method
mk
mk creates a schedule on a fresh item, armed from created.
internal/store/schedule_resolve_test.go:26
↓ 16 callers
Function
mount
(browser = 'Asia/Tokyo')
web/src/lib/components/TimezoneSync.svelte.test.ts:24
↓ 16 callers
Function
mount
(extra: Extension[] = [])
web/src/lib/components/editor/codeBlockCopy.svelte.test.ts:77
↓ 16 callers
Function
moveSchedule
(t *testing.T, f *schedFixture, kind string, lead int, rule string)
internal/store/commitment_move_test.go:16
↓ 16 callers
Function
mustSeedWorkspaceWithRole
mustSeedWorkspaceWithRole is a test helper that creates a workspace + adds the user as a member with the given role. Centralized here because TASK-952
internal/server/handlers_oauth_test.go:1901
↓ 16 callers
Function
newEmptyStore
()
internal/cli/credentials.go:312
↓ 16 callers
Function
newTestRequest
newTestRequest builds an OAuthRequest with sensible defaults; tests override fields they care about. signature uniqueness is the caller's responsibili
internal/store/oauth_test.go:53
↓ 16 callers
Method
overdueSchedule
(t *testing.T, title, behavior string)
internal/store/schedule_deadline_eval_test.go:52
↓ 16 callers
Method
preview
(t *testing.T)
internal/server/handlers_apps_install_test.go:152
↓ 16 callers
Method
previewUpgrade
(t *testing.T)
internal/server/handlers_apps_upgrade_test.go:35
↓ 16 callers
Method
process
(itemID string)
internal/server/materialize_recovery.go:426
↓ 16 callers
Function
requireRole
requireRole checks if the user's workspace role meets the minimum required level. Role hierarchy: owner > editor > viewer.
internal/server/middleware_auth.go:965
↓ 16 callers
Method
runOrphanGCSweep
runOrphanGCSweep walks the orphaned-attachments query and reclaims rows past the grace period. Two reclamation paths: - DB row only. content_hash is
internal/server/orphan_gc.go:78
↓ 16 callers
Method
scheduleFuture
scheduleFuture creates the source's schedule as of the copy instant, so its outstanding occurrence is still ahead (nothing due to catch up).
internal/store/schedule_copy_test.go:68
↓ 16 callers
Method
send
(body: unknown)
web/src/lib/api/importUpload.test.ts:23
↓ 16 callers
Method
setStatus
(t *testing.T, it *models.Item, status string)
internal/store/milestone_test.go:49
↓ 16 callers
Function
setupLeaseFixture
(t *testing.T)
internal/server/handlers_item_lease_test.go:28
↓ 16 callers
Function
suiteFixture
()
web/e2e/fixtures.ts:68
↓ 16 callers
Function
task3394Fixture
(t *testing.T, installID string)
internal/store/task3394_install_clients_test.go:34
↓ 16 callers
Method
ts
(ago time.Duration)
internal/server/task3939b_push_fixture_test.go:145
↓ 16 callers
Function
writeRootStructuredError
writeRootStructuredError adds the machine-readable marker line for the refusals ANY command can receive, which no per-command writer can own (BUG-3147
cmd/pad/main.go:83
↓ 16 callers
Function
writeScheduleBodyError
(w http.ResponseWriter)
internal/server/handlers_schedules.go:140
↓ 15 callers
Method
AckReminder
(workspaceID, id string)
internal/store/reminder_commitment.go:183
↓ 15 callers
Method
Add
Add implements SessionPresence.
internal/server/session_presence.go:369
↓ 15 callers
Method
BackfillOAuthConnections
BackfillOAuthConnections walks every distinct grant chain found in oauth_access_tokens and oauth_refresh_tokens, parses the newest chain row's session
internal/store/oauth_connections_backfill.go:93
↓ 15 callers
Method
ClaimPendingOutboxEvents
ClaimPendingOutboxEvents claims up to limit pending events for one drain pass and returns them, oldest first. WHY A CLAIM AT ALL. Pad Cloud runs N in
internal/store/event_outbox.go:2031
↓ 15 callers
Method
CopyItem
CopyItem performs the MUTATING cross-workspace copy. NEVER RETRY THIS CALL (DR-13) outside the one keyed retry it makes itself. See the file header f
internal/cli/client_items_copy.go:335
↓ 15 callers
Method
CreateComment
(wsSlug, itemSlug string, input models.CommentCreate)
internal/cli/client.go:1183
↓ 15 callers
Method
DeleteComment
DeleteComment deletes a comment and emits the ref-only comment.deleted event in the same transaction (SPEC-3 v1.4 / TASK-2658). A comment with no rep
internal/store/comments.go:529
↓ 15 callers
Method
DeleteConversationMessage
DeleteConversationMessage tombstones an authorized member's message while retaining its row and sequence, including on repeated deletes (TASK-4038).
internal/store/conversations.go:596
↓ 15 callers
Method
DeliverEvent
DeliverEvent puts one canonical event on the wire SYNCHRONOUSLY and reports what happened to each matching endpoint. This exists because acking is on
internal/webhooks/dispatcher.go:454
↓ 15 callers
Method
DisableUserAndRevokeAccess
DisableUserAndRevokeAccess disables the account and ends every credential it holds, in one transaction (BUG-3349): sessions, API tokens, and OAuth (MC
internal/store/users.go:1190
↓ 15 callers
Method
Dispatch
Dispatch runs `<Binary> <cmdPath...> <cliArgs...>` and packages the output for an MCP client.
internal/mcp/dispatch.go:127
↓ 15 callers
Method
Evaluate
Evaluate asks the named set about the item, unless answers for its current state are already stored. It reports whether the provider was called.
internal/decision/runner.go:576
↓ 15 callers
Method
ForceRefreshRoom
ForceRefreshRoom makes items.content the canonical source for an item's collab state: it runs `commit` under the per-item lock (so the caller can atom
internal/collab/manager.go:1221
↓ 15 callers
Method
GetComment
GetComment returns a single comment by ID.
internal/store/comments.go:322
↓ 15 callers
Method
GetInvitationByCode
GetInvitationByCode retrieves a pending invitation by its join code. Looks up by SHA-256 hash first (new invitations), then falls back to plaintext lo
internal/store/workspace_members.go:1448
↓ 15 callers
Method
GetParentForItem
GetParentForItem returns the parent link for an item, or nil if it has no parent. A parent link pointing to a soft-deleted item, or to an item in a so
internal/store/items.go:4967
↓ 15 callers
Method
InsertItemDecisions
InsertItemDecisions stores one evaluation's answers in one transaction. A row already present for the same (item, set, key, state) is kept, not replac
internal/store/decisions.go:755
↓ 15 callers
Function
IsDBBusy
Two classes of "the database was busy or interrupted the work" (TASK-4278), kept apart because they promise different things to the caller. IsDBBusy:
internal/store/busy_error.go:38
↓ 15 callers
Method
ListConversationMessages
ListConversationMessages returns a window of messages in ascending seq order, tombstones included. With neither cursor it is the newest limit messages
internal/store/conversations.go:512
↓ 15 callers
Function
LookupMIME
LookupMIME returns the entry for a MIME type if it is on the allowlist, or (zero, false) if rejected.
internal/attachments/mime.go:147
↓ 15 callers
Function
NewFetcher
NewFetcher returns a Fetcher with production defaults applied.
internal/urlimport/fetch.go:95
↓ 15 callers
Function
NewServer
NewServer constructs an OAuth 2.1 authorization server backed by fosite v0.49.0. Compliance posture (PLAN-943 TASK-951): - PKCE required (S256 only)
internal/oauth/server.go:154
↓ 15 callers
Function
NewServer
NewServer constructs a pad MCP server. Call Run(ctx) to start it. The returned Server is wired with tool capabilities advertised but no tools registe
internal/mcp/server.go:58
↓ 15 callers
Function
NormalizeMIME
NormalizeMIME strips parameters and lowercases the type/subtype. We match strictly against the allowlist after normalization so callers can pass an ht
internal/attachments/mime.go:201
↓ 15 callers
Method
OpenWorkspaceTab
OpenWorkspaceTab adds a workspace to the user's open set. - Already open: a durable open pins an ephemeral tab (PLAN-3002 Q9); an ephemeral open of a
internal/store/workspace_tabs.go:188
↓ 15 callers
Method
RearmReminder
RearmReminder retimes and rearms even an unchanged or already-passed target.
internal/store/reminder_commitment.go:129
↓ 15 callers
Method
SetUserTimezoneIfUnset
SetUserTimezoneIfUnset sets users.timezone to tz only while it is NULL, as one atomic UPDATE, so a browser's first-sign-in default can never overwrite
internal/store/users.go:320
↓ 15 callers
Method
StarItem
StarItem stars an item for a user. Idempotent — re-starring is a no-op.
internal/store/item_stars.go:13
↓ 15 callers
Function
TerminalValuesForDoneField
TerminalValuesForDoneField returns the resolved done-field key and the list of terminal values for that field. If the resolved field has no terminal_o
internal/models/terminal.go:83
↓ 15 callers
Method
UpdateComment
UpdateComment edits a comment as its own author. Production does not use it: the edit handler calls UpdateCommentAs with the request's actor, so a men
internal/store/comments.go:199
↓ 15 callers
Method
ValidatePassword
ValidatePassword checks an email/password combination. Returns the user if valid, nil if the credentials are wrong (not an error).
internal/store/users.go:342
↓ 15 callers
Method
WorkspaceFlags
WorkspaceFlags returns, for every item in the workspace, the question keys in the named set whose latest answer is a Noul at or above threshold AND is
internal/decision/attention.go:188
↓ 15 callers
Function
armStateTestEnv
armStateTestEnv points HOME (and thus ~/.pad/sessions) at a temp dir and sets the messaging socket env to socket ("" for the headless case), then chdi
internal/cli/session_arm_state_test.go:17
↓ 15 callers
Method
bearerHeaders
()
internal/server/handlers_grant_visibility_test.go:104
↓ 15 callers
Function
build
(uuid: string, variant?: string)
web/src/lib/utils/markdown.shareAttachments.test.ts:173
↓ 15 callers
Function
capture
capture routes the default logger through SetupWriter, the production handler, and returns the buffer it writes to.
internal/logging/redaction_followups_test.go:32
↓ 15 callers
Function
clearDecisionEnv
(t *testing.T)
internal/server/decision_settings_test.go:36
↓ 15 callers
Function
commitmentBase
--- Item schedules and the agenda --- Each method returns the server's body as raw JSON so a field the server adds later is not dropped on the way to
internal/cli/client_schedule.go:14
↓ 15 callers
Method
connect
()
web/src/lib/collab/wsProvider.svelte.ts:822
↓ 15 callers
Function
create
(c creator)
internal/appstore/testdata/ifacecall/x.go:18
↓ 15 callers
Method
cycleIfIdle
cycleIfIdle ends this instance's coverage and replaces its subscription when nothing has arrived for the idle timeout. DROP-AND-CYCLE, NOT DROP ALONE
internal/watchevents/heartbeat.go:299
↓ 15 callers
Function
decodePayload
decodePayload parses the "<epoch>|<id>|<json>" wire form publishScript emits, and ALSO accepts a bare JSON body with no prefix. THE BARE FORM IS NOT
internal/events/redis_bus.go:2597
↓ 15 callers
Method
decrypt
decrypt decrypts a value that was encrypted with encrypt(). If the value doesn't have the "enc:" prefix, it's treated as plaintext (backward compatibi
internal/store/encryption.go:63
↓ 15 callers
Function
delegatedAPIFixture
delegatedAPIFixture is the U6 app world (a companion, a system and a private collection, an app item, a person's comment) with a PERSON signed in thro
internal/server/task3399b_delegated_api_test.go:29
↓ 15 callers
Method
deleteDoomed
(t *testing.T)
internal/store/bug3425_deleted_collection_reads_test.go:36
↓ 15 callers
Function
doRequestWithHeadersFromAddr
doRequestWithHeadersFromAddr lets us combine arbitrary headers with a non-loopback remote-addr. Existing helpers cover one or the other but not both.
internal/server/handlers_auth_bootstrap_token_test.go:56
↓ 15 callers
Function
downloadAs
downloadAs issues GET or HEAD on the blob endpoint as a specific user + workspace role, bypassing the auth middleware the same way deleteAsUser does.
internal/server/handlers_attachments_download_authz_test.go:158
↓ 15 callers
Function
fetch
()
web/src/lib/api/changesWalk.test.ts:77
↓ 15 callers
Function
fetchTimelineAuthed
fetchTimelineAuthed is fetchTimeline with a session, since these tests run on an instance that has an owner and therefore requires auth.
internal/server/handlers_activity_debounce_actor_test.go:237
↓ 15 callers
Function
groupCreate
(t *testing.T, s *Server, u *models.User, name string, ids ...string)
internal/server/handlers_workspace_groups_test.go:59
↓ 15 callers
Function
ids
(ns []Notification)
internal/store/task3939_push_dispatch_test.go:50
↓ 15 callers
Function
intParam
intParam is numericInput on input[key], with the parameter named in the error (BUG-4061).
internal/mcp/dispatch_http_routes.go:2073
↓ 15 callers
Method
matches
True when `key` names the live view. A null key never matches.
web/src/lib/attachments/viewFence.ts:92
↓ 15 callers
Function
mcpEnabledTestServer
mcpEnabledTestServer builds a Server with cloud mode + a stub streamable-HTTP transport so tests targeting auth / discovery / routing don't need to dr
internal/server/handlers_mcp_test.go:480
↓ 15 callers
Function
moveEntries
(t *testing.T, f *schedFixture, id string)
internal/store/commitment_move_test.go:25
↓ 15 callers
Function
mustCreateUser
(t *testing.T, srv *Server, email, name, role string)
internal/server/token_workspace_consent_scope_test.go:47
← previous
next →
901–1,000 of 28,840, ranked by callers