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
↓ 33 callers
Function
nowTS
nowTS is the instant a tick would pass in. Taken well after `past` and well before `future`, so the two fixtures sit on opposite sides of it with no d
internal/store/reminders_test.go:47
↓ 33 callers
Function
resolve
(id: string)
web/src/lib/collections/relationGroups.test.ts:60
↓ 32 callers
Method
Count
(text string)
internal/store/redact_match.go:63
↓ 32 callers
Method
CreateReminder
CreateReminder creates a target-only run-once commitment and returns its alarm.
internal/store/reminders.go:145
↓ 32 callers
Method
ListItemVersionsResolved
ListItemVersionsResolved returns versions with full content (diffs resolved). Requires the current item content to reconstruct diff-based versions. c
internal/store/items.go:6786
↓ 32 callers
Function
WithPlanLimit
WithPlanLimit makes the insert enforce the owner's plan limit for what it creates, in the same transaction as the write (BUG-2808). The server passes
internal/store/limits.go:279
↓ 32 callers
Method
callCount
()
internal/server/handlers_account_test.go:54
↓ 32 callers
Method
confirm
The sub-view's Delete row — resolve the gate true.
web/src/lib/attachments/surfaceDeleteConfirm.svelte.ts:56
↓ 32 callers
Method
context
()
internal/webhooks/dispatcher.go:248
↓ 32 callers
Method
copy
(t *testing.T, req CrossWorkspaceCopyRequest)
internal/store/items_cross_workspace_copy_test.go:56
↓ 32 callers
Method
currentGen
NOTE: callerIsGone already exists in this package, added by BUG-2751 for the resume settle path, and is reused here rather than duplicated. Its reason
internal/watchevents/heartbeat.go:517
↓ 32 callers
Method
importBundle
(t *testing.T, data *models.WorkspaceExport, name string)
internal/store/schedule_carry_test.go:41
↓ 32 callers
Method
logAuditEvent
logAuditEvent logs a non-workspace audit event (e.g. login, logout). Best-effort: errors are silently ignored.
internal/server/handlers_documents.go:469
↓ 32 callers
Function
newShareAssetFixture
(t *testing.T)
internal/server/handlers_share_attachments_test.go:115
↓ 32 callers
Function
postOAuthForm
postOAuthForm POSTs an x-www-form-urlencoded body without any auth (used for /oauth/revoke + /oauth/token, where client_id rides in the form for publi
internal/server/handlers_oauth_test.go:2639
↓ 32 callers
Function
read
(key: string)
web/src/lib/chat/chatRecords.ts:27
↓ 32 callers
Function
testServerWithPresence
testServerWithPresence gives a server both the watch bus and the presence registry — the production pairing (cmd_server.go wires them on adjacent line
internal/server/handlers_sessions_test.go:19
↓ 32 callers
Function
writeCredsFile
(t *testing.T, home, body string)
internal/cli/credentials_test.go:21
↓ 31 callers
Function
DefaultConfig
()
internal/config/config.go:488
↓ 31 callers
Method
SetMetrics
SetMetrics attaches Prometheus metrics to the server. Must be called before the first request is served. Side effect (TASK-961): when both metrics AN
internal/server/server.go:1490
↓ 31 callers
Method
SetParentLink
--- Phase Links --- SetParentLink sets the parent for an item. Since an item can belong to at most one parent, this deletes any existing parent link f
internal/store/items.go:4634
↓ 31 callers
Method
SubscribeIfAllowed
SubscribeIfAllowed atomically checks the per-workspace subscriber limit and, only if it is satisfied, subscribes in the same critical section. Return
internal/events/bus.go:258
↓ 31 callers
Method
UpdateUser
UpdateUser updates mutable user fields.
internal/store/users.go:304
↓ 31 callers
Function
ValidateFields
ValidateFields checks field values against the collection schema. It validates required fields are present, types are correct, and select values are w
internal/items/validate.go:81
↓ 31 callers
Function
captureStderr
captureStderr runs fn with os.Stderr redirected and returns what was written.
cmd/pad/item_reserved_field_test.go:50
↓ 31 callers
Function
dispatcherErrorResult
dispatcherErrorResult wraps an internal dispatcher failure (build request, encode body, parse response, marshal merged fields, etc.) into the structur
internal/mcp/errors.go:1958
↓ 31 callers
Function
isolatedTestClient
isolatedTestClient returns an HTTP client with a transport of its own. Outbound requests in this package's tests go through it — or through the httpte
internal/server/isolated_client_test.go:55
↓ 31 callers
Function
moveInput
(sc *models.ItemSchedule, target string)
internal/store/commitment_move_test.go:21
↓ 31 callers
Function
newCopyFixture
(t *testing.T)
internal/store/items_cross_workspace_copy_test.go:35
↓ 31 callers
Function
newMockStore
(hooks []models.Webhook)
internal/webhooks/dispatcher_test.go:51
↓ 31 callers
Function
newPL4745
(t *testing.T)
internal/server/task4745_pending_link_test.go:32
↓ 31 callers
Function
reject
()
web/src/lib/components/fields/FieldEditor.typedDebounce.svelte.test.ts:338
↓ 31 callers
Method
sched
sched makes an item held by u with a one-shot at start (a wall, UTC).
internal/server/bootstrap_agenda_test.go:47
↓ 31 callers
Method
schedule
Arm (or re-arm) the idle debounce to flush `markdown` for `ctx`. No-op * when recovering or `ctx` is null. Cancels any prior pending flush first,
web/src/lib/collab/collabFlush.svelte.ts:134
↓ 30 callers
Function
CompileRedactMatcher
(match string, regex bool, date time.Time)
internal/store/redact_match.go:34
↓ 30 callers
Method
Resolve
Resolve returns the store responsible for key, or an error if no matching backend is registered. The key format is "<prefix>:<rest>".
internal/attachments/registry.go:63
↓ 30 callers
Function
appGet
(srv *Server, path, token string)
internal/server/task3401_app_api_test.go:184
↓ 30 callers
Function
handler
({ transaction }: { transaction: LocalChangeProbe })
web/src/lib/items/confirmedBase.ts:142
↓ 30 callers
Function
newCrossWSFixture
(t *testing.T)
internal/server/authz_cross_workspace_test.go:50
↓ 30 callers
Method
read
()
web/src/lib/items/fieldWriteOrder.test.ts:44
↓ 30 callers
Method
removeEventListener
(type: 'toolchange', listener: (ev: Event) => void)
web/src/lib/webmcp/types.d.ts:79
↓ 30 callers
Method
runReminderTick
runReminderTick is one pass: fire every reminder whose instant has arrived. The store does the arbitration and writes each event in the same transact
internal/server/reminder_tick.go:145
↓ 30 callers
Function
strPtr
(s string)
internal/store/timeline_pagination_test.go:191
↓ 30 callers
Function
task3462Workspace
TASK-3462 U1: every door that brings a built-in convention or playbook into a workspace records which one it is and which version of its text, and the
internal/server/task3462_builtin_origin_test.go:18
↓ 29 callers
Method
Ask
Ask answers every question about the same state in ONE request, retried on transient provider failures. state is marshalled as JSON, so a string, a m
internal/decision/decision.go:312
↓ 29 callers
Method
BaseURL
BaseURL returns the configured base URL.
internal/email/sender.go:104
↓ 29 callers
Method
BeginFenced
BeginFenced opens a FencedTx. It is called only by internal/appstore; a test fails if any other package references it.
internal/store/fenced_tx.go:97
↓ 29 callers
Function
Encode
Encode serializes an Artifact to its portable on-disk form: --- <yaml frontmatter> --- <body> Output is deterministic: two Encode calls on the
internal/artifact/encode.go:23
↓ 29 callers
Method
GetDecisionJob
GetDecisionJob returns a job's row, or nil when no evaluation is owed.
internal/store/decisions.go:546
↓ 29 callers
Method
ListItemVersions
ListItemVersions returns all versions for an item.
internal/store/items.go:7078
↓ 29 callers
Function
Noul
Noul builds a Noul question — the probability that a statement is true. trueDesc and falseDesc are optional; pass "" for both to work from the instruc
internal/decision/decision.go:90
↓ 29 callers
Method
RestoreItem
RestoreItem un-archives a soft-deleted item and bumps the workspace-scoped seq so delta-sync clients re-materialize the row. Same lock + subquery shap
internal/store/items.go:4033
↓ 29 callers
Method
SubscribeAndReplaySince
SubscribeAndReplaySince atomically subscribes AND captures every buffered notification with ID > sinceID, under the SAME lock. Subscribing and reading
internal/watchevents/watchevents.go:344
↓ 29 callers
Function
ago
These tests run on SQLite, and on Postgres too under `make test-pg` (testStore switches on PAD_TEST_POSTGRES_URL).
internal/store/task3939_push_dispatch_test.go:17
↓ 29 callers
Method
attach
attach creates an original attachment in ws and returns it.
internal/store/attachments_copy_plan_test.go:37
↓ 29 callers
Method
callCopy
Tests for the mutating cross-workspace copy (PLAN-2357 / TASK-2365). The fixture is the PREFLIGHT's, deliberately and not for convenience: the headli
internal/server/handlers_items_copy_test.go:50
↓ 29 callers
Function
createTestWorkspace
createTestWorkspace creates a workspace via API and returns its slug.
internal/server/handlers_events_test.go:118
↓ 29 callers
Function
deleteAccountReq
deleteAccountReq issues the delete-account request from a client IP that differs from the loopback address bootstrap ran on. The session-IP-change mid
internal/server/handlers_account_test.go:103
↓ 29 callers
Method
dispatch
(t *testing.T, cmd []string, input map[string]any)
internal/mcp/dispatch_http_clear_parent_test.go:100
↓ 29 callers
Function
errorHandler
errorHandler fails the test if invoked. Used to assert that a code path doesn't hit the handler at all.
internal/mcp/dispatch_http_advanced_test.go:890
↓ 29 callers
Method
force
TASK-4102 PR1b: firing a schedule's managed reminder row. Runs on SQLite in make test and on Postgres in make test-pg. force rewrites the schedule's o
internal/store/schedule_fire_test.go:22
↓ 29 callers
Method
gateAccess
Commitment gates (TASK-4353, 2c): the write side. A gate is one row per (blocker, gated schedule); its writes follow the link store's rules for who ma
internal/store/commitment_gates_test.go:18
↓ 29 callers
Function
memberImporter
memberImporter bootstraps an admin (so auth is on) and returns a PLAIN user with a session — the importer whose restored husk answered 403.
internal/server/handlers_import_bundle_husk_test.go:150
↓ 29 callers
Method
nativeCommit
(t *testing.T)
internal/store/commitment_c1_test.go:57
↓ 29 callers
Function
newClaimFixture
(t *testing.T, s *Store)
internal/store/agent_claim_test.go:27
↓ 29 callers
Function
newPinFixture
(t *testing.T, driver store.DriverType)
internal/server/bug3982_pinned_token_test.go:30
↓ 29 callers
Function
newTestRedisBus
(t *testing.T)
internal/events/redis_resume_coverage_test.go:11
↓ 29 callers
Function
postOAuthLogin
postOAuthLogin fires a cloud-secret-authenticated oauth-login request and returns the recorder. The cloud secret rides the JSON body (the same channel
internal/server/handlers_oauth_provider_test.go:23
↓ 29 callers
Function
render
(save: SaveStatus, collab: CollabConnectionState | null)
web/src/lib/components/items/SaveSyncStatus.svelte.test.ts:11
↓ 29 callers
Method
stagePreview
stagePreview previews and returns the preview the owner reviews.
internal/server/handlers_apps_provision_test.go:31
↓ 28 callers
Method
AuthorizeCrossWorkspaceEdit
AuthorizeCrossWorkspaceEdit decides whether the caller may WRITE the scoped resource in a workspace OTHER than the request's own. It runs every step
internal/server/authz_cross_workspace.go:513
↓ 28 callers
Method
CreateShareLink
CreateShareLink creates a new share link and returns it with the raw token. The raw token is only available in this response — it is not stored.
internal/store/share_links.go:47
↓ 28 callers
Method
Day
Day returns index of the day in a week (0 for MO, 6 for SU)
internal/schedule/internal/rrule/rrule.go:77
↓ 28 callers
Function
NewFSStore
NewFSStore returns a store rooted at baseDir, creating the directory if it does not exist. baseDir is typically <DataDir>/attachments.
internal/attachments/fs_store.go:42
↓ 28 callers
Function
NewRedisBus
NewRedisBus creates a new Redis-backed EventBus. The provided redis.Client should already be configured and connected.
internal/events/redis_bus.go:878
↓ 28 callers
Method
SetEventBus
SetEventBus attaches an event bus for real-time SSE streaming.
internal/server/server.go:1286
↓ 28 callers
Method
SetItemContentFlushedOpLogIDForTesting
SetItemContentFlushedOpLogIDForTesting advances items.content_flushed_op_log_id directly, standing in for the collab-snapshot flush that normally move
internal/store/testing_helpers.go:239
↓ 28 callers
Method
append
append adds an event to the ring buffer, evicting the oldest if full.
internal/events/bus.go:461
↓ 28 callers
Function
at
(d time.Duration)
internal/store/task3939_push_dispatch_test.go:18
↓ 28 callers
Function
bootstrapAccountDeleteUser
bootstrapAccountDeleteUser creates the first admin user, sets a Stripe customer ID on them, and returns (userID, sessionToken). Used by the handleDele
internal/server/handlers_account_test.go:74
↓ 28 callers
Function
connectWatchStream
connectWatchStream connects to GET /api/v1/events/stream with a Bearer token and returns a channel of parsed SSE events. UNARMED — the S1 legacy shape
internal/server/handlers_watch_events_test.go:37
↓ 28 callers
Method
destroy
Cleanly close the WS, unbind doc/awareness handlers, and * prevent further reconnect attempts. Safe to call more than * once; idempotent.
web/src/lib/collab/wsProvider.svelte.ts:798
↓ 28 callers
Function
errCode
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_items_copy_preflight_test.go:222
↓ 28 callers
Function
fetchTimeline
(t *testing.T, srv *Server, wsSlug, itemSlug, query string)
internal/server/handlers_timeline_structured_test.go:52
↓ 28 callers
Function
lapseSchedule
(t *testing.T, f *schedFixture, recurring bool)
internal/store/schedule_lapse_test.go:16
↓ 28 callers
Function
mustCreateOwnedWorkspace
(t *testing.T, srv *Server, name string, owner *models.User)
internal/server/token_workspace_consent_scope_test.go:58
↓ 28 callers
Function
newLinkPG
(t *testing.T, n int)
internal/store/commitment_links_pg_test.go:30
↓ 28 callers
Function
newMiniredisBus
(t *testing.T, size int)
internal/watchevents/redis_bus_integration_test.go:27
↓ 28 callers
Function
newRecoveryFixture
newRecoveryFixture: a test server with a room manager (grace TTL grace) and an op-log recovery worker over m, NOT started. cfg zero fields default.
internal/server/materialize_recovery_test.go:90
↓ 28 callers
Function
newUpgradeEnv
(t *testing.T)
internal/server/handlers_apps_upgrade_test.go:21
↓ 28 callers
Function
noWorkspaceResult
noWorkspaceResult builds the standard ErrNoWorkspace envelope with available_workspaces populated by the supplied lookup. Lookup is best-effort: failu
internal/mcp/errors.go:414
↓ 28 callers
Function
post
(request: APIRequestContext, fixture: SuiteFixture, path: string, data: unknown)
web/e2e/bug-3038-list-retry-rederives.spec.ts:27
↓ 28 callers
Function
postBundle
(srv *Server, name string, body []byte)
internal/server/bug3354_import_bundle_bomb_test.go:47
↓ 28 callers
Method
record
* Claim what is now on screen. Recording a token whose key is null (an * un-addressable view) correctly claims nothing.
web/src/lib/attachments/viewFence.ts:183
↓ 28 callers
Function
register
(t *testing.T, s *Store, userID, sessionID, token string)
internal/store/push_devices_test.go:30
↓ 28 callers
Function
runAuthCodeFlow
runAuthCodeFlow drives a full /oauth/authorize/decide → /oauth/token exchange and returns the parsed token JSON. Each invocation needs a unique verifi
internal/server/handlers_oauth_test.go:2561
↓ 28 callers
Function
startPreServer
startPreServer starts the "running server" a test hands to the script, on a port chosen in advance, and returns only once THAT process is the one answ
internal/buildtools/install_refresh_test.go:353
↓ 28 callers
Function
tabsUser
Tests for the per-user open set of workspace tabs (TASK-3256). They run on whichever dialect testStore gives (SQLite by default, Postgres under PAD_TE
internal/store/workspace_tabs_test.go:17
↓ 28 callers
Function
validTOTPCode
validTOTPCode mints the current valid TOTP code for a secret, using the same library the handler validates against.
internal/server/handlers_account_test.go:502
↓ 27 callers
Method
CreateActivityDebounced
A non-nil error is always paired with an EMPTY id (BUG-2779). Neither this function nor CreateActivity returns a usable-looking handle beside a failur
internal/store/activities.go:112
← previous
next →
501–600 of 31,685, ranked by callers