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
↓ 29 callers
Method
Write
(p []byte)
cmd/pad/cmd_item.go:2422
↓ 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
Function
bearerCall
(t *testing.T, srv *Server, method, path, token string, body []byte)
internal/server/handlers_watches_test.go:62
↓ 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
commitmentPath
(f *schedHTTP)
internal/server/handlers_commitments_test.go:16
↓ 29 callers
Function
createTestWorkspace
createTestWorkspace creates a workspace via API and returns its slug.
internal/server/handlers_events_test.go:118
↓ 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
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
↓ 29 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
↓ 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
Function
newProvisionEnv
(t *testing.T)
internal/server/handlers_apps_provision_test.go:23
↓ 29 callers
Function
newTestRedisBus
(t *testing.T)
internal/events/redis_resume_coverage_test.go:11
↓ 29 callers
Method
read
()
web/src/lib/items/fieldWriteOrder.test.ts:44
↓ 29 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:144
↓ 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
DeleteAccountAtomic
DeleteAccountAtomic deletes a user and all their owned workspaces in a single transaction. If any step fails, the entire operation is rolled back and
internal/store/users.go:1407
↓ 28 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
↓ 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
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:238
↓ 28 callers
Method
acquireWorkspaceSeqLock
acquireWorkspaceSeqLock takes a Postgres advisory transaction lock keyed on the workspace ID so concurrent seq-bumping mutations serialize. The lock a
internal/store/items.go:127
↓ 28 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
↓ 28 callers
Function
doAuthedRequest
doAuthedRequest is like doRequest but with a session cookie + the matching User-Agent attached (SessionAuth UA-binding, see middleware_auth.go:186).
internal/server/handlers_oauth_test.go:2459
↓ 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
moveInput
(sc *models.ItemSchedule, target string)
internal/store/commitment_move_test.go:21
↓ 28 callers
Function
newCrossWSFixture
(t *testing.T)
internal/server/authz_cross_workspace_test.go:50
↓ 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
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
reject
()
web/src/lib/components/fields/FieldEditor.typedDebounce.svelte.test.ts:338
↓ 28 callers
Function
strPtr
(s string)
internal/store/timeline_pagination_test.go:191
↓ 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
↓ 27 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
↓ 27 callers
Method
BaseURL
BaseURL returns the configured base URL.
internal/email/sender.go:100
↓ 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
Function
DefaultConfig
()
internal/config/config.go:440
↓ 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:457
↓ 27 callers
Method
SetEventBus
SetEventBus attaches an event bus for real-time SSE streaming.
internal/server/server.go:1236
↓ 27 callers
Method
WriteHeader
(status int)
internal/mcp/chatgpt_security.go:206
↓ 27 callers
Method
append
append adds an event to the ring buffer, evicting the oldest if full.
internal/events/bus.go:459
↓ 27 callers
Function
at
(d time.Duration)
internal/store/task3939_push_dispatch_test.go:18
↓ 27 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
↓ 27 callers
Function
captureStderr
captureStderr runs fn with os.Stderr redirected and returns what was written.
cmd/pad/item_reserved_field_test.go:50
↓ 27 callers
Method
confirm
The sub-view's Delete row — resolve the gate true.
web/src/lib/attachments/surfaceDeleteConfirm.svelte.ts:56
↓ 27 callers
Method
count
()
web/src/lib/stores/pendingInvitations.svelte.ts:40
↓ 27 callers
Method
dispatch
(t *testing.T, cmd []string, input map[string]any)
internal/mcp/dispatch_http_clear_parent_test.go:100
↓ 27 callers
Function
handler
({ transaction }: { transaction: LocalChangeProbe })
web/src/lib/items/confirmedBase.ts:142
↓ 27 callers
Function
newLocalOnlyBus
newLocalOnlyBus builds a RedisBus without starting its subscription, for the tests that exercise the local fan-out path directly. Constructing through
internal/watchevents/redis_bus_test.go:63
↓ 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
Function
remoteCall
remoteCall runs a pad_item action through the /mcp dispatcher against a handler that records the request and answers 200 {}.
internal/mcp/task4105_schedule_test.go:89
↓ 27 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
↓ 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
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
↓ 27 callers
Function
tzCLIWithLocal
tzCLIWithLocal sets the machine zone BEFORE the stub server starts: its goroutines read time.Local, so a later write is a data race (TASK-4101). The z
cmd/pad/task4101_timezone_test.go:57
↓ 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
Function
NewMemorySessionPresence
NewMemorySessionPresence returns an empty in-process registry.
internal/server/session_presence.go:364
↓ 26 callers
Method
ResolveOccurrence
ResolveOccurrence resolves the outstanding occurrence of an item's schedule.
internal/store/schedule_resolve.go:151
↓ 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:1020
↓ 26 callers
Method
SetSessionPresence
SetSessionPresence attaches the live-session registry read by GET /api/v1/sessions and written by GET /api/v1/events/stream (PLAN-2558 S1). Nil-checke
internal/server/server.go:1254
↓ 26 callers
Method
UpdateUser
UpdateUser updates mutable user fields.
internal/store/users.go:209
↓ 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:1602
↓ 26 callers
Method
current
(t *testing.T)
internal/server/plan3578_patch_test.go:33
↓ 26 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
↓ 26 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:784
↓ 26 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
↓ 26 callers
Function
mustCreateOwnedWorkspace
(t *testing.T, srv *Server, name string, owner *models.User)
internal/server/token_workspace_consent_scope_test.go:58
↓ 26 callers
Method
nativeCommit
(t *testing.T)
internal/store/commitment_c1_test.go:57
↓ 26 callers
Method
need
(u *models.User, query string, mods ...func(context.Context) context.Context)
internal/server/handlers_me_needs_test.go:147
↓ 26 callers
Function
newDeadlineRecorder
()
internal/server/bug3637_sse_stalled_reader_test.go:252
↓ 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
newPinFixture
(t *testing.T, driver store.DriverType)
internal/server/bug3982_pinned_token_test.go:30
↓ 26 callers
Function
render
(save: SaveStatus, collab: CollabConnectionState | null)
web/src/lib/components/items/SaveSyncStatus.svelte.test.ts:11
↓ 26 callers
Function
within
(outer: Node | null | undefined, x: Node)
web/src/lib/components/items/childIdentityFencePopulation.test.ts:703
↓ 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
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
GetTemplate
GetTemplate returns the workspace template with the given name, or nil if no template with that name exists.
internal/collections/templates.go:1119
↓ 25 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
↓ 25 callers
Function
ParseCollectionTraits
ParseCollectionTraits decodes a stored traits JSON blob. An empty or "null" blob yields the zero value with no error — a collection that declares no t
internal/models/collection_traits.go:176
↓ 25 callers
Function
assertDenied
(t *testing.T, got CrossWorkspaceAccess, want CrossWorkspaceDenialReason, label string)
internal/server/authz_cross_workspace_test.go:176
↓ 25 callers
Function
chatUser
(t *testing.T, s *Store, name string)
internal/store/conversations_test.go:17
↓ 25 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
↓ 25 callers
Method
createLink
createLink mints a share link for the fixture's item or collection.
internal/server/handlers_share_attachments_test.go:182
↓ 25 callers
Method
deadlineNotices
(t *testing.T)
internal/store/schedule_deadline_eval_test.go:47
↓ 25 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:1881
↓ 25 callers
Method
events
(t *testing.T)
internal/store/schedule_fire_test.go:28
↓ 25 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:512
↓ 25 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
↓ 25 callers
Function
mintWithResource
(t *testing.T, srv *Server, sess oauthSession, resource string)
internal/server/task3321_u2a_audience_test.go:56
← previous
next →
501–600 of 28,840, ranked by callers