Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
31,685 in github.com/PerpetualSoftware/pad
⨍
Functions
31,685
◇
Types & classes
3,533
↓ 11 callers
Method
SetWriteDeadline
(time.Time)
internal/server/bug3821_write_deadline_test.go:421
↓ 11 callers
Method
Snapshot
(ctx context.Context, job materialize.Job)
internal/server/oplog_compaction.go:29
↓ 11 callers
Method
SnoozeNeedsItem
SnoozeNeedsItem records userID's dismissal or deferral of an item, replacing any earlier one. kind is models.NeedsSnoozeDismiss or models.NeedsSnoozeD
internal/store/needs_snooze.go:186
↓ 11 callers
Method
Spec
Spec returns the schedule as compiled, with the rule canonicalised.
internal/schedule/spec.go:119
↓ 11 callers
Method
SubscribeIfAllowed
SubscribeIfAllowed atomically checks the per-workspace limit and subscribes. See the EventBus interface for why there is no global limit here (BUG-272
internal/events/redis_bus.go:988
↓ 11 callers
Function
TokenScopesFromContext
TokenScopesFromContext returns the JSON-encoded scopes attached by WithTokenScopes, or "" if none. Empty maps to "unrestricted" in TokenScopeAllows (t
internal/server/context.go:109
↓ 11 callers
Method
UpdateCommitment
UpdateCommitment judges the stored timing and the partial roles request under one pin, then writes both or neither. Authority is HTTP's job.
internal/store/commitment.go:570
↓ 11 callers
Method
Validate
Validate runs the checks that need the schedule's Start. loc is the pinned zone, or nil for a floating schedule. It refuses an all-day schedule with a
internal/schedule/rule.go:397
↓ 11 callers
Function
WithEventBatch
WithEventBatch marks every canonical event this mutation emits as a member of the named batch. The caller mints the id per bulk OPERATION, not per it
internal/store/event_outbox.go:117
↓ 11 callers
Method
WorkspaceSubscriberCount
WorkspaceSubscriberCount returns the number of active subscribers for a specific workspace.
internal/events/bus.go:328
↓ 11 callers
Function
WriteWorkspaceLink
WriteWorkspaceLink writes a .pad.toml in the given directory. serverURL is the base URL of the Pad server hosting this workspace. Pass the empty stri
internal/cli/workspace.go:128
↓ 11 callers
Function
ackFixture
(t *testing.T, rule, anchor string)
internal/store/schedule_ack_test.go:17
↓ 11 callers
Function
ackInput
()
internal/store/schedule_ack_test.go:24
↓ 11 callers
Method
appStore
()
internal/server/app_api.go:121
↓ 11 callers
Method
appsAvailable
appsAvailable: Pad Cloud always; self-host only when an admin has enabled apps AND the server has an OAuth server with an https issuer, since every ap
internal/server/apps_available.go:18
↓ 11 callers
Function
bindableText
bindableText reports whether a decoded string can be bound into a text comparison. It is the shared predicate of both middlewares in this file: Valida
internal/server/middleware_request_text.go:201
↓ 11 callers
Method
bobSession
bobSession is a live session for bob; the plaintext is the cookie value.
internal/server/task3939b2b_notification_test.go:30
↓ 11 callers
Method
body
(c *cobra.Command)
cmd/pad/cmd_schedule_link.go:59
↓ 11 callers
Function
bug3626Owner
BUG-3626: an account export that runs out of time, or hits a store error, must never hand the user a file that parses as a complete export. "Leave Pad
internal/server/bug3626_account_export_test.go:22
↓ 11 callers
Function
buildHTMLShell
buildHTMLShell wraps body HTML in the standard transactional-email chrome — header (Pad wordmark) + body + footer note + (Cloud only) marketing footer
internal/email/shell.go:29
↓ 11 callers
Function
chatLastSeq
(t *testing.T, s *Store, convID string)
internal/store/conversations_test.go:49
↓ 11 callers
Function
connectSSE
connectSSE connects to the SSE endpoint on a real test server and returns a channel of parsed events. Cancel the context to disconnect.
internal/server/handlers_events_test.go:35
↓ 11 callers
Function
countsOf
countsOf returns the counts series of an agenda response as compact JSON, or "" when there is none.
internal/server/handlers_me_agenda_counts_test.go:16
↓ 11 callers
Function
createItemIn
(t *testing.T, srv *Server, wsSlug, collSlug, title string)
internal/server/collection_resolve_test.go:35
↓ 11 callers
Function
createWorkspaceAs
createWorkspaceAs drives the real create door through the router, so these legs exercise the handler rather than the helper in isolation.
internal/server/workspace_owner_compensation_test.go:59
↓ 11 callers
Method
currentPubSub
()
internal/watchevents/heartbeat_test.go:75
↓ 11 callers
Method
cwd
()
internal/mcp/install.go:633
↓ 11 callers
Function
deleteWorkspace
( fixture: SuiteFixture, request: APIRequestContext, slug: string )
web/e2e/lib/attachment-viewer.ts:561
↓ 11 callers
Method
dest
dest creates a destination item in ws and returns it.
internal/store/item_workspace_moves_test.go:37
↓ 11 callers
Function
diffFields
(oldFields, newFields string)
internal/server/handlers_documents.go:566
↓ 11 callers
Function
divergedState
()
cmd/pad/task3462_u3c_library_builtin_test.go:99
↓ 11 callers
Function
dropf
(field, code string)
internal/store/schedule_carry.go:81
↓ 11 callers
Function
editFixture
editFixture is a REAL item's shape — ref parts, seq, updated_at and fields — because a stub missing what real data always has hides the branch real us
cmd/pad/bug3035_edit_guard_test.go:28
↓ 11 callers
Function
emitInTx
emitInTx runs one production emitter inside a committed transaction.
internal/store/event_outbox_scrub_test.go:63
↓ 11 callers
Method
encode
()
internal/server/handlers_changes.go:47
↓ 11 callers
Function
gaugeValueOrZero
gaugeValueOrZero pulls the gauge value or returns 0 when the underlying metric hasn't been touched yet.
internal/server/middleware_mcp_metrics_test.go:222
↓ 11 callers
Function
getGraph
helper: fetch the workspace graph and return the parsed response
internal/server/handlers_graph_test.go:12
↓ 11 callers
Function
getNotif
TASK-3939 part B2b: the real-enqueue mention leg and the enrichment endpoint GET /me/notifications/{id}. getNotif asks for notification id as the hold
internal/server/task3939b2b_notification_test.go:25
↓ 11 callers
Method
headers
()
cmd/pad/bug3646_pad_toml_token_test.go:38
↓ 11 callers
Method
held
held asserts the item is hidden from u's active view and shown, with its not-mine, in the hidden view.
internal/server/handlers_needs_not_mine_test.go:50
↓ 11 callers
Function
isReadOnlyAction
isReadOnlyAction reports whether (toolName, action) performs no mutation. Defaults to false (write) for any pair not in the allowlist — the conservati
internal/mcp/tool_surface.go:241
↓ 11 callers
Function
isolateEnv
isolateEnv points Load at a fresh data dir and clears every variable Load reads, so an ambient PAD_* in the test runner's environment cannot leak in.
internal/config/save_env_test.go:72
↓ 11 callers
Function
item
(id: string, status: string)
web/src/mcp-app/board.test.ts:4
↓ 11 callers
Method
item
(t *testing.T, collectionID, title string)
internal/server/handlers_apps_delivery_test.go:70
↓ 11 callers
Method
lastPid
(t *testing.T)
internal/materialize/supervisor_test.go:370
↓ 11 callers
Function
leaseFixture
Tests for the item execution lease (#1221): an atomic claim/checkout so two pollers that both read "unclaimed" cannot both proceed. The conditional UP
internal/store/item_lease_test.go:15
↓ 11 callers
Function
linkGraph
(t *testing.T, edges []Edge)
internal/schedule/links_test.go:25
↓ 11 callers
Function
listTitles
BUG-3686: an item list with a search term (listItemsFTS) ignored include_archived and sort. (Its dropped offset was BUG-3704's.) BUG-3706: the tag fil
internal/store/bug3686_list_search_test.go:16
↓ 11 callers
Function
makeCollection
makeCollection creates a collection via the API so it goes through the same slug/prefix machinery production does.
internal/server/collection_resolve_test.go:26
↓ 11 callers
Function
makeTestImage
makeTestImage returns a freshly-allocated NRGBA image filled with a distinguishable pattern so transformation tests can assert on specific pixels. Wid
internal/attachments/processor_test.go:23
↓ 11 callers
Function
mapItemCreate
mapItemCreate translates an `item create` MCP call into a POST to api/v1/workspaces/{ws}/collections/{coll}/items. The MCP tool schema (auto-generate
internal/mcp/dispatch_http.go:867
↓ 11 callers
Function
mapItemList
(BUG-2001) The dispatcher used to mirror the CLI's hardcoded active-status allowlist here. That wrongly hid open items in collections with custom stat
internal/mcp/dispatch_http_routes.go:1629
↓ 11 callers
Function
matchBrace
(code: string, openIndex: number)
web/src/test/identityFenceSource.ts:177
↓ 11 callers
Function
mcpServer
(t *testing.T, cfg config.Config, env *bool)
internal/server/handlers_admin_mcp_test.go:28
↓ 11 callers
Function
mustLoad
(t *testing.T)
internal/config/save_env_test.go:102
↓ 11 callers
Function
mustLoc
(t *testing.T, name string)
internal/schedule/resolve_test.go:8
↓ 11 callers
Function
mustParseQueryFromPath
mustParseQueryFromPath extracts the query-string portion of path and parses it. Test-only — fails the test on malformed input.
internal/mcp/dispatch_http_routes_test.go:27
↓ 11 callers
Function
newBug3425World
(t *testing.T)
internal/store/bug3425_deleted_collection_reads_test.go:24
↓ 11 callers
Function
newConvFixture
(t *testing.T)
internal/decision/conventions_test.go:33
↓ 11 callers
Function
newMoveFixture
(t *testing.T, name string)
internal/store/item_workspace_moves_test.go:22
↓ 11 callers
Function
newPushEnv
(t *testing.T, srv *Server, gateway bool)
internal/server/handlers_push_devices_test.go:33
↓ 11 callers
Function
newRangeWorld
(t *testing.T)
internal/store/items_field_range_test.go:27
↓ 11 callers
Function
newT4137Fixture
newT4137Fixture signs a Google user in once (creating it), then turns 2FA on.
internal/server/task4137_pkce_twofactor_test.go:34
↓ 11 callers
Function
newTestInstall
(t *testing.T, srv *Server, installID string)
internal/server/task3394_install_tokens_test.go:59
↓ 11 callers
Function
newTestSender
(ts *httptest.Server)
internal/email/sender_test.go:12
↓ 11 callers
Function
newTwoFAFixture
(t *testing.T)
cmd/pad/cmd_auth_2fa_test.go:38
↓ 11 callers
Function
normalizeAndCheck
CLASSING NOTE for normalizeAndCheck below. CLASSING, and why it is what it is. The wrapper sees positional parameters, not columns, so it cannot cons
internal/store/nulguard.go:143
↓ 11 callers
Method
notMine
(u *models.User, ws *models.Workspace, it *models.Item, m *models.NeedsSnoozeMarker)
internal/server/handlers_needs_not_mine_test.go:41
↓ 11 callers
Method
nothingStored
()
internal/server/handlers_commitments_http_test.go:139
↓ 11 callers
Method
open
(n: number | null)
web/src/lib/stores/chatThread.svelte.ts:238
↓ 11 callers
Method
pendingRows
(t *testing.T)
internal/server/handlers_apps_install_test.go:158
↓ 11 callers
Function
pidAnswersAt
(port int)
internal/buildtools/install_refresh_test.go:1225
↓ 11 callers
Function
planSourceServer
(t *testing.T)
internal/server/handlers_plan_source_test.go:27
↓ 11 callers
Function
presenceRequest
(t *testing.T, srv *Server, method, token, worker, body string)
internal/server/task4040_presence_test.go:19
↓ 11 callers
Method
publishActivityEvent
publishActivityEvent is the ONE place a server producer hands an event to the activity bus, and the one place its Publish error is discarded (BUG-2732
internal/server/events_publish.go:27
↓ 11 callers
Method
publishItemEventWithCollectionID
publishItemEventWithCollectionID publishes a real-time event for item changes with actor name and a home_changed hint. Callers that already hold the i
internal/server/handlers_items.go:3804
↓ 11 callers
Function
quietCrossActorToasts
(context: BrowserContext)
web/e2e/fixtures.ts:65
↓ 11 callers
Method
read
(t *testing.T, agent bool, loc *time.Location, now string)
internal/store/schedule_bootstrap_test.go:36
↓ 11 callers
Function
readBodyForDecode
readBodyForDecode reads the whole request body so it can be scanned before it is decoded, with the caller's size cap applied. Buffering is not a cost
internal/server/middleware_request_text.go:837
↓ 11 callers
Function
readPIDRecord
readPIDRecord parses the PID file. It accepts the LEGACY bare-integer form as well, because a server started by an older binary is exactly the case t
internal/cli/pidfile.go:60
↓ 11 callers
Function
realUser
realUser inserts a user so workspace_members' FK is satisfied and the INSERT can actually succeed — the opposite setup from the ghost-user test, and t
internal/server/handlers_cloud_member_ack_test.go:58
↓ 11 callers
Function
remoteHeadlessCfg
remoteHeadlessCfg builds a Config wired to point at the given httptest server URL in Remote mode. Remote mode makes EnsureServer a no-op.
cmd/pad/setup_headless_test.go:78
↓ 11 callers
Function
restoreSQLiteTuple
(t *testing.T, path string)
cmd/pad/cmd_db_restore_test.go:115
↓ 11 callers
Method
retryOnDeadlock
retryOnDeadlock runs fn, and runs it again from the start, up to deadlockRetryAttempts times in all, while it fails with a deadlock. Any other error,
internal/store/deadlock_retry.go:44
↓ 11 callers
Method
rotateSessionsAfterCredentialChange
(w http.ResponseWriter, r *http.Request, user *models.User)
internal/server/handlers_auth.go:363
↓ 11 callers
Function
run
(args []string, stdout, stderr io.Writer)
cmd/depages/main.go:77
↓ 11 callers
Method
runOutboxDrainTick
runOutboxDrainTick is one pass: claim, deliver, ack, retain.
internal/server/outbox_drain.go:208
↓ 11 callers
Function
runRows
(t *testing.T, rows []Row)
internal/schedule/conformance_test.go:167
↓ 11 callers
Method
runWorkspacePurgeSweep
runWorkspacePurgeSweep purges every workspace whose deleted_at is older than cutoff. Blobs are reclaimed BEFORE the DB rows are removed so a failed re
internal/server/workspace_purge.go:217
↓ 11 callers
Method
seedItem
()
internal/server/workspace_access_notify_test.go:128
↓ 11 callers
Function
seriesRequest
()
internal/store/commitment_renegotiate_test.go:55
↓ 11 callers
Method
setMemberCap
(t *testing.T, limit int)
internal/server/handlers_invitation_accept_limit_test.go:35
↓ 11 callers
Function
stageOldSeed
stageOldSeed makes the item hold oldContent with oldFields merged in, and records that as the text it was seeded with.
internal/server/task3462_builtin_update_test.go:36
↓ 11 callers
Function
stampAttachmentRefsTx
stampAttachmentRefsTx bumps attachments.last_referenced_at for every `pad-attachment:<id>` reference found in the given texts, inside the caller's tra
internal/store/attachments.go:1025
↓ 11 callers
Function
startFields
(item *models.Item)
internal/server/bootstrap_start.go:27
↓ 11 callers
Function
stepUpBackends
(t *testing.T, f func(*testing.T, *store.Store))
internal/store/step_up_test.go:18
↓ 11 callers
Function
storedItemEntries
(t *testing.T, s *Store, itemID string)
internal/store/item_entries_index_test.go:53
↓ 11 callers
Method
sweep
sweep walks the map, evicts entries older than ttl, and returns the eviction count. onChange fires once at the end with the new total — single observa
internal/server/middleware_mcp_session.go:212
↓ 11 callers
Method
task
(t *testing.T, title string)
internal/decision/conventions_test.go:80
↓ 11 callers
Function
task3399Delegated
task3399Delegated mints a delegated grant (code, access, refresh).
internal/store/task3399_delegated_barrier_test.go:213
← previous
next →
1,501–1,600 of 31,685, ranked by callers