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
↓ 18 callers
Method
Hash
Hash is the entry's version: a sha256 over its content and the fields an update would write. It is computed from the text, so a fix to a body or an ar
internal/collections/builtin.go:44
↓ 18 callers
Method
IsMultiRelation
IsMultiRelation reports whether this field's value is an ORDERED LIST of references rather than a single one.
internal/models/collection.go:63
↓ 18 callers
Method
Log
(args ...any)
internal/store/storetest/pgtrace_test.go:17
↓ 18 callers
Method
Unsubscribe
Unsubscribe removes a local subscriber and closes its channel. Cancels the Redis subscription if this was the last local subscriber for the workspace.
internal/events/redis_bus.go:1326
↓ 18 callers
Method
UpdateItemWithParentLink
UpdateItemWithParentLink is UpdateItemWithPreCheck plus an OPTIONAL parent-link mutation applied inside the same transaction (BUG-2013). When parentLi
internal/store/items.go:2843
↓ 18 callers
Function
applyPostgresMigration
applyPostgresMigration applies a single Postgres migration file atomically. IDEA-1485: even though Postgres wraps each DDL statement in an implicit t
internal/store/store.go:1429
↓ 18 callers
Method
cancel
Drop everything (pane destroyed).
web/src/lib/items/linksRetry.ts:52
↓ 18 callers
Function
contextWithWorkspaceRoleForTest
contextWithWorkspaceRoleForTest / contextWithResolvedWorkspaceIDForTest stash the two values RequireWorkspaceAccess populates for the REQUEST's worksp
internal/server/authz_cross_workspace_test.go:19
↓ 18 callers
Function
createTestCalendarFeed
(t *testing.T, s *Server, u *models.User, layer string, ids ...string)
internal/server/handlers_calendar_feeds_test.go:28
↓ 18 callers
Function
createViaTx
Tests for createItemTx — the tx-taking counterpart of CreateItem (PLAN-2357 / DR-9a). Each test below pins one line of the DR-9a parity checklist: slu
internal/store/items_create_tx_test.go:22
↓ 18 callers
Method
do
do sends as the owner. A string body is sent verbatim.
internal/server/handlers_commitments_http_test.go:75
↓ 18 callers
Function
elapsedOffset
(secs int64)
internal/store/schedule_link_import_test.go:290
↓ 18 callers
Method
flush
Run a flush immediately for the given `markdown` + `ctx`, applying the * full recovery/dedupe gauntlet before the injected PATCH. Used by the *
web/src/lib/collab/collabFlush.svelte.ts:134
↓ 18 callers
Method
getItemTx
getItemTx is the in-transaction variant of GetItem. Used by UpdateItemWithPreCheck to re-read the parent under the workspace + parent-children locks s
internal/store/items.go:771
↓ 18 callers
Method
heldTotal
heldTotal returns the number of held slots. Backs pad_stream_connections_active as a scrape-time collector — see metrics.RegisterStreamConnectionsColl
internal/server/stream_admission.go:147
↓ 18 callers
Method
hooksAt
(path string)
internal/server/handlers_apps_delivery_test.go:79
↓ 18 callers
Method
invite
(email, role string)
internal/server/my_invitations_test.go:26
↓ 18 callers
Method
item
(t *testing.T, title, content string)
internal/server/materialize_recovery_test.go:122
↓ 18 callers
Method
log
(msg string, args ...any)
internal/server/events_publish_test.go:19
↓ 18 callers
Function
makeFanOutHandler
makeFanOutHandler returns the ToolHandlerFunc that mcp-go invokes when the tool is called. Reads `action` from the input, looks up the handler, and fo
internal/mcp/catalog.go:508
↓ 18 callers
Method
mkFor
mkFor creates a schedule on a fresh item created by userID.
internal/store/schedule_bootstrap_test.go:29
↓ 18 callers
Function
newBootFixture
(t *testing.T)
internal/store/schedule_bootstrap_test.go:20
↓ 18 callers
Function
newConsentEnv
(t *testing.T, mayCreate bool)
internal/server/handlers_workspace_create_consent_test.go:68
↓ 18 callers
Function
newRunnerFixture
(t *testing.T)
internal/decision/runner_test.go:60
↓ 18 callers
Method
open
(n: number | null)
web/src/lib/stores/chatThread.svelte.ts:238
↓ 18 callers
Method
patch
(t *testing.T, body map[string]any)
internal/server/plan3578_patch_test.go:42
↓ 18 callers
Function
rawReq
rawReq sends a request with an exact body. bearer and cookie are optional.
internal/server/handlers_push_devices_test.go:83
↓ 18 callers
Function
requireAdmin
--- Helpers ---
internal/server/handlers_admin_users.go:919
↓ 18 callers
Method
seedNeverAttached
seedNeverAttached inserts a never-attached attachment row aged past any grace cutoff a test will use.
internal/store/attachments_gc_claim_test.go:42
↓ 17 callers
Function
ApplyPatch
ApplyPatch applies a patch to baseText to produce the target text. Returns an error if the patch cannot be applied cleanly, or if the base or the patc
internal/diff/diff.go:38
↓ 17 callers
Function
AsValidationError
AsValidationError reports whether err is (or wraps) a ValidationError, and returns it. Doors use this instead of a bare errors.As so the Reason-not- E
internal/store/validation_error.go:45
↓ 17 callers
Method
ClaimItemLease
ClaimItemLease atomically acquires (or, for the live holder, refreshes) the execution lease on an item. It succeeds iff no live lease exists or the ca
internal/store/item_lease.go:62
↓ 17 callers
Method
CreateWebhook
CreateWebhook registers a new webhook for a workspace. With WithPlanLimit() the workspace's webhooks cap is counted in the insert's transaction, unde
internal/store/webhooks.go:16
↓ 17 callers
Method
Delete
Delete removes the blob identified by key. Deleting a missing key is NOT an error — callers (e.g. the orphan GC) treat it as the success case.
internal/attachments/store.go:55
↓ 17 callers
Method
Fetch
(ctx context.Context, args []string)
internal/mcp/resources.go:51
↓ 17 callers
Method
GetCrossWorkspaceBacklinks
GetCrossWorkspaceBacklinks returns inbound `[[ws::REF]]` backlinks pointing at the queried target (`targetWorkspaceID`, `targetRef`) from EVERY OTHER
internal/store/wiki_links.go:1388
↓ 17 callers
Function
NewRedisSessionPresence
NewRedisSessionPresence returns a shared registry backed by client. The client is the SAME one the watch bus uses (cmd/pad/cmd_server.go dials once o
internal/server/session_presence_redis.go:420
↓ 17 callers
Function
NewRegistry
NewRegistry returns an empty registry.
internal/decision/runner.go:150
↓ 17 callers
Function
OpenChatSeen
OpenChatSeen decides whether this process keeps a chat-seen log. It writes nothing yet: the file is created on the first line, so a session that never
internal/cli/chat_seen.go:107
↓ 17 callers
Method
Path
Path is the log's path, or "" when there is none.
internal/cli/chat_seen.go:125
↓ 17 callers
Function
RedactText
RedactText masks credentials in free text: an error message, a response body, a log message. It recognises the shapes a credential takes in text (an A
internal/logging/scrub.go:64
↓ 17 callers
Method
ScanNUL
ScanNUL counts and locates every stored value violating the NUL invariant. Read-only: it issues SELECTs and nothing else, so it is safe to run agains
internal/store/nulscan.go:169
↓ 17 callers
Method
SearchItems
(workspaceID, query string)
internal/store/items.go:4119
↓ 17 callers
Method
SeedDefaultCollections
SeedDefaultCollections rescues a workspace that ended up with zero collections by seeding it with the standard Software-shape Defaults(). It is intent
internal/store/collections.go:1200
↓ 17 callers
Method
SetMCPTransport
MCP transport state. Set at startup by cmd/pad via SetMCPTransport on every install (PLAN-2310 DR-4); whether a request may reach it is decided per re
internal/server/handlers_mcp.go:65
↓ 17 callers
Function
SniffMIME
SniffMIME detects the MIME type from the leading bytes of a payload using net/http's stdlib detector (the same RFC 6838 algorithm browsers use). The r
internal/attachments/mime.go:249
↓ 17 callers
Method
String
()
internal/materialize/supervisor_test.go:903
↓ 17 callers
Function
UpdateStore
UpdateStore is the load-modify-save for credentials.json, under the exclusive credentials lock (BUG-3649): two `pad auth login` runs for different ser
internal/cli/credentials.go:555
↓ 17 callers
Function
appDo
TASK-3401 U6b: the app API's writes.
internal/server/task3401b_app_writes_test.go:22
↓ 17 callers
Function
bodyDecodesNUL
bodyDecodesNUL reports only the NUL half of scanRequestBody.
internal/server/middleware_request_text.go:495
↓ 17 callers
Method
buildAuthedRequest
( ctx context.Context, method, urlPath string, body []byte, user *models.User, )
internal/mcp/dispatch_http.go:624
↓ 17 callers
Function
callToolRequest
── test helpers ── callToolRequest builds an mcp.CallToolRequest with the given input arguments — the public constructor isn't exposed by mcp-go so we
internal/mcp/catalog_test.go:389
↓ 17 callers
Method
create
(body any)
internal/server/handlers_commitments_http_test.go:151
↓ 17 callers
Function
createHeadlessEditor
(markdownOverrides: Record<string, unknown> = {})
web/src/lib/collab/materializer/headless.ts:115
↓ 17 callers
Method
deadline
deadline gives schedule i a hard deadline at its occurrence.
internal/store/commitment_gates_outcome_test.go:32
↓ 17 callers
Function
decodeItemFields
(t *testing.T, fieldsJSON string)
internal/server/handlers_items_fieldpatch_test.go:27
↓ 17 callers
Function
deleteCollection
( fixture: SuiteFixture, request: APIRequestContext, slug: string )
web/e2e/lib/attachment-viewer.ts:539
↓ 17 callers
Function
f
(type: string, over: Partial<FieldDef> = {})
web/src/lib/collections/laneDrafts.test.ts:23
↓ 17 callers
Function
floorEvent
(n int, seq int64)
cmd/pad/chat_floor_test.go:27
↓ 17 callers
Method
handler
()
cmd/pad/bug4024_item_list_json_autopage_test.go:41
↓ 17 callers
Function
importAs
importAs posts a gzip bundle through the real door as the given session.
internal/server/handlers_import_bundle_husk_test.go:135
↓ 17 callers
Function
isAPITokenAuth
isAPITokenAuth returns true if the request was authenticated via an API token (not a session cookie or CLI session). Use this to gate sensitive operat
internal/server/middleware_auth.go:661
↓ 17 callers
Method
item
item creates an item and, when sc is non-nil, its schedule.
internal/server/handlers_agenda_test.go:53
↓ 17 callers
Function
itoa
(n int)
internal/cli/session_owner_test.go:218
↓ 17 callers
Method
key
The live key, or null when a part is missing.
web/src/lib/attachments/viewFence.ts:90
↓ 17 callers
Method
last
()
web/src/lib/stores/chatThread.property.svelte.test.ts:128
↓ 17 callers
Method
link
(p, c int, pr, cr, policy string)
internal/server/commitment_graph_entry_test.go:45
↓ 17 callers
Function
list
(name string, v []int)
internal/schedule/reachability_test.go:14
↓ 17 callers
Function
newCopyTestClient
newCopyTestClient points a Client at ts with a HOME that has no saved credentials, so the test never picks up the developer's real token.
internal/cli/client_items_copy_test.go:17
↓ 17 callers
Function
newMovedToFixture
(t *testing.T)
internal/server/item_moved_to_test.go:49
↓ 17 callers
Function
newPadServer
newPadServer stands up the same *server.Server that production uses, wired to a fast fixture SQLite store (storetest.NewSQLite, IDEA-1914). Mirrors te
internal/mcp/dispatch_http_test.go:940
↓ 17 callers
Method
occTotal
(t *testing.T, scheduleID string)
internal/store/schedule_resolve_test.go:80
↓ 17 callers
Function
off
()
web/src/lib/components/items/itemDetailIdentityLoad.svelte.test.ts:320
↓ 17 callers
Method
ok
ok issues the preflight as the owner and requires a 200.
internal/server/handlers_items_copy_preflight_test.go:202
↓ 17 callers
Function
parseItemRef
parseItemRef parses "PREFIX-123" into ("PREFIX", 123, true). Returns false if the string is not a valid item ref. Case-insensitive: "task-5", "Task-5"
internal/store/items.go:1054
↓ 17 callers
Method
pinScheduleTx
pinScheduleTx holds the item, the workspace and the schedule for the rest of the transaction, in that order, in one statement: the same shape as a fir
internal/store/schedule_resolve.go:1089
↓ 17 callers
Method
put
(path string, body interface{}, result interface{})
internal/cli/client.go:3273
↓ 17 callers
Function
putBlob
Blob-read authorization tests for PLAN-2391 / TASK-2401 (BUG-2386). handleGetAttachment used to open with a flat requireMinRole("viewer"). roleLevel(
internal/server/handlers_attachments_download_authz_test.go:33
↓ 17 callers
Function
readControlWithin
readControlWithin reads frames off the conn within d, drains payload (binary) frames, and returns the FIRST TextMessage parsed as a ControlMessage. Te
internal/collab/manager_test.go:1879
↓ 17 callers
Function
readFixture
readFixture loads one of the real encoder outputs described in testdata/README.md. Every ISO-BMFF acceptance assertion in this file runs on those byte
internal/attachments/mime_isobmff_test.go:16
↓ 17 callers
Function
sanitize
sanitize copies v with every credential-named entry masked and every string scrubbed, bounded in depth, width and total nodes so a hostile, cyclic or
internal/logging/scrub.go:670
↓ 17 callers
Method
scheduleRolesOf
scheduleRolesOf is the roles a schedule reads as: the columns of a native row, legacyRoles of a legacy_backfill row.
internal/store/commitment.go:83
↓ 17 callers
Function
seen
seen is the sorted "type:title" set of a response.
internal/server/handlers_agenda_test.go:104
↓ 17 callers
Method
server
(t *testing.T)
cmd/pad/task3462_u3c_library_builtin_test.go:31
↓ 17 callers
Method
snapshot
()
internal/events/observer_test.go:131
↓ 17 callers
Function
sp
(v T)
internal/store/commitment_links_guard_test.go:23
↓ 17 callers
Method
stream
(w io.Writer, resp *http.Response, lastEventID string)
cmd/pad/cmd_watch.go:721
↓ 17 callers
Function
task3394Req
(clientID, subject, requestID string)
internal/store/task3394_install_clients_test.go:64
↓ 17 callers
Function
task3399Req
task3399Req is a delegated grant's persistence request, as the consent decision builds its session data.
internal/store/task3399_delegated_barrier_test.go:47
↓ 17 callers
Function
testStoreOAuth
Tests for the OAuth server constructor + audience strategy + storage adapter (PLAN-943 TASK-951 sub-PR B). Each layer is covered: - NewServer: requir
internal/oauth/server_test.go:40
↓ 17 callers
Function
writeForbidden
(w http.ResponseWriter, code, message, reason string)
internal/server/server.go:3019
↓ 16 callers
Method
Add
Add implements SessionPresence. Returns the generated id even when the Redis write fails. That is deliberate and it is the same posture the rest of t
internal/server/session_presence_redis.go:458
↓ 16 callers
Function
ChatDirectionOn
ChatDirectionOn reads fresh on every call and requires explicit delivery consent.
internal/cli/chat_direction_state.go:71
↓ 16 callers
Method
Commit
Commit makes the staged bytes the canonical blob for their hash and returns its key. On a miss the temp file is renamed into place. On a hit it is unl
internal/attachments/staged.go:118
↓ 16 callers
Method
EnableTOTP
EnableTOTP atomically enables 2FA for a user and stores hashed recovery codes. The expectedSecret is the plaintext secret — it's compared against the
internal/store/users.go:1975
↓ 16 callers
Method
Error
()
internal/materialize/globals.go:66
↓ 16 callers
Method
IsConfigured
IsConfigured reports whether the client has an explicit global connection configuration, either from config.toml or an environment/flag override.
internal/config/config.go:737
↓ 16 callers
Method
IsRelation
IsRelation reports whether this field's value names other items — a single one for "relation", an ordered list for "multi_relation". Use it for FIELD
internal/models/collection.go:57
↓ 16 callers
Function
MigrateFields
MigrateFields maps field values from a source schema to a target schema. Fields with matching keys and compatible types are transferred. Incompatible
internal/items/migrate.go:62
↓ 16 callers
Function
NewProcessor
NewProcessor returns the Processor compiled into this binary. Pure-Go build → pureGoProcessor. libvips build → vipsProcessor (Phase 2). Constructed o
internal/attachments/processor_purego.go:43
← previous
next →
801–900 of 28,840, ranked by callers