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
↓ 6 callers
Method
DeleteAccountAtomicReport
DeleteAccountAtomicReport is DeleteAccountAtomic that also reports the workspaces whose grants the user had ISSUED, read from the rows the transaction
internal/store/users.go:1575
↓ 6 callers
Method
DeleteAccountAtomicReportCtx
DeleteAccountAtomicReportCtx is DeleteAccountAtomicReport under ctx; see DeleteAccountAtomicCtx.
internal/store/users.go:1581
↓ 6 callers
Method
DeleteItemLink
(id string)
internal/store/items.go:4535
↓ 6 callers
Function
DetectTools
DetectTools returns the tools that appear to be in use, based on any of: a project-local directory, a home-directory install, or a binary on PATH.
internal/cli/agents.go:170
↓ 6 callers
Method
DrainInstallDeliveries
DrainInstallDeliveries is the wait between the phases: until the install has no unexpired in-flight webhook delivery row, in database time (DOC-3371 §
internal/store/app_lifecycle.go:149
↓ 6 callers
Method
DropOwedDelivery
DropOwedDelivery decides a delivery that is past the drop age. In ONE transaction that takes the install row first, as admission does, it runs admissi
internal/store/app_delivery.go:184
↓ 6 callers
Method
EmitBulkHeaderEvent
EmitBulkHeaderEvent writes the batch header for one handler-path bulk operation, in its own transaction after the member loop. WHY THIS IS NOT A TRAN
internal/store/event_outbox.go:2357
↓ 6 callers
Function
EmitJSON
EmitJSON walks the command tree below `target`, builds a cmdhelp v0.1 Document, and writes it to w as indented JSON terminated by a newline. `root` M
internal/cmdhelp/json.go:73
↓ 6 callers
Method
EncryptWebhookSecretsAtRest
EncryptWebhookSecretsAtRest encrypts plaintext webhook HMAC secrets (BUG-2057). Called on startup when an encryption key is configured. It handles two
internal/store/encryption.go:190
↓ 6 callers
Function
EnvConfig
EnvConfig reads the decision-provider settings from the environment. The variables follow the PAD_MAILEROO_API_KEY pattern in internal/config: PAD_DE
internal/decision/config.go:67
↓ 6 callers
Method
Error
()
internal/server/handlers_import_bundle.go:1457
↓ 6 callers
Method
Exec
(query string, args ...any)
internal/store/yjs_updates.go:111
↓ 6 callers
Method
FTSMatch
FTSMatch returns the full-text search predicate and its arguments. SQLite quotes tokens and prefixes the last eligible part. PostgreSQL preserves both
internal/store/dialect.go:114
↓ 6 callers
Function
FirstDuplicateJSONKey
FirstDuplicateJSONKey reports the first object member name that appears twice in the same object, at any depth. It walks EVERY depth: each object on
internal/models/json_duplicate_keys.go:24
↓ 6 callers
Method
FirstParkedQueueRef
FirstParkedQueueRef returns the Ref of the first parked queue item in the role lane (in canonical lane order), or nil when none exists. When collectio
internal/store/role_park.go:1098
↓ 6 callers
Method
GetAccessToken
GetAccessToken hydrates an access token by its HMAC signature. Returns ErrOAuthInactiveToken if the row exists but has been revoked / rotated out, Err
internal/store/oauth.go:339
↓ 6 callers
Method
GetAgentSignup
GetAgentSignup returns a user's signup row, or nil when there is none.
internal/store/agent_signups.go:190
↓ 6 callers
Method
GetAttachmentVariant
GetAttachmentVariant returns the derived attachment row for parentID with the given variant key (e.g. "thumb-sm"), or (nil, nil) if no such row exists
internal/store/attachments.go:444
↓ 6 callers
Method
GetBillingMetrics
GetBillingMetrics fetches an aggregated Stripe-derived snapshot from pad-cloud's /admin/metrics/billing endpoint (active subs, MRR, ARR, churn, cancel
internal/server/server.go:1063
↓ 6 callers
Method
GetCollectionAnyState
GetCollectionAnyState is GetCollection without the `deleted_at IS NULL` filter — used by the open-children guard (IDEA-1494 R3 P3) so a child still at
internal/store/collections.go:316
↓ 6 callers
Method
GetCollectionAnyStateTx
GetCollectionAnyStateTx is GetCollectionAnyState through an OPEN TRANSACTION. Exported for the open-children guard, which runs inside the item-update
internal/store/collections.go:324
↓ 6 callers
Method
GetCommitmentFor
GetCommitmentFor is GetCommitment for one reader: canRead says whether that reader may read a given child item (nil: every child). The milestone half
internal/store/commitment.go:157
↓ 6 callers
Method
GetConversationByNumber
GetConversationByNumber resolves a number in the actor's own numbering (numbers are per owner; 2a conversations are all the actor's own).
internal/store/conversations.go:203
↓ 6 callers
Method
GetRelationBacklinks
GetRelationBacklinks returns the live items that reference targetItemID through a `relation` field, filtered to what this viewer may see. VISIBILITY
internal/store/relation_links.go:278
↓ 6 callers
Method
InsertItemVerifications
InsertItemVerifications stores one batch of verdicts on one item, in one transaction, all stamped with the same created_at. Each row's ItemID, ViaItem
internal/store/verifications.go:51
↓ 6 callers
Function
IsDiffSmaller
IsDiffSmaller returns true if storing a diff would be meaningfully smaller than storing the full content. Returns false for near-complete rewrites whe
internal/diff/diff.go:106
↓ 6 callers
Method
IsItemStarred
IsItemStarred checks whether a specific item is starred by a user.
internal/store/item_stars.go:43
↓ 6 callers
Function
IsServerRunning
IsServerRunning reports whether a server answers on the configured address.
internal/cli/server.go:276
↓ 6 callers
Function
IsTerminalStatusDefault
IsTerminalStatusDefault checks using the default fallback list (for cases where no collection schema is available).
internal/models/terminal.go:445
↓ 6 callers
Method
ItemStateHash
ItemStateHash hashes an item's body and its values for this entry's update fields, the way Hash hashes the entry, so it equals Hash exactly when the i
internal/collections/builtin.go:106
↓ 6 callers
Method
ListAllItems
ListAllItems is ListItems for a caller that needs every matching row (a report): it follows the server's next-offset until has-more is false (BUG-3704
internal/cli/client.go:458
↓ 6 callers
Method
ListArchivedItemWorkspaceMovesBySource
ListArchivedItemWorkspaceMovesBySource returns at most `limit` MOVE rows for one source — rows with archived_source true — newest first. It serves th
internal/store/item_workspace_moves.go:160
↓ 6 callers
Method
ListItemVersionsPage
ListItemVersionsPage returns an item's versions newest-first, bounded to `limit` rows (limit <= 0 means unbounded). Raw rows — reverse-patch versions
internal/store/items.go:7085
↓ 6 callers
Method
ListUsers
ListUsers returns all users.
internal/store/users.go:489
↓ 6 callers
Method
ListVersions
(documentID string)
internal/store/versions.go:91
↓ 6 callers
Method
ListWatchesForUser
ListWatchesForUser returns every watch a user holds, across ALL workspaces they're a member of, newest first — enriched with the watched item's ref/ti
internal/store/watches.go:70
↓ 6 callers
Method
LoadMaterializeInput
LoadMaterializeInput reads the item's op-log for a recovery job. It returns nil (no error) when the item is missing, soft-deleted, or has no op-log.
internal/store/materialize_flush.go:62
↓ 6 callers
Function
LoadPadToml
LoadPadToml finds and reads the nearest .pad.toml by walking up from cwd. Returns nil if no .pad.toml is found (not an error).
internal/cli/workspace.go:89
↓ 6 callers
Method
MarkConversationRead
MarkConversationRead advances the member's read marker, capped at last_seq (TASK-4038).
internal/store/conversations.go:653
↓ 6 callers
Method
MarkExplicit
MarkExplicit records that the caller chose the current values of the named persisted fields (toml keys, e.g. "mode", "url"), so Save writes them even
internal/config/config.go:863
↓ 6 callers
Method
Message
Message renders the issue the way every door reports it. One function so the six refusing doors cannot phrase the same refusal three ways.
internal/store/relation_referents.go:119
↓ 6 callers
Function
MigratedRefusalTables
MigratedRefusalTables returns the population, sorted, for the guard test and the renderer to consume the same value.
internal/store/migrated.go:355
↓ 6 callers
Method
MintContextCode
MintContextCode mints a code for viewerID's click on actionKey of installID for itemID in workspaceID, after the same checks redeem makes, under the s
internal/store/app_item_actions.go:307
↓ 6 callers
Method
Model
Model is the pinned model identifier this provider will use.
internal/decision/decision.go:299
↓ 6 callers
Function
New
New wraps the store for app writes.
internal/appstore/appstore.go:74
↓ 6 callers
Function
NewRedisBus
NewRedisBus creates a Redis-backed Bus with the default replay buffer size and opens the shared subscription immediately. The client should already be
internal/watchevents/redis_bus.go:474
↓ 6 callers
Function
NewRedisTransport
NewRedisTransport returns a transport on keys' home_hints channel. It uses its OWN client, cloned from client's options with context timeouts enabled:
internal/homehint/homehint.go:59
↓ 6 callers
Function
NewStructuredEntryID
NewStructuredEntryID mints the id of an implementation-note or decision-log entry: the prefix and a unix-nano timestamp, the shape every writer has us
internal/models/item.go:1727
↓ 6 callers
Function
NormaliseUserCode
NormaliseUserCode removes display separators and Unicode whitespace.
internal/store/cli_auth_sessions.go:407
↓ 6 callers
Function
NormalizeWorkspaceSettings
(raw string)
internal/models/workspace_settings.go:82
↓ 6 callers
Method
Outcome
Outcome reports the recorded failure, if any.
internal/server/mcp_tool_outcome.go:41
↓ 6 callers
Function
ParkAfter
ParkAfter returns a ParkSpec that places the park line immediately after itemID.
internal/store/role_park.go:77
↓ 6 callers
Method
Problems
Problems lists every configured value that could not be used, as "VARIABLE: reason" lines for a startup warning. An unset origin is not a problem; it
internal/config/mcp.go:80
↓ 6 callers
Function
PromptBody
PromptBody returns the canonical body text for a registered prompt. Exported so tests can assert lockstep with SKILL.md without duplicating the litera
internal/mcp/prompts.go:85
↓ 6 callers
Method
ReadFrom
(r io.Reader)
internal/server/flush_error_writer.go:101
↓ 6 callers
Method
RecordNotificationsSent
RecordNotificationsSent records ids as pushed, BY ID AND NOT BY CLAIM: this is the one deliberate exception to "settle only under the claim". A delive
internal/store/push_dispatch_settle.go:35
↓ 6 callers
Function
RegisterResources
RegisterResources installs the read-only MCP resource templates on srv: - pad://workspace/{ws}/items/{ref} — single item markdown - pad://workspace/{
internal/mcp/resources.go:173
↓ 6 callers
Method
ReleaseItemLease
ReleaseItemLease clears the caller's lease on an item. Idempotent: releasing an absent or expired lease is a no-op (released=false), never an error —
internal/store/item_lease.go:157
↓ 6 callers
Function
RenderAttachmentChip
RenderAttachmentChip builds a Notion-style file-chip anchor for a non-image attachment. `target=_blank` + `rel=noopener noreferrer` matches the existi
internal/server/render/attachments.go:243
↓ 6 callers
Function
RenderAttachmentMissing
RenderAttachmentMissing builds a placeholder span for a missing/deleted attachment. Keeps the document layout intact and tells the user *why* there's
internal/server/render/attachments.go:272
↓ 6 callers
Function
RenderMarkdown
RenderMarkdown writes a Document as markdown matching cmdhelp v0.1 §6. Useful for tests that build a Document manually and want to render it without r
internal/cmdhelp/md.go:29
↓ 6 callers
Function
ReplaceTitle
ReplaceTitle rewrites every link to oldTitle as a link to newTitle. LEGACY helper used by the document-rename path: case-sensitive, and whole-body lin
internal/links/links.go:33
↓ 6 callers
Function
ReservedItemFieldKeys
ReservedItemFieldKeys returns the reserved keys in a stable order, for callers that need to enumerate rather than test membership (schema-key validati
internal/models/item.go:370
↓ 6 callers
Function
ResolveAutoArmFromDisk
ResolveAutoArmFromDisk loads both config sources (the nearest .pad.toml and the user's config.toml) and returns the resolved auto-arm decision. Failur
internal/cli/arm_consent.go:82
↓ 6 callers
Method
RevokeUserAppGrant
RevokeUserAppGrant ends a delegated app grant the user holds, in one transaction: its access and refresh tokens are deactivated, an unused code or PKC
internal/store/app_grants.go:104
↓ 6 callers
Method
SetAccessKickTransport
SetAccessKickTransport installs the cross-instance kick transport and subscribes this instance to it. Idempotent for the same transport; installing a
internal/server/access_kick.go:154
↓ 6 callers
Method
SetAfterItemPreLockReadHookForTesting
SetAfterItemPreLockReadHookForTesting sets the afterItemPreLockRead seam (see its field comment) for the lifetime of the returned restore function, so
internal/store/testing_helpers.go:156
↓ 6 callers
Method
SetAppAPIAudience
SetAppAPIAudience records the app API resource (the only audience an install client may hold). The server sets it at startup from its origin; with non
internal/store/install_clients.go:174
↓ 6 callers
Function
SetApplierTimeoutsForTesting
SetApplierTimeoutsForTesting shrinks the designated-applier round-trip's first-attempt and retry budgets, returning a function that restores them. Th
internal/collab/applier_testhooks.go:19
↓ 6 callers
Method
SetBeforeCommitmentPinHookForTesting
SetBeforeCommitmentPinHookForTesting sets the pre-lock commitment seam. Production code must not call this. Set it only with no request in flight.
internal/store/testing_helpers.go:356
↓ 6 callers
Function
SetDisplayLocationResolver
SetDisplayLocationResolver installs the CLI process's lazy viewer-zone lookup. A nil resolver restores the UTC default, including for non-CLI consumer
internal/cli/zone.go:9
↓ 6 callers
Method
SetHomeHintTransport
SetHomeHintTransport installs the cross-instance home-hint transport and subscribes this instance to it. Idempotent for the same transport; installing
internal/server/home_hint_hub.go:92
↓ 6 callers
Method
SetLastRestoreSeq
SetLastRestoreSeq records the item.seq of the most recent restore for itemID, kept monotonically non-decreasing (a later restore always has a higher s
internal/collab/manager.go:255
↓ 6 callers
Method
SetOpLogGCConfig
SetOpLogGCConfig overrides the default sweep interval (1h) and minimum row age (24h). Pass 0 for either to keep the package default. Must be called be
internal/server/oplog_gc.go:46
↓ 6 callers
Method
SetSeedCollectionsFailureHookForTesting
SetSeedCollectionsFailureHookForTesting makes SeedCollectionsFromTemplate return hook's error, once the template's collections exist and before any of
internal/store/testing_helpers.go:206
↓ 6 callers
Method
SetSpawn
SetSpawn injects the goroutine spawner used for deliveries. Passing the server's tracked-goroutine helper (Server.goAsync) makes Server.Stop() wait fo
internal/webhooks/dispatcher.go:272
↓ 6 callers
Method
Snapshot
Snapshot includes the target's persisted state and workspace-wide mutation counts, including rows belonging to soft-deleted items.
internal/store/storetest/ref_prefix.go:52
↓ 6 callers
Method
Stage
Stage writes r to a temp file beside the content-addressed shard, hashing as it goes, and fsyncs it. It reads at most limit bytes and refuses with Err
internal/attachments/staged.go:52
↓ 6 callers
Method
StartOpLogGC
StartOpLogGC kicks off the periodic prune-sweep loop. Idempotent — calling twice silently no-ops. Must be called AFTER SetCollabRoomManager; the loop
internal/server/oplog_gc.go:66
↓ 6 callers
Method
StartSynced
StartSynced reports whether the rule itself produces Start. When it does not, Start is not an occurrence (dateutil semantics): a WEEKLY BYDAY=FR rule
internal/schedule/spec.go:134
↓ 6 callers
Method
String
()
internal/server/bug4019_totp_lazy_decrypt_test.go:134
↓ 6 callers
Method
SuspendTraitUniquenessForTesting
SuspendTraitUniquenessForTesting drops TASK-2710's partial unique indexes and returns a restore function that recreates them. Defer the restore, so a
internal/store/testing_helpers.go:61
↓ 6 callers
Method
SweepExpiredOAuthRows
SweepExpiredOAuthRows deletes rows whose requested_at is before the table's cutoff, batchSize rows per statement and at most maxBatches statements per
internal/store/oauth_sweep.go:65
↓ 6 callers
Function
ToolSkillPath
ToolSkillPath returns the full path where a tool's skill file would be installed.
internal/cli/agents.go:210
↓ 6 callers
Method
TouchUserWrite
TouchUserWrite updates last_write_at for a user, throttled to avoid write amplification. Only writes if the stored value is older than 5 minutes. Best
internal/store/users.go:1254
↓ 6 callers
Function
URLHost
URLHost deliberately drops userinfo, path, query and fragment: URL secrets need not have recognisable names (a webhook path is often the credential).
internal/logging/redaction.go:230
↓ 6 callers
Function
UndeclaredOverrideKeys
UndeclaredOverrideKeys returns the keys in an override map that the target schema does not declare, sorted so a caller's error message is stable for a
internal/items/overrides.go:31
↓ 6 callers
Method
UnmarkStripeEventProcessed
UnmarkStripeEventProcessed deletes a row from stripe_processed_events, allowing Stripe retries of the same event ID to be handled again (TASK-736). Us
internal/store/stripe_events.go:155
↓ 6 callers
Method
UpdateWorkspaceGroup
UpdateWorkspaceGroup renames the group and/or replaces its members. visible is the set of workspaces the caller can see; when ids replaces the list, t
internal/store/workspace_groups.go:241
↓ 6 callers
Function
ValidateUsername
ValidateUsername checks a username for format, length, and reserved word violations. It does NOT check uniqueness (that requires a store call).
internal/server/username.go:16
↓ 6 callers
Function
VerifyClaimCode
VerifyClaimCode returns true if code matches the derived code for (userID, workspaceID) at the current OR previous time bucket — the sliding 5–10 minu
internal/server/claim_codes.go:127
↓ 6 callers
Function
WithTokenExpiresAt
WithTokenExpiresAt makes CreateAPIToken expire the token at exactly t, instead of a whole number of days from now: an unclaimed account's token ends w
internal/store/limits.go:271
↓ 6 callers
Function
WrapOpKey
WrapOpKey wraps err in an OpKeyError when the marshalled request body has a non-empty top-level op_key. It returns err unchanged when err is nil or th
internal/cli/client.go:3675
↓ 6 callers
Function
WriteUpdateConflictError
WriteUpdateConflictError formats an optimistic-concurrency conflict to w in the canonical two-track shape (TASK-2022), mirroring WriteOpenChildrenErro
internal/cli/client.go:2872
↓ 6 callers
Function
accountDeleteServer
BUG-3099. The delete-account handler read the list of workspaces to delete BEFORE the deletion's transaction, and DeleteAccountAtomic soft-deleted onl
internal/server/bug3099_account_delete_owned_test.go:17
↓ 6 callers
Function
ackJournal
(t *testing.T, f *schedFixture, sc *models.ItemSchedule)
internal/store/schedule_ack_test.go:27
↓ 6 callers
Method
activeTokens
(t *testing.T)
internal/store/bug3678_refresh_after_revoke_test.go:62
↓ 6 callers
Function
activeUserFixture
BUG-3349: no credential is minted for an account that is disabled or gone. Every credential insert goes through requireActiveUserTx.
internal/store/bug3349_active_user_test.go:20
↓ 6 callers
Method
add
add records user under kind unless they are the actor, empty, or already in.
internal/store/notifications.go:204
↓ 6 callers
Method
addAppPrincipalMemberTx
addAppPrincipalMemberTx makes a bot a member of its install's workspace. The install transaction is its only caller. The ordinary member door (addWork
internal/store/app_principal.go:55
← previous
next →
2,701–2,800 of 31,743, ranked by callers