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
↓ 174 callers
Method
CreateAPIToken
(userID string, input models.APITokenCreate, defaultExpiryDays, maxLifetimeDays int, opts ...MintOption)
internal/store/api_tokens.go:33
↓ 172 callers
Method
Printf
(_ context.Context, format string, v ...interface{})
cmd/pad/redis_logger.go:39
↓ 170 callers
Method
Rebind
Rebind converts a query with "?" placeholders to the dialect's format. For SQLite this is a no-op. For PostgreSQL, "?" becomes "$1", "$2", etc.
internal/store/dialect.go:29
↓ 170 callers
Method
getWorkspaceID
getWorkspaceID resolves workspace slug/ID from the request. If RequireWorkspaceAccess already resolved the workspace, reads from context. Otherwise fa
internal/server/server.go:3554
↓ 169 callers
Method
set
The list an outside fetch got back, under the token it reserved.
web/src/lib/stores/pendingInvitations.svelte.ts:65
↓ 168 callers
Method
Name
()
internal/needs/needs.go:355
↓ 166 callers
Method
GetCollectionBySlug
(workspaceID, slug string)
internal/store/collections.go:357
↓ 165 callers
Method
ListItems
(workspaceID string, params models.ItemListParams)
internal/store/items.go:1274
↓ 162 callers
Method
DeleteItem
(T, ...store.MutationOption)
internal/appstore/testdata/genericifacebody/x.go:8
↓ 161 callers
Method
D
D returns the store's dialect for building backend-specific SQL.
internal/store/store.go:400
↓ 159 callers
Method
status
(t *testing.T, tok string, it models.Item, status string)
internal/server/task3615_catch_up_test.go:98
↓ 158 callers
Method
Dispatch
Dispatch satisfies the Dispatcher interface. cliArgs are accepted for interface compatibility but ignored — HTTPHandlerDispatcher reads the structured
internal/mcp/dispatch_http.go:289
↓ 157 callers
Method
reload
(t *testing.T, itemID string)
internal/store/schedule_fire_test.go:33
↓ 157 callers
Function
textOf
textOf returns the text of the first content block, or empty string. Robust to mcp-go's content-type variations (TextContent, ErrorContent).
internal/mcp/catalog_test.go:397
↓ 154 callers
Function
fixedUserResolver
fixedUserResolver is a tiny helper for the unit tests that need a deterministic user without standing up the auth middleware.
internal/mcp/dispatch_http_test.go:23
↓ 153 callers
Function
getClient
()
cmd/pad/main.go:387
↓ 152 callers
Function
waitFor
( what: string, fn: () => T | null | undefined | false | Promise<T | null | undefined | false>, timeoutMs =
web/e2e/lib/real-install.ts:288
↓ 149 callers
Function
tick
()
web/src/lib/collab/materializer/materializerParity.svelte.test.ts:191
↓ 148 callers
Method
create
(t *testing.T, in models.ScheduleCreate)
internal/store/schedules_test.go:42
↓ 147 callers
Method
SetMemberCollectionAccess
SetMemberCollectionAccess updates a member's collection_access mode and replaces their specific collection grants atomically.
internal/store/workspace_members.go:720
↓ 147 callers
Method
call
(tool: string, args: Record<string, unknown>)
web/src/mcp-app/bridge.ts:20
↓ 146 callers
Function
currentUser
currentUser returns the authenticated user from the request context, or nil if no user is authenticated.
internal/server/middleware_auth.go:658
↓ 145 callers
Function
newAgendaWorld
(t *testing.T, slugs ...string)
internal/server/handlers_agenda_test.go:36
↓ 144 callers
Method
add
(m: ChatMessage)
web/src/lib/stores/chatThread.svelte.test.ts:93
↓ 143 callers
Method
remove
* Delete a message (V6, V7: idempotent, a repeat answers 200 with the same * tombstone) and merge the tombstone in place only after server success.
web/src/lib/stores/chatThread.svelte.ts:567
↓ 142 callers
Method
Err
Err is the stream's first write or flush failure, or nil.
internal/server/sse_stream.go:85
↓ 141 callers
Method
CreateItemGrant
--- Item Grants --- CreateItemGrant creates a direct grant on an item for a user.
internal/store/grants.go:128
↓ 139 callers
Method
GetUserByEmail
GetUserByEmail retrieves a user by email address (case-insensitive).
internal/store/users.go:281
↓ 138 callers
Method
Error
()
internal/cli/client.go:2697
↓ 138 callers
Function
needsBackends
TASK-3920: GET /me/needs, the cross-workspace needs-you inbox. Every test runs on SQLite and, with PAD_TEST_POSTGRES_URL set, on Postgres too. Fixture
internal/server/handlers_me_needs_test.go:29
↓ 137 callers
Method
Addr
Addr returns the host:port listen address.
internal/config/config.go:1034
↓ 136 callers
Function
doRequestWithHeaders
doRequestWithHeaders is a thin variant of doRequest that lets a test set arbitrary request headers (e.g. Authorization) without spinning up a real aut
internal/server/handlers_items_test.go:19
↓ 135 callers
Method
url
(rest string)
internal/server/bug3814_version_chain_snapshot_test.go:92
↓ 132 callers
Method
token
(u *models.User, scopes string)
internal/server/handlers_commitments_http_test.go:47
↓ 131 callers
Method
Stop
()
internal/server/home_hint.go:17
↓ 131 callers
Function
mustUser
(t *testing.T, srv *Server, email, username, role string)
internal/server/authz_cross_workspace_test.go:76
↓ 129 callers
Function
captureStdout
captureStdout runs fn with os.Stdout redirected and returns what it wrote. The list commands print through fmt/os.Stdout rather than cmd.OutOrStdout,
cmd/pad/format_markdown_routing_test.go:48
↓ 127 callers
Function
NewWorkspaceState
NewWorkspaceState returns a state pre-seeded with `initial`. Pass an empty string to start with no default — the first tool call will then need an exp
internal/mcp/workspace.go:57
↓ 125 callers
Method
Len
()
internal/schedule/internal/rrule/util.go:22
↓ 121 callers
Method
Decode
Decode reads bytes from r and returns the decoded image plus the detected format ("png", "jpeg", "gif", "bmp", "tiff", …). The returned format is the
internal/attachments/processor.go:35
↓ 121 callers
Function
PrintJSON
PrintJSON prints any value as indented (human-readable) JSON.
internal/cli/format.go:509
↓ 121 callers
Method
must
(rr *httptest.ResponseRecorder, code int, what string)
internal/server/workspace_access_notify_test.go:121
↓ 119 callers
Method
Write
(p []byte)
internal/server/sse_stream.go:91
↓ 119 callers
Function
getWorkspace
()
cmd/pad/main.go:396
↓ 119 callers
Method
mustResolve
(t *testing.T, item *models.Item, in ResolveInput, now string)
internal/store/schedule_resolve_test.go:72
↓ 117 callers
Function
render
()
web/src/routes/(console)/settings/admin/mcpAuditTab.svelte.test.ts:33
↓ 116 callers
Function
parseTime
(s string)
internal/store/store.go:1661
↓ 115 callers
Function
NewMemoryOpBus
NewMemoryOpBus returns a ready-to-use in-process bus.
internal/collab/memory_bus.go:38
↓ 114 callers
Method
clear
()
web/src/lib/stores/lastWorkspace.svelte.ts:26
↓ 113 callers
Method
Error
()
internal/mcp/catalog.go:289
↓ 112 callers
Function
decodeJSON
2 MiB decodeJSON reads and unmarshals the JSON body into v. Wraps the body in http.MaxBytesReader so an attacker can't exhaust memory by POSTing a mul
internal/server/server.go:3311
↓ 112 callers
Function
loginTestUser
loginTestUser creates a user + session, returns the user + the raw session token suitable for AddCookie.
internal/server/handlers_oauth_test.go:2439
↓ 107 callers
Method
IsZero
IsZero reports whether the secret is empty.
internal/secret/secret.go:53
↓ 106 callers
Function
doRequestWithBearer
doRequestWithBearer dispatches a request with an Authorization: Bearer header set. The existing test helpers in server_test.go don't take a token para
internal/server/middleware_auth_public_paths_test.go:25
↓ 106 callers
Method
member
(ws *models.Workspace, u *models.User, role string)
internal/server/handlers_me_needs_test.go:67
↓ 105 callers
Method
Close
Close shuts down the bus. All subscriber channels are closed under the same write-lock that gates Publish/Subscribe so a final inflight Publish can't
internal/collab/memory_bus.go:209
↓ 105 callers
Method
allEdit
()
internal/store/commitment_links_test.go:54
↓ 105 callers
Function
mkUser
(t *testing.T, srv *Server, email string)
internal/server/handlers_storage_delete_authz_test.go:107
↓ 104 callers
Method
Close
Close shuts the bus down, closing every subscriber channel.
internal/watchevents/watchevents.go:356
↓ 104 callers
Function
NewClientFromURL
NewClientFromURL creates a client from a full base URL (e.g., "https://app.getpad.dev").
internal/cli/client.go:81
↓ 104 callers
Method
contains
(id string)
cmd/pad/cmd_watch_chat.go:201
↓ 103 callers
Method
SetCloudMode
SetCloudMode enables cloud mode with the shared sidecar secret(s). Accepts a comma-separated list of secrets for rotation support: "new-key,old-key" —
internal/server/server.go:1018
↓ 100 callers
Method
path
(p string)
internal/server/task3401_app_api_test.go:195
↓ 99 callers
Method
do
(t *testing.T, method, path string, body any)
internal/server/task4699_placement_test.go:50
↓ 97 callers
Function
createWSForTest
(t *testing.T, srv *Server)
internal/server/server_test.go:275
↓ 95 callers
Function
NewRoomManager
NewRoomManager wires the store + bus together with production defaults.
internal/collab/manager.go:363
↓ 95 callers
Method
input
()
internal/store/agent_claim_test.go:62
↓ 95 callers
Function
setupWatchTestUser
setupWatchTestUser seeds a workspace + item, mints a real user + user-scoped Bearer token (mirrors handlers_stars_test.go's pattern), and returns ever
internal/server/handlers_watches_test.go:16
↓ 94 callers
Method
Close
Close shuts down the event bus and cleans up resources.
internal/events/bus.go:321
↓ 94 callers
Function
NewSQLite
NewSQLite returns a *store.Store backed by a fresh SQLite file in t.TempDir(), fully migrated. See the package doc for the template+copy mechanism. St
internal/store/storetest/storetest.go:55
↓ 94 callers
Method
mustExec
(t *testing.T, query string, args ...interface{})
internal/store/workspace_purge_test.go:62
↓ 92 callers
Function
New
New creates a new Metrics instance with a custom registry and registers all application metrics plus Go runtime and process collectors.
internal/metrics/metrics.go:572
↓ 92 callers
Method
String
String renders a violation the way the CLI reports it.
internal/store/nulscan.go:77
↓ 90 callers
Method
Set
Set adds or replaces the credential for the given server URL. The canonical URL is mirrored into the value's ServerURL field so a caller reading the c
internal/cli/credentials.go:336
↓ 90 callers
Method
as
(tok, method, path string, body any)
internal/server/handlers_commitments_http_test.go:79
↓ 90 callers
Method
assign
(t *testing.T, itemID, userID string)
internal/store/schedule_fire_test.go:75
↓ 88 callers
Function
currentUserID
currentUserID returns the authenticated user's ID, or empty string.
internal/server/middleware_auth.go:720
↓ 87 callers
Method
Write
(p []byte)
internal/mcp/response_cap.go:164
↓ 87 callers
Function
newSchedHTTP
(t *testing.T)
internal/server/handlers_commitments_http_test.go:32
↓ 87 callers
Function
ptr
(v T)
internal/store/schedule_fire.go:218
↓ 86 callers
Method
SeedCollectionsFromTemplate
SeedCollectionsFromTemplate seeds the workspace with collections from the named template. An empty template name materializes the default collections
internal/store/collections.go:1264
↓ 86 callers
Method
Unsubscribe
Unsubscribe removes a subscriber and closes its channel.
internal/events/bus.go:280
↓ 85 callers
Method
ExportWorkspace
ExportWorkspace exports all data for a workspace into a portable format, every section read from ONE snapshot (see ExportWorkspaceSnapshot).
internal/store/export.go:154
↓ 85 callers
Method
close
()
web/src/lib/services/sseStreamBudget.svelte.test.ts:166
↓ 84 callers
Function
WithCurrentUser
Exported context-key helpers for callers that need to synthesize an authenticated request without going through the auth middleware chain (e.g. the in
internal/server/context.go:36
↓ 83 callers
Method
Replace
(text string)
internal/store/redact_match.go:75
↓ 83 callers
Function
liveCmdhelpDoc
liveCmdhelpDoc returns a minimal cmdhelp.Document with every command path the read-only catalog references. Lighter than re-running pad's full cobra e
internal/mcp/catalog_readonly_test.go:554
↓ 82 callers
Function
newCopyPreflightFixture
(t *testing.T)
internal/server/handlers_items_copy_preflight_test.go:81
↓ 81 callers
Method
CreateComment
CreateComment adds a new comment to an item. userID is the authenticated user authoring the comment (empty for agent/system comments); it's stored as
internal/store/comments.go:20
↓ 81 callers
Method
EventsSince
EventsSince returns events for a workspace with IDs greater than sinceID. Used to replay missed events on SSE reconnect (Last-Event-ID). Returns nil
internal/events/bus.go:318
↓ 81 callers
Function
oauthEnabledTestServer
oauthEnabledTestServer builds a Server with cloud mode + a real internal/oauth.Server backed by the test store. Returns the Server so each test can dr
internal/server/handlers_oauth_test.go:54
↓ 80 callers
Method
UpdateCollection
(id string, input models.CollectionUpdate)
internal/store/collections.go:559
↓ 79 callers
Method
Count
()
internal/ics/ics.go:30
↓ 79 callers
Method
Subscribe
Subscribe returns a channel that receives every future Notification, with NO replay. There is exactly one logical stream (unlike internal/events.Event
internal/watchevents/watchevents.go:315
↓ 79 callers
Function
registerTestClient
===================================================================== Helpers ===================================================================== re
internal/server/handlers_oauth_test.go:2412
↓ 78 callers
Function
bothBackends
bothBackends runs body against SQLite and, under `make test-pg`, Postgres. testServer is SQLite-only whatever gate is running, so the Postgres leg nee
internal/server/bug3163_reserved_write_doors_test.go:38
↓ 77 callers
Method
GetSchedule
GetSchedule returns an item's schedule, or (nil, nil) when it has none.
internal/store/schedules.go:444
↓ 77 callers
Function
New
New creates a new in-memory EventBus with default replay buffer settings.
internal/events/bus.go:725
↓ 77 callers
Function
notifyUser
(t *testing.T, s *Store, email string)
internal/store/notification_settings_test.go:27
↓ 76 callers
Method
ImportWorkspace
ImportWorkspace is ImportWorkspaceWithReport for callers with no use for the report.
internal/store/export.go:736
← previous
next →
101–200 of 31,743, ranked by callers