Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
6,005 in github.com/PerpetualSoftware/pad
⨍
Functions
6,005
◇
Types & classes
763
↓ 1 callers
Method
Health
Health checks if the server is running.
internal/cli/client.go:85
↓ 1 callers
Method
ILike
()
internal/store/dialect.go:258
↓ 1 callers
Method
Init2FASecret
Init2FASecret loads the 2FA challenge signing key from platform_settings. If no key exists (first run), a new random key is generated and persisted. T
internal/server/server.go:370
↓ 1 callers
Method
InitEmailFromSettings
InitEmailFromSettings loads email config from platform settings on startup, merging with any env-var-based sender that was already attached.
internal/server/server.go:957
↓ 1 callers
Method
IntrospectToken
IntrospectToken validates an opaque OAuth access token without going through the public RFC 7662 HTTP endpoint. Used by sub-PR E's MCPBearerAuth middl
internal/oauth/server.go:272
↓ 1 callers
Method
InvalidateAuthorizeCodeSession
InvalidateAuthorizeCodeSession marks a code's row inactive. Called by fosite once /token successfully exchanges the code; subsequent reads return ErrI
internal/oauth/storage.go:218
↓ 1 callers
Function
IsLineageItemLinkType
(linkType string)
internal/models/item_links.go:41
↓ 1 callers
Function
IsReservedUsername
IsReservedUsername checks if a username is in the reserved list.
internal/server/username.go:92
↓ 1 callers
Method
IsShared
IsShared reports whether this state is a process-global instance serving multiple users. Callers use it to avoid persisting or trusting a session defa
internal/mcp/workspace.go:88
↓ 1 callers
Method
IsWorkspaceCoveredForUser
IsWorkspaceCoveredForUser reports whether the given workspace is already covered by any of the user's active OAuth connections — either by the connect
internal/store/oauth_connections.go:469
↓ 1 callers
Method
ItemsModifiedSince
ItemsModifiedSince returns items in a workspace that were updated after the given timestamp. Used for incremental sync on tab resume. Also returns IDs
internal/store/items.go:4353
↓ 1 callers
Method
JSONArrayElements
JSONArrayElements returns a FROM-clause table-function fragment that unnests a JSON text-array column into one row per element, plus the expression yi
internal/store/dialect.go:113
↓ 1 callers
Method
JSONExtractText
(column, key string)
internal/store/dialect.go:140
↓ 1 callers
Method
JSONExtractText
(column, key string)
internal/store/dialect.go:222
↓ 1 callers
Method
JSONRemove
(column, key string)
internal/store/dialect.go:235
↓ 1 callers
Method
JSONSet
JSONSet returns SQL to set a value at a path in a JSON column. SQLite: json_set(col, '$.key', ?) PostgreSQL: jsonb_set(col::jsonb, '{key}', ?::jsonb)
internal/store/dialect.go:44
↓ 1 callers
Method
LatestYjsUpdateSchemaVersion
LatestYjsUpdateSchemaVersion + PruneYjsUpdatesBefore power the schema-mismatch rebuild flow (TASK-1268). The room manager checks the most recent op-lo
internal/collab/room.go:143
↓ 1 callers
Method
ListAPITokens
ListAPITokens returns all API tokens for a workspace (without secrets).
internal/store/api_tokens.go:143
↓ 1 callers
Method
ListActivity
--- Activity ---
internal/cli/client.go:489
↓ 1 callers
Function
ListAllTemplates
ListAllTemplates returns every registered template, including ones flagged Hidden. Intended for internal tooling (e.g. tests, demo seeding) that needs
internal/collections/templates.go:932
↓ 1 callers
Method
ListAttachments
ListAttachments returns a page of attachments in the workspace, applying any filters set on params. Empty fields are omitted from the query string so
internal/cli/client.go:1470
↓ 1 callers
Method
ListCollectionGrants
ListCollectionGrants returns all grants on a collection.
internal/store/grants.go:55
↓ 1 callers
Method
ListComments
ListComments returns all comments for an item, ordered chronologically.
internal/store/comments.go:94
↓ 1 callers
Method
ListDeletedWorkspaces
ListDeletedWorkspaces returns the soft-deleted workspaces the current user owns that are still restorable (not yet past the purge window).
internal/cli/client.go:135
↓ 1 callers
Method
ListDormantOpLogItemsBefore
ListDormantOpLogItemsBefore + PruneItemOpLogIfDormantBefore power the periodic prune sweep (TASK-1309). Selects items whose ENTIRE op-log is older tha
internal/collab/room.go:156
↓ 1 callers
Method
ListItemGrants
ListItemGrants returns all grants on an item.
internal/store/grants.go:143
↓ 1 callers
Method
ListItemsChangesSince
ListItemsChangesSince returns the skinny-projection of items that have mutated (create / update / soft-delete / restore) since the given seq cursor, i
internal/store/items.go:1200
↓ 1 callers
Method
ListItemsIndex
ListItemsIndex returns the skinny-projection of items in a workspace — every column EXCEPT i.content. Used by the local-first read model (PLAN-1343) s
internal/store/items.go:1072
↓ 1 callers
Method
ListPendingInvitationsAdmin
ListPendingInvitationsAdmin returns all pending invitations across all workspaces with workspace and inviter details for the admin panel.
internal/store/workspace_members.go:913
↓ 1 callers
Method
ListPlaybooks
--- Playbooks --- ListPlaybooks returns the workspace's playbook metadata array (PLAN-1377 / TASK-1382). Same shape as bootstrap.playbooks.
internal/cli/client.go:439
↓ 1 callers
Method
ListShareLinkViews
ListShareLinkViews returns view history for a share link.
internal/store/share_links.go:299
↓ 1 callers
Method
ListStarredItems
ListStarredItems returns the current user's starred items in a workspace.
internal/cli/client.go:309
↓ 1 callers
Method
ListTags
ListTags returns the distinct tags used across a workspace's items with per-tag item counts (ordered by count desc then tag asc).
internal/cli/client.go:218
↓ 1 callers
Method
ListWorkspaceGraphLinks
ListWorkspaceGraphLinks returns every edge for the workspace graph view: all item_links rows (parent / blocks / implements / related) plus resolved sa
internal/store/graph.go:57
↓ 1 callers
Method
ListWorkspaceInvitations
ListWorkspaceInvitations returns all invitations for a workspace.
internal/store/workspace_members.go:765
↓ 1 callers
Method
ListWorkspaces
ListWorkspaces returns every non-deleted workspace, unordered by user. This is intended for admin-panel cross-tenant views and the pre-auth/fresh-inst
internal/store/workspaces.go:15
↓ 1 callers
Method
ListenAndServe
(addr string)
internal/server/server.go:1747
↓ 1 callers
Method
Login
Login authenticates with email and password.
internal/cli/client.go:907
↓ 1 callers
Method
LoginVerify2FA
LoginVerify2FA completes a 2FA login by submitting a TOTP or recovery code.
internal/cli/client.go:917
↓ 1 callers
Method
Logout
Logout destroys the current session.
internal/cli/client.go:1011
↓ 1 callers
Method
LookupPasswordReset
LookupPasswordReset performs a read-only validation of a reset token and returns the associated user WITHOUT consuming the token. Used by the reset ha
internal/store/password_resets.go:55
↓ 1 callers
Method
MaxItemSeq
MaxItemSeq returns the largest items.seq across the workspace, or 0 if the workspace has no items. This is the cursor floor for the local-first read m
internal/store/items.go:1428
↓ 1 callers
Method
MaxOpLogID
MaxOpLogID returns MAX(id) of the persisted op-log rows for an item. ok is false when no rows exist. Used by the watermark- advancement check on colla
internal/store/yjs_updates.go:211
↓ 1 callers
Function
NewRateLimiters
NewRateLimiters creates rate limiters with sensible defaults.
internal/server/middleware_ratelimit.go:204
↓ 1 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:59
↓ 1 callers
Function
NewSQLiteUnmanaged
NewSQLiteUnmanaged behaves like NewSQLite but does NOT register a t.Cleanup to close the store — the caller owns Store.Close() and must call it explic
internal/store/storetest/storetest.go:67
↓ 1 callers
Method
Now
()
internal/store/dialect.go:156
↓ 1 callers
Function
OnboardSeedPlaybook
OnboardSeedPlaybook returns the onboard playbook as a SeedPlaybook ready for SeedCollectionsFromTemplate to insert into a new workspace at init time.
internal/collections/playbook_library_onboard.go:296
↓ 1 callers
Function
OpenInEditor
OpenInEditor opens a temp file with content in the user's editor, waits for the editor to close, and returns the (possibly modified) content.
internal/cli/editor.go:14
↓ 1 callers
Method
OptOutEmail
OptOutEmail adds an email address to the opt-out list.
internal/store/email_optouts.go:16
↓ 1 callers
Method
OrphanedAttachments
OrphanedAttachments returns rows eligible for orphan GC reclamation (TASK-886). Two cases qualify: - Never-attached uploads: item_id IS NULL AND dele
internal/store/attachments.go:546
↓ 1 callers
Method
Placeholder
(n int)
internal/store/dialect.go:214
↓ 1 callers
Function
PlanPlaybook
PlanPlaybook returns the library entry for the generic `plan` playbook. Title is "Plan a new initiative" to read well in the library card and avoid co
internal/collections/playbook_library_plan.go:194
↓ 1 callers
Method
PollCLIAuthSession
PollCLIAuthSession checks the status of a CLI auth session.
internal/cli/client.go:1004
↓ 1 callers
Method
PopulateHasChildren
PopulateHasChildren sets HasChildren=true on items that have at least one child linked via parent link_type. Operates in-place on the slice.
internal/store/items.go:3933
↓ 1 callers
Method
PostStreamWithContentType
PostStreamWithContentType POSTs a streaming body (typically an *os.File for a multi-GiB bundle import) without buffering the full payload in memory cl
internal/cli/client.go:865
↓ 1 callers
Function
PrintCollectionTable
PrintCollectionTable prints collections in a formatted table.
internal/cli/format.go:508
↓ 1 callers
Function
PrintItemMeta
PrintItemMeta prints item metadata header with colors.
internal/cli/format.go:437
↓ 1 callers
Function
PrintJSONCompact
PrintJSONCompact prints any value as compact (no-indent) JSON — a single line plus trailing newline. Preferred for machine-consumed payloads where pre
internal/cli/format.go:431
↓ 1 callers
Method
PruneAndApply
PruneAndApply runs applyFn under the per-item setup lock so it is strictly serialised with any in-flight Join's addConn+replayTo for the same itemID.
internal/collab/manager.go:704
↓ 1 callers
Method
PruneItemOpLogIfDormantBefore
(itemID string, before time.Time)
internal/collab/room.go:157
↓ 1 callers
Method
PruneStripeProcessedEvents
PruneStripeProcessedEvents deletes stripe_processed_events rows older than maxAge. Returns the number of rows removed. Intended to be called on a sche
internal/store/stripe_events.go:119
↓ 1 callers
Method
Publish
Publish delegates to the inner bus and increments the publish counter.
internal/metrics/instrumented_bus.go:78
↓ 1 callers
Method
RawStream
RawStream issues a GET and copies the response body into w as it arrives. Returns the number of bytes written and a *http.Response pointer the caller
internal/cli/client.go:820
↓ 1 callers
Method
Record
Record adds or updates an installation entry.
internal/cli/registry.go:87
↓ 1 callers
Method
RecordMCPTierMismatch
RecordMCPTierMismatch bumps the pad_mcp_authz_denials_total counter with reason="tier_mismatch" (TASK-1119). Wired from internal/mcp/dispatch_http.go'
internal/server/middleware_auth.go:702
↓ 1 callers
Function
RegisterMeta
RegisterMeta installs the pad://_meta/version static resource on srv so MCP clients can discover pad's tool-surface stability tier without parsing the
internal/mcp/meta.go:73
↓ 1 callers
Method
RemapAttachmentReferencesInWorkspace
RemapAttachmentReferencesInWorkspace rewrites every "pad-attachment:OLD" reference in items.content + items.fields to "pad-attachment:NEW" for every (
internal/store/attachments.go:791
↓ 1 callers
Method
RemoveOAuthProvider
RemoveOAuthProvider removes a provider from the user's oauth_providers list.
internal/store/users.go:711
↓ 1 callers
Method
RemoveReaction
RemoveReaction removes a specific emoji reaction by a user from a comment.
internal/store/reactions.go:48
↓ 1 callers
Method
RemoveWorkspaceMemberAndRevokeGrants
RemoveWorkspaceMemberAndRevokeGrants atomically removes a user from a workspace and revokes all their grants in a single transaction. This prevents th
internal/store/workspace_members.go:53
↓ 1 callers
Function
ReplaceTitle
ReplaceTitle replaces all [[oldTitle]] with [[newTitle]] in content. LEGACY helper used by the document-rename path; case-sensitive, no-pipe forms onl
internal/links/links.go:14
↓ 1 callers
Method
RequireVerifiedEmail
RequireVerifiedEmail is the /api/v1 method-gated enforcement point for DR-4. Mounted immediately after RequireAuth in setupRouter, it rejects mutating
internal/server/middleware_verified_email.go:125
↓ 1 callers
Method
ResolveUserPermission
ResolveUserPermission resolves the effective permission for a user on a specific item, following the permission resolution order from DOC-406: 1. Owne
internal/store/grants.go:279
↓ 1 callers
Method
RestoreWorkspace
RestoreWorkspace un-soft-deletes a workspace by slug via the restore endpoint (owner-only server-side). Returns the now-live workspace.
internal/cli/client.go:142
↓ 1 callers
Function
RewriteWikiTitle
RewriteWikiTitle rewrites the four title-form wiki-link shapes that resolve to an item titled `oldTitle` in collection `collSlug`, substituting `newTi
internal/links/links.go:51
↓ 1 callers
Method
RotateRefreshToken
RotateRefreshToken revokes the entire grant — both the refresh family AND the paired access family for the given requestID — then fosite immediately i
internal/store/oauth.go:404
↓ 1 callers
Method
RunPlaybook
RunPlaybook binds the supplied args to the playbook's declared spec and returns the body + bound args + any unsatisfied required args. Side-effect-fre
internal/cli/client.go:460
↓ 1 callers
Method
Save
Save writes the store to disk in v2 format with mode 0600. Always writes the current version constant — even if the store was loaded from v1, this is
internal/cli/credentials.go:209
↓ 1 callers
Method
SchemaVersion
SchemaVersion exposes the version this manager stamps on persisted op-log rows. The HTTP collab handler uses it to validate incoming `?schema_version=
internal/collab/manager.go:27
↓ 1 callers
Method
SeedPlanLimits
SeedPlanLimits writes the default plan limits to platform_settings if they don't already exist. Called on server startup. Idempotent — existing values
internal/store/limits.go:247
↓ 1 callers
Method
SendPaymentFailed
SendPaymentFailed notifies a user that a Stripe invoice attempt failed. Called by the sidecar (via POST /api/v1/admin/payment-failed) after it handles
internal/email/templates.go:195
↓ 1 callers
Method
SendWelcome
SendWelcome sends a welcome email after registration. If unsubscribeURL is non-empty, an unsubscribe link is included in the footer.
internal/email/templates.go:62
↓ 1 callers
Method
SetBillingAvailable
SetBillingAvailable marks this deployment as having Stripe Checkout wired up. Called from cmd/pad/main.go when PAD_BILLING_AVAILABLE=true is set. When
internal/server/server.go:480
↓ 1 callers
Method
SetCloudMode
SetCloudMode toggles the getpad.dev marketing footer on outgoing transactional emails. Server callers flip it on after Server.SetCloudMode fires (see
internal/email/sender.go:78
↓ 1 callers
Method
SetImportBundleMaxBytes
SetImportBundleMaxBytes overrides the default 2 GiB cap on a single workspace import bundle. Set to 0 to fall back to the default. Wired from PAD_IMPO
internal/server/server.go:783
↓ 1 callers
Method
SetMCPSessionTrackerConfig
SetMCPSessionTrackerConfig stashes ttl + sweep-interval overrides for the session tracker before it's started. Either may be 0 to keep the package def
internal/server/middleware_mcp_session.go:211
↓ 1 callers
Method
SetSecureCookies
SetSecureCookies enables the Secure flag on all cookies.
internal/server/server.go:795
↓ 1 callers
Method
SetTrustedProxies
SetTrustedProxies configures which direct TCP peers are allowed to set X-Real-IP / X-Forwarded-For on incoming requests. Accepts a comma- separated li
internal/server/server.go:899
↓ 1 callers
Method
SetVersion
SetVersion stores the build version info for the health endpoint.
internal/server/server.go:490
↓ 1 callers
Method
SetWebUI
SetWebUI sets the embedded web UI filesystem for serving the SPA.
internal/server/server.go:1659
↓ 1 callers
Method
SetWebhookDispatcher
SetWebhookDispatcher attaches a webhook dispatcher for outgoing notifications. Delivery goroutines are routed through s.goAsync so they're tracked on
internal/server/server.go:686
↓ 1 callers
Method
SetWorkspacePurgeConfig
SetWorkspacePurgeConfig overrides the default sweep interval (24h) and retention window (30d). Pass 0 for either to keep the package default. Must be
internal/server/workspace_purge.go:69
↓ 1 callers
Function
Setup
Setup configures the default slog logger. - level: "debug", "info", "warn", "error" (default "info") - format: "json" or "text" (default "text") Aft
internal/logging/logging.go:25
↓ 1 callers
Function
SetupWriter
SetupWriter is like Setup but writes to w instead of stderr (useful for tests).
internal/logging/logging.go:30
↓ 1 callers
Method
ShouldCreateVersion
ShouldCreateVersion determines whether a new version snapshot should be created, based on time since last version, actor/source changes, and content t
internal/store/versions.go:18
↓ 1 callers
Function
ShouldPruneStripeEvents
ShouldPruneStripeEvents returns true with a ~1% chance, using crypto/rand. Used to opportunistically prune stripe_processed_events without a dedicated
internal/store/stripe_events.go:140
↓ 1 callers
Method
ShowPlaybook
ShowPlaybook returns the full playbook item identified by ref, slug, or invocation_slug.
internal/cli/client.go:446
↓ 1 callers
Method
Shutdown
Shutdown gracefully drains in-flight requests and stops the HTTP server. The provided context controls how long to wait for active connections.
internal/server/server.go:1770
↓ 1 callers
Function
SkillPath
SkillPath returns the full path to the installed skill file, or "" if not installed.
internal/cli/skills.go:33
← previous
next →
1,701–1,800 of 6,005, ranked by callers