Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
31,743 in github.com/PerpetualSoftware/pad
⨍
Functions
31,743
◇
Types & classes
3,534
↓ 15 callers
Function
countsItem
countsItem makes an item created at createdAt whose history is the given (instant, status) steps. Its own create row is replaced, so the history is ex
internal/store/agenda_counts_test.go:16
↓ 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
Method
deadlineOverride
(t *testing.T, sc *models.ItemSchedule, value string)
internal/store/schedule_deadline_eval_test.go:203
↓ 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
doRequestWithCookieFrom
doRequestWithCookieFrom is like doRequestWithCookie but lets the caller set the request RemoteAddr so tests can simulate a session jumping to a differ
internal/server/middleware_session_ip_test.go:18
↓ 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
eachBackend
(t *testing.T, fn func(t *testing.T, s *store.Store))
internal/store/bug3244_set_aside_test.go:18
↓ 15 callers
Method
expand
(t *testing.T, item *models.Item, view *time.Location, from, to, now string)
internal/store/schedule_agenda_test.go:24
↓ 15 callers
Function
extractStructuredCLIError
extractStructuredCLIError scans stderr for the `pad-structured-error/v1: {json}\n` marker line and lifts the structured error envelope into an MCP res
internal/mcp/errors.go:670
↓ 15 callers
Method
fanOutFromRedis
fanOutLocally appends to the replay buffer and sends to every live local subscriber, under the single mutex — see SubscribeAndReplaySince for why thos
internal/watchevents/redis_bus.go:1581
↓ 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
getSessions
(t *testing.T, baseURL, token string)
internal/server/handlers_sessions_test.go:26
↓ 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
Method
invalidateWorkspaceAccess
invalidateWorkspaceAccess is invalidateUserAccess for every connection on a workspace.
internal/server/access_kick.go:233
↓ 15 callers
Function
isUniqueViolation
isUniqueViolation checks whether an error is a unique constraint violation. Works for both SQLite (UNIQUE constraint failed) and PostgreSQL (duplicate
internal/store/items.go:735
↓ 15 callers
Function
isValidFieldKey
isValidFieldKey checks that a field name contains only safe characters (alphanumeric, underscore, hyphen). This prevents SQL injection when field keys
internal/store/store.go:1633
↓ 15 callers
Method
login
(t *testing.T, addr, tok string, linkPending *bool)
internal/server/task4745_pending_link_test.go:128
↓ 15 callers
Method
manifest
manifest returns a valid manifest for the test app with one companion collection and the golden playbook as its artifact.
internal/server/handlers_apps_install_test.go:121
↓ 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
Method
mustBePinDenial
mustBePinDenial fails unless rr is the 403 a pinned token gets, naming its workspace and how to mint an unscoped token.
internal/server/bug3982_pinned_token_test.go:64
↓ 15 callers
Function
mustCreateUser
(t *testing.T, srv *Server, email, name, role string)
internal/server/token_workspace_consent_scope_test.go:47
↓ 15 callers
Function
mustList
mustList reads a registry's session list, failing the test if the read itself failed. ListForUser gained an error when an out-of-process implementati
internal/server/session_presence_test.go:192
↓ 15 callers
Function
nativeBundle
(t *testing.T)
internal/store/commitment_bundle_v2_test.go:46
↓ 15 callers
Function
newAppsEnv
(t *testing.T)
internal/server/handlers_apps_install_test.go:54
↓ 15 callers
Function
newDeleteAuthzFixture
(t *testing.T, srv *Server)
internal/server/handlers_storage_delete_authz_test.go:57
↓ 15 callers
Function
newFenceFixture
(t *testing.T)
internal/store/fenced_tx_test.go:40
↓ 15 callers
Function
newMCPStallFixture
(t *testing.T, opts ...mcpgo.StreamableHTTPOption)
internal/server/bug3808_mcp_stalled_reader_test.go:43
↓ 15 callers
Function
newParentFixture
(t *testing.T)
internal/mcp/dispatch_http_clear_parent_test.go:46
↓ 15 callers
Function
newRecordingObserver
()
internal/watchevents/observer_test.go:30
↓ 15 callers
Function
newRedisPresencePair
BUG-2698 — the registry half. These drive TWO RedisSessionPresence values against ONE miniredis, because that is what the bug is: two padd processes
internal/server/session_presence_redis_test.go:19
↓ 15 callers
Function
newRequestCapture
()
internal/mcp/dispatch_http_advanced_test.go:907
↓ 15 callers
Function
newTask4699World
newTask4699World signs in the agenda world's owner with the given account zone and day start; "" and -1 leave either unset.
internal/server/task4699_placement_test.go:28
↓ 15 callers
Function
nilIfEmpty
(s string)
internal/store/activities.go:1167
↓ 15 callers
Method
nonTerminalFilter
nonTerminalFilter builds a WHERE fragment (plus ordered args) that keeps only items whose resolved done-field value is NOT one of their collection's t
internal/store/items.go:5578
↓ 15 callers
Method
oauthAvailable
oauthAvailable is PLAN-2310 DR-1's second predicate: MCP available, an OAuth server constructed, and, off cloud, an https auth-server URL. The server
internal/server/handlers_admin_mcp.go:78
↓ 15 callers
Function
oauthOnlyCloud
oauthOnlyCloud is a cloud server with an initialized instance and an OAuth-only account holding a fresh session.
internal/server/bug3336_account_delete_test.go:92
↓ 15 callers
Function
outboxPayloadFor
outboxPayloadFor returns the decoded payload of the single event of the given type for an item, failing if there is not exactly one.
internal/store/event_outbox_test.go:50
↓ 15 callers
Function
packageJSONResult
packageJSONResult converts a CLI stdout string into an MCP tool result. JSON bodies surface as structuredContent; non-JSON falls back to text. Top-lev
internal/mcp/dispatch.go:200
↓ 15 callers
Method
pendingOutbox
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:89
↓ 15 callers
Method
persistedFields
persistedFields reads the destination item's fields blob back out of the database. Deliberately NOT the response body: the contract being asserted is
internal/server/handlers_items_copy_test.go:121
↓ 15 callers
Function
plantLegacyRows
dropAllNULTriggers turns the store's database into a pre-S2 one for the duration of a test, so a raw handle can plant the LEGACY rows this unit exists
internal/store/nulscan_test.go:19
↓ 15 callers
Method
read
(t *testing.T, canRead func(string) bool)
internal/store/milestone_test.go:63
↓ 15 callers
Function
refuse
(format string, args ...any)
internal/appstore/items.go:38
↓ 15 callers
Function
runItemList
runItemList runs `pad item list <args>` in the given format and returns stdout, stderr and the command's error.
cmd/pad/bug4024_item_list_json_autopage_test.go:105
↓ 15 callers
Function
seedCollabFixture
seedCollabFixture creates the minimum fixture chain needed to test the collab WS endpoint: workspace + collection + item, all in the store, returning
internal/server/handlers_collab_test.go:62
↓ 15 callers
Function
setSQLiteRestoreEnv
(t *testing.T, dataDir string)
cmd/pad/cmd_db_restore_test.go:612
↓ 15 callers
Function
signupTime
signupTime is the TEXT form agent_signups' timestamps are stored and compared in: fixed-width RFC3339 UTC, so lexical order is time order.
internal/store/agent_signups.go:119
↓ 15 callers
Method
spec
()
internal/store/fenced_tx_test.go:59
↓ 15 callers
Function
startEditor
(t *testing.T, f *startFixture)
internal/server/task4914_start_demote_test.go:15
↓ 15 callers
Function
startMode
(item *models.Item)
internal/server/bootstrap_start.go:34
↓ 15 callers
Function
stop
(make)
plugin/hooks/register.js:511
↓ 15 callers
Method
stopMCPSessionTracker
stopMCPSessionTracker signals both sweepers to exit. Called from Server.Stop. Idempotent.
internal/server/middleware_mcp_session.go:327
↓ 15 callers
Function
task3462ItemByTitle
(t *testing.T, srv *Server, wsSlug, coll, title string)
internal/server/task3462_builtin_origin_test.go:29
↓ 15 callers
Function
task3867Verify
(e *tokenAuthEnv, body any)
internal/server/task3867_token_access_test.go:44
↓ 15 callers
Function
tokenWorkspaceID
tokenWorkspaceID returns the workspace ID set by the TokenAuth middleware, or an empty string if no token was used.
internal/server/middleware_auth.go:651
↓ 15 callers
Method
user
(t *testing.T, email string)
internal/server/handlers_needs_not_mine_test.go:352
↓ 15 callers
Function
veDoBearer
veDoBearer issues a request authenticated with a Bearer PAT (which skips CSRF). Mirrors the CLI / connector path through TokenAuth.
internal/server/middleware_verified_email_test.go:121
↓ 15 callers
Function
waitForFrameWithEvent
(t *testing.T, frames <-chan string, eventType string)
internal/server/handlers_events_resume_test.go:65
↓ 15 callers
Function
writeStorePlanLimitError
writeStorePlanLimitError answers a *store.PlanLimitError with the same 403 the advisory pre-check writes, and reports whether err was one. note, when
internal/server/handlers_cloud.go:1738
↓ 15 callers
Function
writeWorkspaceNotFound
writeWorkspaceNotFound writes the workspace-resolution 404 (BUG-3069). The message is passed through because two doors have long said "Workspace not f
internal/server/server.go:3135
↓ 14 callers
Method
AddConnectionWorkspace
AddConnectionWorkspace inserts a (request_id, workspace_id) row in the allow-list join table. Idempotent: re-adding an existing pair is a no-op (INSER
internal/store/oauth_connections.go:508
↓ 14 callers
Method
AgendaCounts
AgendaCounts reads the counts series for one workspace over [from, to) in loc's days. scope is the caller's visibility, applied to the items before an
internal/store/agenda_counts.go:125
↓ 14 callers
Method
CreateOAuthUser
CreateOAuthUser creates a user from an OAuth provider with a random unusable password. OAuth users can later set a password via the password reset flo
internal/store/users.go:951
↓ 14 callers
Method
Decisions
Decisions returns the item's latest answer per question, each marked Current when it was computed from the item's present state. A nil runner returns
internal/decision/runner.go:780
↓ 14 callers
Method
DeleteSchedule
DeleteSchedule removes an item's schedule, its managed reminder row and its resolved occurrences, reporting whether there was one.
internal/store/schedules.go:1203
↓ 14 callers
Method
Error
()
internal/models/view_calendar.go:44
↓ 14 callers
Method
Error
()
internal/schedule/caps.go:92
↓ 14 callers
Method
GetItemBySlug
(workspaceID, slug string)
internal/store/items.go:939
↓ 14 callers
Method
InsertMCPAuditEntry
InsertMCPAuditEntry persists one audit row. Called from the audit middleware's async writer; the caller owns the buffered channel + the ordering, so t
internal/store/mcp_audit.go:54
↓ 14 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
↓ 14 callers
Function
IsTerminalItem
IsTerminalItem reports whether an item's fields map indicates the item is in a terminal state for its collection. This is the canonical Go-side "is do
internal/models/terminal.go:385
↓ 14 callers
Method
ListUserOAuthConnections
ListUserOAuthConnections returns every OAuth connection the user has active. "Active" means at least one access OR refresh token in the chain still ha
internal/store/connected_apps.go:59
↓ 14 callers
Method
ListWorkspaceActivity
(workspaceID string, params models.ActivityListParams)
internal/store/activities.go:831
↓ 14 callers
Method
LockWorkspaceSeq
LockWorkspaceSeq takes the workspace lock every human item write takes for item_number and seq (insertItemTx, acquireWorkspaceSeqLock), so an app writ
internal/store/fenced_tx.go:159
↓ 14 callers
Function
NewStorage
NewStorage wraps a *store.Store as a fosite-compatible adapter. The store must be a fully-initialized pad store (migrations applied); no validation he
internal/oauth/storage.go:131
↓ 14 callers
Function
NewTitleEscaper
NewTitleEscaper precomputes the escaped forms for one rename. oldTitle is REQUIRED, not optional, and that is deliberate: it is the only thing that c
internal/links/links.go:563
↓ 14 callers
Function
NormalizeItemLinkType
NormalizeItemLinkType canonicalizes supported link types and returns an error for unknown values.
internal/models/item_links.go:33
↓ 14 callers
Function
PlaybookLibrary
PlaybookLibrary returns all pre-defined playbook categories with their playbooks. As of PLAN-1397's invokable-first overhaul (TASK-1403), the library
internal/collections/playbook_library.go:39
↓ 14 callers
Method
RegisterPushDevice
RegisterPushDevice binds a push token to a session in ONE transaction. When this user already holds the token, the row is UPDATED in place: id and cre
internal/store/push_devices.go:51
↓ 14 callers
Method
ScheduleGates
ScheduleGates is what one reader is shown of an item's gates. It is DISPLAY only: it evaluates every gate without writing, and then leaves out of the
internal/store/commitment_gates.go:715
↓ 14 callers
Method
SetAuthToken
SetAuthToken sets the authorization token for API requests.
internal/cli/client.go:147
↓ 14 callers
Method
SetCommitmentRoles
SetCommitmentRoles replaces a schedule's role columns and marks them native. Writing a legacy_backfill row converts it, and the journal row it writes
internal/store/commitment.go:459
↓ 14 callers
Method
SetOAuthServer
OAuth 2.1 authorization-server HTTP handlers (PLAN-943 TASK-951). Sub-PR C built the /register, /authorize, /authorize/decide and token endpoints + th
internal/server/handlers_oauth.go:79
↓ 14 callers
Method
Total
Total is the number of offending values.
internal/store/nulscan.go:123
↓ 14 callers
Method
UpdateRoleSortOrder
UpdateRoleSortOrder batch-updates role_sort_order for a list of items. Every entry must update exactly one live item in workspaceID, or the whole batc
internal/store/agent_roles.go:516
↓ 14 callers
Function
acquire
(exemptRoot: HTMLElement)
web/src/lib/a11y/viewerBackdrop.ts:217
↓ 14 callers
Function
appSHA
(b []byte)
internal/server/handlers_apps_install_test.go:52
↓ 14 callers
Function
asCap
(t *testing.T, err error, kind CapKind)
internal/schedule/caps_test.go:9
↓ 14 callers
Function
assertSourceSet
(t *testing.T, p *AttachmentCopyPlan, want ...string)
internal/store/attachments_copy_plan_test.go:115
↓ 14 callers
Method
cancelLink
The cancel policy and "No longer needed" (TASK-4353, 2c). A link's cancel_policy says what a cancelled parent occurrence does to the child occurrence
internal/store/commitment_cancel_test.go:19
↓ 14 callers
Function
chatMessage
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_chat_test.go:57
↓ 14 callers
Function
chunkStrings
chunkStrings splits ids into slices of at most size elements.
internal/store/attachments_copy_plan.go:759
↓ 14 callers
Function
clearDecisionEnv
(t *testing.T)
internal/server/decision_settings_test.go:37
↓ 14 callers
Function
clearSessionEnv
clearSessionEnv unsets every variable CaptureSessionOwner and RegisterSession read, so a test's own harness (this suite runs inside Claude Code someti
internal/cli/session_owner_test.go:15
↓ 14 callers
Function
contentState
(t *testing.T, s *store.Store, itemID string)
internal/store/bug3124_content_bearing_test.go:51
↓ 14 callers
Function
countOpLog
BUG-2840 half B. On the no-room / no-applier path a content PATCH prunes the item's Yjs op-log and writes items.content. The prune used to run FIRST,
internal/server/handlers_collab_prune_atomicity_test.go:27
← previous
next →
1,101–1,200 of 31,743, ranked by callers