Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
31,685 in github.com/PerpetualSoftware/pad
⨍
Functions
31,685
◇
Types & classes
3,533
↓ 3 callers
Method
Rotate
Rotate returns a new image rotated by deg degrees clockwise. Only multiples of 90 (90, 180, 270, plus their negatives) are supported in Phase 1 — that
internal/attachments/processor.go:48
↓ 3 callers
Method
SaveReportLayout
SaveReportLayout upserts the user's layout for a workspace. The caller is responsible for sanitizing the layout (see server handler) before saving.
internal/store/report_layouts.go:40
↓ 3 callers
Method
ScheduleGateDependents
ScheduleGateDependents is what one reader is shown of the gates an item blocks: the items its success releases. It is DISPLAY only, like ScheduleGates
internal/store/commitment_gates.go:742
↓ 3 callers
Function
ScheduleSnoozedUntil
ScheduleSnoozedUntil derives the re-fire instant for the outstanding occurrence. occurrenceState is its history row state, or empty when no row exists
internal/store/schedule_snooze.go:20
↓ 3 callers
Function
SchemaHasStartWhen
SchemaHasStartWhen reports whether a collection schema declares the start condition select. An unreadable schema has none.
internal/collections/templates.go:603
↓ 3 callers
Function
ScopeFor
ScopeFor answers the one question MigrateScope asks: is the item landing in a different workspace? It lives here, in the package that defines the type
internal/items/migrate.go:50
↓ 3 callers
Method
Score
"importance" or "simplicity"
internal/needs/needs.go:356
↓ 3 callers
Method
ScrubOutboxUserRefsTx
ScrubOutboxUserRefsTx is ScrubOutboxUserRefsTxCtx without a deadline.
internal/store/event_outbox.go:987
↓ 3 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:523
↓ 3 callers
Method
Seek
(offset int64, whence int)
internal/server/app_api_attachments.go:261
↓ 3 callers
Method
SendEmailVerification
SendEmailVerification sends an email-verification link to a newly registered user. Mirrors SendPasswordReset (buildHTMLShell/buildPlainShell, CloudMod
internal/email/templates.go:153
↓ 3 callers
Method
SendInvitation
SendInvitation sends a workspace invitation email. If unsubscribeURL is non-empty, an unsubscribe link is included in the footer.
internal/email/templates.go:13
↓ 3 callers
Method
SendPasswordReset
SendPasswordReset sends a password reset email with a token link. This is a placeholder — the password reset flow (IDEA-81) will call this once the re
internal/email/templates.go:111
↓ 3 callers
Function
ServedFilename
ServedFilename is the name an attachment is offered under, derived from its STORED name. For a row stored after BUG-2818 it equals the stored name. Fo
internal/attachments/filename.go:237
↓ 3 callers
Method
SetAgentSignupAllowed
SetAgentSignupAllowed records the self-hosted operator's opt-in (PAD_AGENT_SIGNUP=on). Cloud needs no opt-in; it is on there by default.
internal/server/handlers_agent_signup.go:69
↓ 3 callers
Function
SetAwaitsHuman
SetAwaitsHuman returns settingsJSON with awaits_human set to v and every other key unchanged. Settings that do not parse as an object are an error.
internal/models/awaits_human.go:45
↓ 3 callers
Function
SetBcryptCostForTesting
SetBcryptCostForTesting overrides the bcrypt cost used by CreateUser and UpdateUser for the lifetime of a test binary. It returns a restore function —
internal/store/testing_helpers.go:28
↓ 3 callers
Method
SetBilling
SetBilling installs the billing mode (PAD_BILLING) and the offer source. Called from cmd/pad when the server starts. Billing is offered only in cloud
internal/server/server.go:1085
↓ 3 callers
Method
SetBudget
SetBudget bounds every iterator of r to n period-loop steps (0: unbounded). TASK-4100.
internal/schedule/internal/rrule/rrule.go:142
↓ 3 callers
Method
SetClaimSecret
SetClaimSecret wires the HMAC key used to derive + verify stateless 6-digit claim codes for the POST /api/v1/oauth/claim endpoint (PLAN-1519 / TASK-15
internal/server/handlers_oauth.go:100
↓ 3 callers
Method
SetCollabLimits
SetCollabLimits bounds how many collab WebSockets (/api/v1/collab/{itemID}) one principal may hold open at once (BUG-1308). 0 or less means unlimited,
internal/server/server.go:1580
↓ 3 callers
Method
SetContext
SetContext sets the context that bounds backoff waits and app attempts.
internal/webhooks/dispatcher.go:246
↓ 3 callers
Method
SetDecisionBase
SetDecisionBase records the config-file source and the question-set registry, both fixed for the process lifetime. Call reconfigureDecisions (via Conf
internal/server/decision_settings.go:55
↓ 3 callers
Method
SetDecisionDebounce
SetDecisionDebounce installs the window function, or removes it with nil (no set waits). Atomic for the same reason as the resolver: every write door
internal/store/decisions.go:72
↓ 3 callers
Method
SetDecisionTickChannel
SetDecisionTickChannel replaces the interval ticker with a caller-driven channel. Test affordance only.
internal/server/decision_tick.go:114
↓ 3 callers
Function
SetMaxListPages
SetMaxListPages replaces the page cap and returns a func that restores it. It is a test hook: the production cap is not configurable.
internal/cli/client.go:395
↓ 3 callers
Method
SetMetricsToken
SetMetricsToken configures the static bearer token required to scrape metrics. When empty (the default), /metrics is exposed only to loopback callers
internal/server/server.go:1535
↓ 3 callers
Method
SetPushSender
SetPushSender substitutes the gateway client (a test seam).
internal/server/push_dispatch.go:168
↓ 3 callers
Method
SetRevocationObserver
SetRevocationObserver wires a callback that fires after each access-token family revocation. Optional — leaving it unset is equivalent to wiring a no-
internal/oauth/storage.go:85
↓ 3 callers
Method
SetSessionActivity
SetSessionActivity reports this worker's activity with a short deadline. It never probes capabilities, starts a server or retries; hook callers may ig
internal/cli/client.go:938
↓ 3 callers
Function
SetTracksWork
SetTracksWork returns settingsJSON with tracks_work set to v and every other key unchanged. Settings that do not parse as an object are an error: the
internal/models/tracks_work.go:118
↓ 3 callers
Method
SetUsernameValidator
SetUsernameValidator sets the rule a generated username must pass. The server installs ValidateUsername, which this package cannot import.
internal/store/account_claim.go:179
↓ 3 callers
Function
SliceBodyLines
SliceBodyLines numbers content's lines start..end (end 0 = to the end), clipped to the body. A body that ends in "\n" has no empty last line.
internal/bodypatch/lines.go:52
↓ 3 callers
Function
SortRoleLane
SortRoleLane sorts items in canonical role lane order using sort.SliceStable: role_sort_order asc, created_at asc, item_number asc.
internal/store/role_park.go:117
↓ 3 callers
Method
StallPos
StallPos bounds below every occurrence an exhausted iterator did not yield. TASK-4100.
internal/schedule/internal/rrule/rrule.go:148
↓ 3 callers
Method
StampContentWatermarkIfCaughtUpCounted
StampContentWatermarkIfCaughtUpCounted is StampContentWatermarkIfCaughtUp that also reports what the advance covered (TASK-3541 step 0). The count is
internal/store/content_watermark_stamp.go:100
↓ 3 callers
Function
StampSkill
StampSkill returns content with the marker line appended for version.
internal/cli/skillstamp.go:42
↓ 3 callers
Method
StartPushDispatch
StartPushDispatch starts the dispatch loop. Idempotent; tracked on s.bg.
internal/server/push_dispatch.go:224
↓ 3 callers
Method
StartReminderTick
StartReminderTick starts the periodic reminder sweep. Idempotent. Started from the real server bootstrap path, not Server.New, so unit tests that con
internal/server/reminder_tick.go:81
↓ 3 callers
Method
Stat
(ctx context.Context, key string)
internal/attachments/registry.go:86
↓ 3 callers
Method
Stop
Stop drains the cleanup goroutine of every limiter in the bundle. Called from Server.Stop() so test cleanup (and graceful shutdown) doesn't leak the f
internal/server/middleware_ratelimit.go:719
↓ 3 callers
Method
StreamWorkspaceExport
StreamWorkspaceExport reads a workspace export inside one read-only snapshot transaction and streams item versions through emit instead of collecting
internal/store/export.go:268
↓ 3 callers
Method
String
()
internal/schedule/internal/rrule/str.go:274
↓ 3 callers
Function
StructuredEntryIDKey
StructuredEntryIDKey is the ONE rule for what a structured entry's stored id means as a timeline id (BUG-2783, BUG-2788). It returns the key the entry
internal/models/structured_entry_ids.go:35
↓ 3 callers
Method
Subscribe
Subscribe delegates to the inner bus and increments the SSE connection gauge.
internal/metrics/instrumented_bus.go:34
↓ 3 callers
Function
TerminalPlaceholdersForDoneField
TerminalPlaceholdersForDoneField is a SQL-layer convenience that returns the done-field key plus the placeholder + args pair needed for an IN clause.
internal/models/terminal.go:361
↓ 3 callers
Function
ThumbnailExt
ThumbnailExt returns the file extension for a thumbnail encoded in `format`. Used to build a synthetic filename for the derived row (parent's basename
internal/attachments/processor.go:165
↓ 3 callers
Function
ThumbnailFormat
Format-policy helpers — shared between the pure-Go and libvips backends. These are intentionally NOT inside a build-tagged file so they compile under
internal/attachments/processor.go:141
↓ 3 callers
Function
ThumbnailMime
ThumbnailMime returns the canonical MIME type for a thumbnail encoded in `format` (paired with ThumbnailFormat above).
internal/attachments/processor.go:150
↓ 3 callers
Function
ToItemSummary
ToItemSummary projects a single models.Item into the summary shape.
internal/cli/item_summary.go:172
↓ 3 callers
Function
TokensDecodeNUL
TokensDecodeNUL walks a VALID JSON document token by token and reports whether any string in it, key or value, decodes to a NUL (BUG-2812). It replac
internal/textguard/textguard.go:123
↓ 3 callers
Function
ToolInstalled
ToolInstalled checks if the skill file exists for the given tool.
internal/cli/agents.go:219
↓ 3 callers
Method
UnderItemLockIfNoRoom
UnderItemLockIfNoRoom runs fn under the per-item setup lock, and only when no room exists for the item; otherwise it returns ErrRoomOpen without calli
internal/collab/manager.go:192
↓ 3 callers
Method
UnsnoozeNeedsItem
UnsnoozeNeedsItem removes userID's snooze on an item. It reports whether there was one.
internal/store/needs_snooze.go:253
↓ 3 callers
Method
Unsubscribe
Unsubscribe removes a subscriber and closes its channel. No-op when the channel is unknown — a double-Unsubscribe (e.g. handler defer firing after Clo
internal/collab/memory_bus.go:83
↓ 3 callers
Method
UpdateFields
UpdateFields is the entry's update fields as a map: what an update from the library writes into the item, status excluded.
internal/collections/builtin.go:416
↓ 3 callers
Method
UpdateItem
UpdateItem applies a scalar fields patch to an item this install created, in one FencedTx.
internal/appstore/items.go:162
↓ 3 callers
Method
UpdateItemSortOrders
UpdateItemSortOrders sets sort_order for a set of items in ONE transaction: every entry lands or none does (TASK-3517). It replaces the web reorder's
internal/store/item_sort_order.go:45
↓ 3 callers
Method
UpdateView
UpdateView modifies an existing view.
internal/store/views.go:137
↓ 3 callers
Method
UpdateWorkspaceMemberRoleWithin
UpdateWorkspaceMemberRoleWithin is UpdateWorkspaceMemberRole for a caller restricted to specific collections (BUG-3634). within is the target's collec
internal/store/workspace_members.go:1085
↓ 3 callers
Method
UserID
UserID returns the pad user ID this session was issued to. Equivalent to GetSubject() under our model where Subject is always the user ID; kept as a t
internal/oauth/session.go:63
↓ 3 callers
Function
ValidFilenameSource
ValidFilenameSource reports whether v is one of the stored values.
internal/attachments/filename.go:107
↓ 3 callers
Function
ValidateAwaitsHumanSetting
ValidateAwaitsHumanSetting refuses an `awaits_human` that is present but not a JSON boolean. An absent key is fine.
internal/models/awaits_human.go:34
↓ 3 callers
Function
ValidateBoolArity
ValidateBoolArity asserts that every bool-typed flag in doc obeys spec §5.3: bool flags MUST be presence switches. They MUST NOT appear in `--flag=val
internal/cmdhelp/example_validation.go:208
↓ 3 callers
Function
ValidateCalendarViewConfig
ValidateCalendarViewConfig is the whole check of a calendar view's config.
internal/models/view_calendar.go:136
↓ 3 callers
Function
ValidateSchemaKeysAndOptions
ValidateSchemaKeysAndOptions refuses a collection schema in which a field has no key, two fields share a key, or a select or multi_select field's opti
internal/models/schema_uniqueness.go:17
↓ 3 callers
Function
ValidateTracksWorkSetting
ValidateTracksWorkSetting refuses a `tracks_work` that is present but not a JSON boolean. An absent key is fine (it means work on create, "unchanged"
internal/models/tracks_work.go:106
↓ 3 callers
Function
ValidateWebhookURLContext
ValidateWebhookURLContext is ValidateWebhookURL with the hostname lookup bound to ctx. A lookup that fails returns a *ResolveError.
internal/webhooks/validate.go:47
↓ 3 callers
Method
VerifyStepUpCode
VerifyStepUpCode charges an attempt before comparing the hash. The final conditional consume makes one code successful at most once, even when multipl
internal/store/step_up.go:76
↓ 3 callers
Method
Why
Why names the reasons actually present, for the two sites that state it in one sentence. Neutral on number: one caller says "it" and the other may be
cmd/pad/cmd_item.go:2963
↓ 3 callers
Function
WipeCredentialsFile
WipeCredentialsFile removes ~/.pad/credentials.json entirely. Distinct from CredentialStore.Delete (which removes a single server's entry) — used by t
internal/cli/credentials.go:633
↓ 3 callers
Function
WithChatGPTToolSchemes
WithChatGPTToolSchemes copies each tool's _meta.securitySchemes to the tool's top level in a tools/list response. The Apps SDK reads the top level and
internal/mcp/chatgpt_security.go:90
↓ 3 callers
Function
WithMCPToolOutcomeSink
WithMCPToolOutcomeSink returns ctx carrying a fresh sink, and the sink. MCPAuditLog is its production caller; it is exported for internal/mcp's tests,
internal/server/mcp_tool_outcome.go:35
↓ 3 callers
Method
WithOwnRef
WithOwnRef guards a rename whose new title parses as a reference, like "TASK-1" (BUG-3693). Written into a bracket as a title, it would be read as a r
internal/links/links.go:542
↓ 3 callers
Function
WithRestorePlanLimit
WithRestorePlanLimit makes RestoreItem enforce the workspace's items_per_workspace cap before it un-deletes the row, counted in its own transaction un
internal/store/event_outbox.go:107
↓ 3 callers
Function
WithTracksWorkDefault
WithTracksWorkDefault returns settingsJSON with `tracks_work` set to DefaultTracksWork when the creator did not set it; settings that already carry th
internal/models/tracks_work.go:79
↓ 3 callers
Method
WorkspaceBuiltinOrigins
WorkspaceBuiltinOrigins returns the origin of every live item in the workspace that has one, keyed by item id: one query, a join, however many items t
internal/store/builtin_origin.go:70
↓ 3 callers
Method
WorkspaceMemberSince
WorkspaceMemberSince returns a membership's created_at exactly as stored, or "" when there is none or its workspace is deleted: the value a delegated
internal/store/install_clients.go:710
↓ 3 callers
Method
WorkspaceStorageLimit
WorkspaceStorageLimit returns the effective storage limit (bytes) for the workspace owner's plan, or -1 if the plan is unlimited. Thin wrapper around
internal/store/attachments.go:1941
↓ 3 callers
Function
WriteAccountNotUnclaimedError
WriteAccountNotUnclaimedError writes the structured marker line for the claim-link 404, so the stdio MCP transport reports account_not_unclaimed, as t
internal/cli/client.go:2603
↓ 3 callers
Method
WriteCollectionNotFound
WriteCollectionNotFound is the denial writer for a CrossWorkspaceCollectionScope check on a workspace the caller has ALREADY been authorized into (i.e
internal/server/authz_cross_workspace.go:296
↓ 3 callers
Function
WritePermissionDeniedError
WritePermissionDeniedError writes the structured marker line for a refused caller (BUG-3864), carrying the server's details.reason, so the stdio MCP t
internal/cli/client.go:3839
↓ 3 callers
Function
WriteRoleParkError
WriteRoleParkError writes the structured marker line for role-park refusals so the stdio MCP transport lifts the exact code, details, and hint.
internal/cli/client.go:2995
↓ 3 callers
Function
WriteScheduleActiveError
WriteScheduleActiveError preserves the refusal for stdio MCP and names the occurrence that closing will silence for CLI users.
internal/cli/client.go:4254
↓ 3 callers
Function
WriteStoredStateUnreadableError
WriteStoredStateUnreadableError formats a local refusal to w in the canonical two-track shape, mirroring WriteOpenChildrenError / WriteUpdateConflictE
internal/cli/client.go:3176
↓ 3 callers
Function
WriteTooLargeError
WriteTooLargeError writes the structured marker line for a 413 (BUG-2829), with the server's own code in details.reason, so the stdio MCP transport re
internal/cli/client.go:3804
↓ 3 callers
Function
__resetCoveredPageForTests
()
web/src/lib/stores/coveredPage.svelte.ts:64
↓ 3 callers
Method
acceptInvitationCore
acceptInvitationCore is the one accept path behind both invitation doors: POST /invitations/{code}/accept and POST /me/invitations/{id}/accept (TASK-3
internal/server/handlers_members.go:585
↓ 3 callers
Function
accessModeSelect
The member's collection-visibility select, once the access panel is open.
web/src/routes/[username]/[workspace]/settings/settingsIdentityFence.svelte.test.ts:442
↓ 3 callers
Function
ackLossServer
ackLossServer builds a *Server on the named backend with collab and an event bus wired. The Postgres leg skips unless PAD_TEST_POSTGRES_URL is set (ma
internal/server/handlers_items_ack_loss_test.go:50
↓ 3 callers
Function
ackTarget
--- agent roles --- ackTarget names an item for a `pad remind ack` hint: its issue ID, or its slug when the item has no number.
cmd/pad/cmd_project.go:1546
↓ 3 callers
Method
acquireParentChildrenLocksForUpdate
acquireParentChildrenLocksForUpdate is the in-tx helper UpdateItem uses to serialize itself against the open-children guard (IDEA-1494 R2 / R4). It ac
internal/store/items.go:5728
↓ 3 callers
Method
acquireWorkspaceDocumentRenameLock
acquireWorkspaceDocumentRenameLock serializes document TITLE RENAMES within a workspace on Postgres (BUG-2778). Its key is namespaced so it contends o
internal/store/documents.go:556
↓ 3 callers
Function
actionItemExport
actionItemExport handles pad_item.action=export. The CLI's `pad item export <ref>` defaults to WRITING A FILE (<slug>.pad.md), which is useless to an
internal/mcp/catalog_item.go:1140
↓ 3 callers
Function
activityIDs
(as []models.Activity)
internal/store/activities_paging_test.go:27
↓ 3 callers
Function
activityLimitFromQuery
activityLimitFromQuery reads `limit` leniently, as the doors always have: absent, non-numeric or non-positive returns 0, which the store reads as its
internal/server/handlers_activity.go:20
↓ 3 callers
Method
activityMetaText
activityMetaText reads activities.metadata as text on both backends: it is TEXT on SQLite and JSONB on Postgres, where a COALESCE to the empty string
internal/store/catch_up.go:512
↓ 3 callers
Function
activityTimestamp
(at *time.Time)
internal/server/session_activity.go:36
↓ 3 callers
Function
actualScale
(g: Geometry)
web/src/lib/attachments/zoom.ts:228
↓ 3 callers
Method
addTicketField
(f map[string]any)
internal/server/handlers_apps_upgrade_test.go:371
← previous
next →
5,101–5,200 of 31,685, ranked by callers