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
↓ 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
↓ 27 callers
Method
GetItemIncludeDeleted
GetItemIncludeDeleted finds an item by id including soft-deleted items. Used by code paths that need to act on records the user already owns even thou
internal/store/items.go:1145
↓ 27 callers
Method
ResolveOccurrence
ResolveOccurrence resolves the outstanding occurrence of an item's schedule.
internal/store/schedule_resolve.go:158
↓ 27 callers
Function
SessionArmState
SessionArmState reads THIS session's local arm-state file and returns its tri-state. It applies the mandatory liveness check and reaps a dead-owner fi
internal/cli/session_arm_state.go:458
↓ 27 callers
Method
Unsubscribe
Unsubscribe removes a subscriber and closes its channel. Safe to call with an already-removed channel — no-op in that case.
internal/collab/bus.go:120
↓ 27 callers
Function
clientIP
clientIP extracts the client IP from RemoteAddr. This is safe because TrustedProxyRealIP runs earlier in the chain and — when a trusted proxy is confi
internal/server/middleware_ratelimit.go:1076
↓ 27 callers
Method
count
()
web/src/lib/stores/pendingInvitations.svelte.ts:40
↓ 27 callers
Method
createLink
createLink mints a share link for the fixture's item or collection.
internal/server/handlers_share_attachments_test.go:182
↓ 27 callers
Function
emptyPreflight
emptyPreflight is the everything-is-zero case. Its whole job is to prove "nothing to report" renders as an explicit zero rather than as silence.
cmd/pad/item_copy_test.go:67
↓ 27 callers
Method
executeRequest
executeRequest builds + serves + packages a single HTTP request against the wrapped handler. Pulled out of Dispatch so the special-case methods (dispa
internal/mcp/dispatch_http.go:536
↓ 27 callers
Function
pushSession
TASK-3938. These run on SQLite, and on Postgres whenever PAD_TEST_POSTGRES_URL is set (testStore switches), so `make test-pg` is the Postgres half. pu
internal/store/push_devices_test.go:17
↓ 27 callers
Function
realBundleWithBlob
realBundleWithBlob uploads one PNG to a scratch source server and exports it as a tar bundle, so the bundle carries a real blob for the import to rehy
internal/server/handlers_import_bundle_husk_test.go:76
↓ 27 callers
Function
registryEnv
registryEnv gives a test a fresh HOME (so ~/.pad/sessions is empty) and a clean session environment, returning the sessions dir.
internal/cli/session_registry_test.go:18
↓ 27 callers
Method
resolve
(t *testing.T, slug string, body map[string]any)
internal/server/task4723_placement_test.go:62
↓ 27 callers
Method
seedNotif
seedNotif inserts a pending queue row for userID created at createdAt.
internal/store/task3939_push_dispatch_test.go:21
↓ 27 callers
Function
task3394Count
(t *testing.T, s *Store, q string, args ...any)
internal/store/task3394_install_clients_test.go:73
↓ 27 callers
Function
waitElectable
waitElectable polls until the room for itemID has at least n conns that pickApplier would actually elect — writable, anchored (replayDone), not frozen
internal/collab/manager_test.go:414
↓ 26 callers
Method
AuthorizeCrossWorkspaceRead
AuthorizeCrossWorkspaceRead decides whether the caller may READ the scoped resource in a workspace OTHER than the request's own. workspaceSlugOrID ma
internal/server/authz_cross_workspace.go:463
↓ 26 callers
Function
ExtractWikiLinks
ExtractWikiLinks scans `content` for [[...]] occurrences OUTSIDE any fenced or inline code region, parses each into a WikiLinkRef, and returns them in
internal/links/extract.go:488
↓ 26 callers
Method
MCP
MCP returns the underlying mark3labs MCPServer. Use this to register tools / resources / prompts BEFORE Run() takes over the stdio transport — registr
internal/mcp/server.go:116
↓ 26 callers
Method
QueryRowContext
(ctx context.Context, query string, args ...any)
internal/store/store.go:1025
↓ 26 callers
Method
SetCloudSidecar
SetCloudSidecar installs the reverse pad → pad-cloud client. Called from cmd/pad/main.go when PAD_CLOUD_SIDECAR_URL + PAD_CLOUD_SECRET are set. When u
internal/server/server.go:1070
↓ 26 callers
Method
SetTOTPSecret
SetTOTPSecret stores the TOTP secret for a user (before 2FA is verified). The secret is encrypted at rest if an encryption key is configured. It refus
internal/store/users.go:2133
↓ 26 callers
Method
admission
admission returns the shared stream admission gate, constructing an unbounded one on first use so a Server built without SetSSELimits (every test that
internal/server/server.go:1653
↓ 26 callers
Function
count
(t *testing.T, srv *Server, query string, args ...any)
internal/server/bug3382_verify_claim_test.go:100
↓ 26 callers
Function
edits
(pairs ...string)
internal/server/plan3578_patch_test.go:50
↓ 26 callers
Function
isSameIdentity
()
web/src/lib/attachments/undo.test.ts:77
↓ 26 callers
Function
mintWithResource
(t *testing.T, srv *Server, sess oauthSession, resource string)
internal/server/task3321_u2a_audience_test.go:56
↓ 26 callers
Function
newBug3133Fixture
(t *testing.T)
internal/server/handlers_items_bug3133_pending_guard_test.go:30
↓ 26 callers
Function
newDeadlineRecorder
()
internal/server/bug3637_sse_stalled_reader_test.go:252
↓ 26 callers
Function
newFake
(t *testing.T, handler func(f *fake, req wireRequest, raw []byte, w http.ResponseWriter))
internal/decision/decision_test.go:37
↓ 26 callers
Function
newGraphHTTP
(t *testing.T, roles ...models.CommitmentRolesInput)
internal/server/commitment_graph_entry_test.go:22
↓ 26 callers
Function
newHeartbeatBus
newHeartbeatBus builds a phase-1 bus (recognises heartbeats, publishes none) on a hand-driven clock, with an observer attached.
internal/events/redis_heartbeat_test.go:43
↓ 26 callers
Function
newMsFix
(t *testing.T)
internal/store/milestone_test.go:23
↓ 26 callers
Function
run
(m Mutator[string])
internal/appstore/testdata/genericiface/x.go:13
↓ 26 callers
Function
twoResourceOAuthServer
(t *testing.T)
internal/server/task3321_u2a_audience_test.go:19
↓ 25 callers
Method
Clone
Clone overrides DefaultSession.Clone so the returned value is a *Session, not a *DefaultSession. Without this override, fosite's internal Clone() call
internal/oauth/session.go:164
↓ 25 callers
Method
CreateSchedule
CreateSchedule attaches a schedule to a live item, with its first managed reminder row, in one transaction: both rows or neither.
internal/store/schedules.go:468
↓ 25 callers
Method
CreateScheduleLink
CreateScheduleLink links two commitments. Both ends need edit (the caller's decision in access); an end the caller cannot read is reported as not foun
internal/store/commitment_links.go:519
↓ 25 callers
Function
CrossWorkspaceItemScope
CrossWorkspaceItemScope scopes the check to one already-loaded item. Collection visibility is checked first and item-level grants second, in that orde
internal/server/authz_cross_workspace.go:342
↓ 25 callers
Method
GetReport
GetReport computes the windowed project report for a workspace.
internal/store/reports.go:188
↓ 25 callers
Function
OutstandingInstant
OutstandingInstant is the instant of sc's outstanding occurrence. view is the zone an armed floating schedule is read in; it is ignored otherwise. ok
internal/store/schedule_outstanding.go:50
↓ 25 callers
Method
SetAddWorkspaceMemberCommitHookForTesting
SetAddWorkspaceMemberCommitHookForTesting routes the COMMIT of AddWorkspaceMember and AcceptWorkspaceInvitation (commitWorkspaceMemberTx, BUG-3281) th
internal/store/testing_helpers.go:186
↓ 25 callers
Method
Until
Until set a new UNTIL for the rule and recalculates the timeset if needed. It will be truncated to second precision. Default to `Dtstart.Add(time.Dura
internal/schedule/internal/rrule/rrule.go:998
↓ 25 callers
Method
UserCount
UserCount returns the total number of registered users.
internal/store/users.go:834
↓ 25 callers
Function
assertDenied
(t *testing.T, got CrossWorkspaceAccess, want CrossWorkspaceDenialReason, label string)
internal/server/authz_cross_workspace_test.go:176
↓ 25 callers
Function
authedAgentRequest
BUG-2763. The activity debounce coalesced two writes by DIFFERENT writers into one row whenever they shared a user account — which every agent does, b
internal/server/handlers_activity_debounce_actor_test.go:31
↓ 25 callers
Function
chatUser
(t *testing.T, s *Store, name string)
internal/store/conversations_test.go:17
↓ 25 callers
Method
deadlineNotices
(t *testing.T)
internal/store/schedule_deadline_eval_test.go:47
↓ 25 callers
Function
decisionFixture
Typed-decision queue and storage (TASK-3117). Runs on both backends via testStore (PAD_TEST_POSTGRES_URL selects Postgres).
internal/store/decisions_test.go:16
↓ 25 callers
Method
events
(t *testing.T)
internal/store/schedule_fire_test.go:28
↓ 25 callers
Function
imageRef
(id string)
internal/server/handlers_share_attachments_test.go:179
↓ 25 callers
Method
list
(opts: { before_seq?: number; after_seq?: number; limit?: number } = {})
web/src/lib/stores/chatThread.svelte.test.ts:117
↓ 25 callers
Method
mkFor
mkFor creates a schedule on a fresh item created by userID.
internal/store/schedule_bootstrap_test.go:29
↓ 25 callers
Function
newBootFixture
(t *testing.T)
internal/store/schedule_bootstrap_test.go:20
↓ 25 callers
Function
newCopyRelationFixtureWith
newCopyRelationFixtureWith builds the relation fixture with two knobs the default constructor does not need: a `default` on the DESTINATION's relation
internal/server/handlers_items_copy_relation_test.go:309
↓ 25 callers
Function
newDeliveryEnv
newDeliveryEnv installs the test app, flags its pinned origin for webhooks as well as fetches, attaches a dispatcher, and drains what provisioning emi
internal/server/handlers_apps_delivery_test.go:34
↓ 25 callers
Function
newHarness
(t *testing.T, mode string, tweak func(*SupervisorConfig))
internal/materialize/supervisor_test.go:336
↓ 25 callers
Method
origin
()
internal/server/handlers_apps_install_test.go:117
↓ 25 callers
Function
rawReq
rawReq sends a request with an exact body. bearer and cookie are optional.
internal/server/handlers_push_devices_test.go:83
↓ 25 callers
Function
renegotiateRows
Capture complete rows, including timestamps and IDs, to detect any write.
internal/store/commitment_renegotiate_test.go:15
↓ 25 callers
Method
search
search runs q against /search (optionally naming a workspace) and returns the result titles, sorted. Titles, not refs: refs repeat across workspaces.
internal/server/bug3331_search_scope_test.go:158
↓ 25 callers
Function
walk
(node: Node, visit: (n: Node, ancestors: Node[]) => void, ancestors: Node[] = [])
web/src/test/identityFenceAst.ts:269
↓ 25 callers
Function
wantTitles
(t *testing.T, label string, rows []*needs.Row, want ...string)
internal/server/handlers_me_needs_test.go:168
↓ 25 callers
Function
withWorkspace
(in map[string]any)
internal/mcp/task4105_schedule_test.go:189
↓ 25 callers
Method
writeItemResolveError
writeItemResolveError distinguishes a soft-deleted (archived) item from a genuinely-missing one for mutation handlers. An archived item still appears
internal/server/handlers_items.go:1308
↓ 24 callers
Function
BuildCLIArgs
( cmdInfo cmdhelp.Command, input map[string]any, sessionWorkspace string, rootFlags map[string]string, )
internal/mcp/dispatch.go:519
↓ 24 callers
Method
ListWorkspaces
(ctx context.Context)
internal/mcp/errors.go:467
↓ 24 callers
Method
SoftDeleteAttachment
SoftDeleteAttachment marks the given attachment row deleted (and every variant whose parent_id points at it) so the orphan GC will reclaim the bytes a
internal/store/attachments.go:1548
↓ 24 callers
Function
WithTokenScopes
WithTokenScopes returns ctx decorated with the API token's JSON-encoded scopes string (e.g. `["read"]`, `["*"]`). Stashed by the MCP Bearer middleware
internal/server/context.go:100
↓ 24 callers
Function
WriteArmState
WriteArmState arms the current session (an explicit ON marker). See writeArmStateFile.
internal/cli/session_arm_state.go:197
↓ 24 callers
Function
chatDM
(t *testing.T, s *Store, owner *models.User, agent string)
internal/store/conversations_test.go:22
↓ 24 callers
Method
child
(t *testing.T, col *models.Collection, title string)
internal/store/milestone_test.go:40
↓ 24 callers
Method
create
(t *testing.T, tok, coll, title string)
internal/server/task3615_catch_up_test.go:79
↓ 24 callers
Function
debounceFixture
debounceFixture bootstraps one account and gives it a workspace and an item. Every write below rides this one account, which is the shape the bug need
internal/server/handlers_activity_debounce_actor_test.go:62
↓ 24 callers
Method
ensureRouter
ensureRouter lazily initializes the router on first use, so all Set* configuration is applied before the middleware chain is built.
internal/server/server.go:2912
↓ 24 callers
Function
errStructured
errStructured wraps a Go error into the standard MCP tool-error envelope (TASK-1077) with a stable identifier prefix (e.g. "pad_item.link"). Local hel
internal/mcp/catalog_item.go:768
↓ 24 callers
Function
fakeSSEResponse
fakeSSEResponse wraps a raw SSE body string in an *http.Response shaped enough for streamWatchEvents to read (it only touches .Body).
cmd/pad/cmd_watch_test.go:18
↓ 24 callers
Method
fanOutLocally
gen is the subscription this notification arrived on, or currentGen() for a caller that is not the receive loop. CHECKED HERE, under the lock that AP
internal/watchevents/redis_bus.go:1664
↓ 24 callers
Function
fieldErr
(field, code, msg string)
internal/store/schedules.go:81
↓ 24 callers
Method
line
(pos: number)
web/src/test/identityFenceAst.ts:343
↓ 24 callers
Function
meAgendaWorkspace
(t *testing.T, w *agendaWorld, name string)
internal/server/handlers_me_agenda_test.go:92
↓ 24 callers
Method
move
Move one finger; sends `touchMove` with the full active set.
web/e2e/lib/attachment-viewer.ts:389
↓ 24 callers
Function
newCapFixture
newCapFixture builds a store the way an existing install has it — migrated, users present, a workspace, PATs, and NO mcp_enabled row — then a server o
cmd/pad/mcp_capability_test.go:96
↓ 24 callers
Method
newRequest
newRequest creates an http.Request with auth and agent headers set.
internal/cli/client.go:3556
↓ 24 callers
Function
outboxEventsFor
Tests for the transactional event outbox (SPEC-3 §choke point, TASK-2658). The load-bearing case here is the DISJOINT-DELTA RULE (SPEC-3 v1.3): canon
internal/store/event_outbox_test.go:25
↓ 24 callers
Function
postFormWithCookie
postFormWithCookie POSTs an x-www-form-urlencoded body with both a session cookie and the matching CSRF cookie set, plus the session-bound User-Agent.
internal/server/handlers_oauth_test.go:2483
↓ 24 callers
Method
register
register adds a live connection under its user and workspace (either may be empty: a legacy workspace-token stream has no user, and the watch stream s
internal/server/access_kick.go:61
↓ 24 callers
Method
reopenOccurrenceAt
(workspaceID, itemID string, in ReopenInput, now time.Time)
internal/store/schedule_reopen.go:487
↓ 24 callers
Function
seen
seen is the sorted "type:title" set of a response.
internal/server/handlers_agenda_test.go:104
↓ 24 callers
Function
waitForLockWait
waitForLockWait blocks until Postgres reports some backend running a statement containing needle AND waiting on a lock. It is the barrier that makes "
internal/store/attachments_live_item_test.go:141
↓ 23 callers
Method
CreateDocument
(workspaceID string, input models.DocumentCreate)
internal/store/documents.go:144
↓ 23 callers
Method
CreateOAuthClient
============================================================ Clients (RFC 7591 — Dynamic Client Registration) ========================================
internal/store/oauth.go:90
↓ 23 callers
Method
CreatePasswordReset
CreatePasswordReset generates a reset token for the given user. Returns the plaintext token (to embed in the reset URL). The token is stored as a SHA-
internal/store/password_resets.go:19
↓ 23 callers
Function
CreateReversePatch
CreateReversePatch computes a patch that transforms newText back into oldText. Used for reverse-diff version storage: current doc has latest content,
internal/diff/diff.go:119
↓ 23 callers
Function
EnsureServer
EnsureServer checks if the pad server is running; if not, starts it in the background.
internal/cli/server.go:19
↓ 23 callers
Function
ExtractItemImplementationNotes
(fieldsJSON string)
internal/models/item.go:965
↓ 23 callers
Method
GetReminder
GetReminder returns one reminder scoped to a workspace, or (nil, nil) when no such row exists. WORKSPACE-SCOPED ON PURPOSE, even though the id is a U
internal/store/reminders.go:178
↓ 23 callers
Method
GetUserWorkspaces
(userID string)
internal/mcp/dispatch_http_lister.go:52
← previous
next →
601–700 of 31,743, ranked by callers