httpapi

package
v0.0.0-...-c9f63aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 71 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CRMReadAudience = "go.crm.read"
View Source
const MetricsReadAudience = "go.metrics.read"
View Source
const ProjectsReadAudience = "go.projects.read"

Variables

This section is empty.

Functions

func DocumentsEditorDisabledCapabilities

func DocumentsEditorDisabledCapabilities(enabled bool) map[string]struct{}

DocumentsEditorDisabledCapabilities keeps the editor detail read closed on the direct session route only when its API opt-out flag is explicitly set.

func DocumentsIngestedDisabledCapabilities

func DocumentsIngestedDisabledCapabilities(enabled bool) map[string]struct{}

DocumentsIngestedDisabledCapabilities keeps direct session execution closed only when ingested document reads are explicitly disabled on the API.

func DocumentsVersionDisabledCapabilities

func DocumentsVersionDisabledCapabilities(enabled bool) map[string]struct{}

DocumentsVersionDisabledCapabilities disables authored version reads only when the API opt-out flag is explicitly set.

func InventoryCycleCountDisabledCapabilities

func InventoryCycleCountDisabledCapabilities(enabled bool) map[string]struct{}

InventoryCycleCountDisabledCapabilities keeps the opt-in Go session route closed to cycle-count writes until the separate write gate is enabled.

func MessagingPeopleDisabledCapabilities

func MessagingPeopleDisabledCapabilities(enabled bool) map[string]struct{}

MessagingPeopleDisabledCapabilities disables the direct people lookup only when the API rollout flag is explicitly turned off.

func MountGoAIConfigRoute

func MountGoAIConfigRoute(base, route http.Handler) http.Handler

MountGoAIConfigRoute owns the authenticated AI provider configuration API.

func MountGoAIConnectionsRoute

func MountGoAIConnectionsRoute(base, route http.Handler) http.Handler

MountGoAIConnectionsRoute owns GET and POST /api/ai-connections.

func MountGoAIToolsMCPRoute

func MountGoAIToolsMCPRoute(base, route http.Handler) http.Handler

MountGoAIToolsMCPRoute owns POST /api/ai-tools/mcp.

func MountGoAccountingBudgetsRoute

func MountGoAccountingBudgetsRoute(base, route http.Handler) http.Handler

MountGoAccountingBudgetsRoute owns the authenticated budget scenario REST API.

func MountGoAccountingPeriodCloseRoute

func MountGoAccountingPeriodCloseRoute(base, route http.Handler) http.Handler

MountGoAccountingPeriodCloseRoute owns the authenticated period-close API.

func MountGoAccountingRoute

func MountGoAccountingRoute(base, route http.Handler) http.Handler

MountGoAccountingRoute owns the authenticated Accounting overview and action API.

func MountGoAccountingTaxRoute

func MountGoAccountingTaxRoute(base, route http.Handler) http.Handler

MountGoAccountingTaxRoute owns the authenticated Accounting tax API.

func MountGoApprovalsDecisionRoute

func MountGoApprovalsDecisionRoute(base, route http.Handler) http.Handler

MountGoApprovalsDecisionRoute mounts only approval decision POSTs. Inbox reads and every other method or path retain their existing owner.

func MountGoApprovalsReadRoute

func MountGoApprovalsReadRoute(base, route http.Handler) http.Handler

MountGoApprovalsReadRoute mounts only the approvals inbox GET. Decisions remain with their current owner until they pass their own migration gate.

func MountGoBankingRoute

func MountGoBankingRoute(base, route http.Handler) http.Handler

MountGoBankingRoute owns the legacy Banking REST contract for authenticated clients while dispatching its operations through the capability executor.

func MountGoBusinessRoutes

func MountGoBusinessRoutes(base, portalInvoiceRoute, salesInvoiceRoute, supportChannelsRoute, sessionCapabilityRoute, modulesRoute, modulesWriteRoute, projectsRoute, teamReadRoute, teamWriteRoute, brandingRoute, analyticsRoute, dashboardRoute, ledgerRoute, directMetricsRoute http.Handler, analyticsReportRoute ...http.Handler) http.Handler

MountGoBusinessRoutes mounts the supplied API handlers. Unprovided handlers continue to fall through to the existing API owner.

func MountGoCRMCollectionRoute

func MountGoCRMCollectionRoute(base, route http.Handler) http.Handler

MountGoCRMCollectionRoute owns the CRM collection writes plus the deals and saved views collections. Reads of GET /api/crm and GET /api/customers stay with their existing mount.

func MountGoCRMFollowUpDraftRoute

func MountGoCRMFollowUpDraftRoute(base, route http.Handler) http.Handler

MountGoCRMFollowUpDraftRoute owns the authenticated Vite follow-up draft.

func MountGoCRMImportRoute

func MountGoCRMImportRoute(base, route http.Handler) http.Handler

MountGoCRMImportRoute owns the legacy CSV import collection.

func MountGoCRMReadRoute

func MountGoCRMReadRoute(base, route http.Handler) http.Handler

MountGoCRMReadRoute mounts only the CRM collection GET. CRM writes and other CRM endpoints continue to their current owner.

func MountGoCapabilityGapsRoute

func MountGoCapabilityGapsRoute(base, route http.Handler) http.Handler

MountGoCapabilityGapsRoute owns GET /api/capability-gaps.

func MountGoChatRoute

func MountGoChatRoute(base, chatRoute, steerRoute http.Handler) http.Handler

MountGoChatRoute owns authenticated Vite chat streaming and mid-run steering. Both handlers share one steering queue at construction time.

func MountGoCreatorRoutes

func MountGoCreatorRoutes(base, agentRoute, evolutionRoute http.Handler) http.Handler

MountGoCreatorRoutes owns the Creator agent detection and candidate evolution endpoints.

func MountGoDocumentContentDownloadRoute

func MountGoDocumentContentDownloadRoute(base, route http.Handler) http.Handler

MountGoDocumentContentDownloadRoute owns uploaded document binary reads.

func MountGoDocumentsAssistRoute

func MountGoDocumentsAssistRoute(base, route http.Handler) http.Handler

MountGoDocumentsAssistRoute owns authenticated document-writing assistance.

func MountGoDocumentsCollectionRoute

func MountGoDocumentsCollectionRoute(base, route http.Handler) http.Handler

MountGoDocumentsCollectionRoute owns the authored-documents family: the gallery, folders, numbering and record search, while the Vite client keeps reading through the capability endpoint. The one-segment assist literal is forwarded so the assistant route keeps its own owner.

func MountGoDocumentsEditorWorkspaceRoute

func MountGoDocumentsEditorWorkspaceRoute(base, route http.Handler) http.Handler

MountGoDocumentsEditorWorkspaceRoute owns the authored-document draft, presence, and editing-lock endpoint when supplied by server configuration.

func MountGoDocumentsIngestRoute

func MountGoDocumentsIngestRoute(base, route http.Handler) http.Handler

MountGoDocumentsIngestRoute owns the legacy ingested-documents collection while the Vite client keeps reading through the capability endpoint.

func MountGoEvaluationsRoute

func MountGoEvaluationsRoute(base, evaluations http.Handler) http.Handler

MountGoEvaluationsRoute exposes the admin-only evaluation catalogue and live run endpoint inside the existing ERP API, not as a separate service.

func MountGoExpensesRoute

func MountGoExpensesRoute(base, route http.Handler) http.Handler

MountGoExpensesRoute owns the authenticated expense claims REST API.

func MountGoHRRoute

func MountGoHRRoute(base, route http.Handler) http.Handler

MountGoHRRoute owns the authenticated HR people and payroll API.

func MountGoHarnessCompositionsRoute

func MountGoHarnessCompositionsRoute(base, route http.Handler) http.Handler

MountGoHarnessCompositionsRoute owns GET /api/harness/compositions.

func MountGoInventoryReadRoute

func MountGoInventoryReadRoute(base, route http.Handler) http.Handler

MountGoInventoryReadRoute mounts only the read-only inventory collection endpoint. Writes and nested inventory paths continue to the existing owner.

func MountGoInventoryWriteRoute

func MountGoInventoryWriteRoute(base, route http.Handler) http.Handler

MountGoInventoryWriteRoute mounts only the inventory POST action union. The inventory GET collection keeps its existing owner.

func MountGoInvitationRoutes

func MountGoInvitationRoutes(base, invitationRoute http.Handler) http.Handler

MountGoInvitationRoutes adds Go-owned invitation preview and acceptance to the auth namespace without widening the remaining auth route surface.

func MountGoInviteTokenRoute

func MountGoInviteTokenRoute(base, invitationRoute http.Handler) http.Handler

MountGoInviteTokenRoute exposes the Go invitation preview and acceptance handler at the legacy /api/invite/{token} path. The handler reads the token from the path wildcard, so the alias needs no duplicate logic.

func MountGoLegacyDocumentContentRoute

func MountGoLegacyDocumentContentRoute(base, route http.Handler) http.Handler

MountGoLegacyDocumentContentRoute owns GET /api/documents/{id}/content by reusing the governed content download handler.

func MountGoManufacturingCollectionRoute

func MountGoManufacturingCollectionRoute(base, route http.Handler) http.Handler

MountGoManufacturingCollectionRoute owns GET and POST /api/manufacturing.

func MountGoMarketingRoute

func MountGoMarketingRoute(base, route http.Handler) http.Handler

MountGoMarketingRoute owns the authenticated Marketing overview and action API.

func MountGoMarketplaceRoute

func MountGoMarketplaceRoute(base, route http.Handler) http.Handler

MountGoMarketplaceRoute owns GET and POST /api/marketplace.

func MountGoMemoryRoute

func MountGoMemoryRoute(base, route http.Handler) http.Handler

MountGoMemoryRoute mounts only Settings memory collection GET and POST; unsupported methods and nested paths continue to the base handler.

func MountGoMessageAttachmentDownloadRoute

func MountGoMessageAttachmentDownloadRoute(base, route http.Handler) http.Handler

MountGoMessageAttachmentDownloadRoute mounts the session-authenticated Go binary download handler for one message attachment.

func MountGoMessagingAgentRoute

func MountGoMessagingAgentRoute(base, route http.Handler) http.Handler

func MountGoMessagingCollectionRoute

func MountGoMessagingCollectionRoute(base, route http.Handler) http.Handler

MountGoMessagingCollectionRoute owns the exact Vite conversation and message collection paths. Every other request continues to the base handler.

func MountGoMessagingPresenceRoute

func MountGoMessagingPresenceRoute(base, route http.Handler) http.Handler

MountGoMessagingPresenceRoute owns the exact Vite conversation presence path.

func MountGoModuleSettingsRoute

func MountGoModuleSettingsRoute(base, route http.Handler) http.Handler

MountGoModuleSettingsRoute mounts only the Vite Settings module defaults collection. Other methods and nested paths continue to the base handler.

func MountGoNotificationsRoute

func MountGoNotificationsRoute(base, notificationsRoute, notificationReadRoute http.Handler) http.Handler

func MountGoOnboardingRoute

func MountGoOnboardingRoute(base, route http.Handler) http.Handler

MountGoOnboardingRoute keeps the browser route opt-in until the frontend switches from the compatibility server to the Go API.

func MountGoPOSCustomersRoute

func MountGoPOSCustomersRoute(base, route http.Handler) http.Handler

MountGoPOSCustomersRoute sends only the POS customer lookup GET to Go.

func MountGoPOSReadRoute

func MountGoPOSReadRoute(base, route http.Handler) http.Handler

MountGoPOSReadRoute mounts only the POS collection GET. Actions remain with the existing owner until their write routes pass their own migration gate.

func MountGoPOSShiftSummaryRoute

func MountGoPOSShiftSummaryRoute(base, route http.Handler) http.Handler

MountGoPOSShiftSummaryRoute sends only the POS shift summary POST to Go.

func MountGoPOSWriteRoute

func MountGoPOSWriteRoute(base, route http.Handler) http.Handler

MountGoPOSWriteRoute owns authenticated POS actions; collection reads remain mounted separately so the two methods can migrate independently.

func MountGoPolicySessionRoute

func MountGoPolicySessionRoute(base, route http.Handler) http.Handler

MountGoPolicySessionRoute mounts only the Vite Settings policy collection. Other methods and nested paths continue to the base handler.

func MountGoProposalsRoute

func MountGoProposalsRoute(base, route http.Handler) http.Handler

MountGoProposalsRoute owns GET and POST /api/proposals.

func MountGoPurchasingCollectionRoute

func MountGoPurchasingCollectionRoute(base, route http.Handler) http.Handler

MountGoPurchasingCollectionRoute owns GET/POST /api/purchasing. The base handler keeps every other method and path, so the legacy proxy still serves what has not migrated.

func MountGoPurchasingPaymentRunsRoute

func MountGoPurchasingPaymentRunsRoute(base, route http.Handler) http.Handler

MountGoPurchasingPaymentRunsRoute owns GET/POST /api/purchasing/payment-runs.

func MountGoQuotesRoute

func MountGoQuotesRoute(base, route http.Handler) http.Handler

MountGoQuotesRoute mounts the quotes collection. The route handler itself owns both the GET list and the POST action union and answers 405 for other methods; every other path continues to the existing owner.

func MountGoRecurringRoute

func MountGoRecurringRoute(base, route http.Handler) http.Handler

MountGoRecurringRoute mounts the recurring template collection. The route handler owns GET and POST and answers 405 for other methods.

func MountGoReportsRoute

func MountGoReportsRoute(base, route http.Handler) http.Handler

MountGoReportsRoute mounts the accounting reports collection GET.

func MountGoRoutinesRoute

func MountGoRoutinesRoute(base, route http.Handler, webhookRoute ...http.Handler) http.Handler

MountGoRoutinesRoute mounts only the routine collection paths supported by the Go handler; other methods and subpaths fall through to the base handler.

func MountGoRoutinesWebhookReadRoute

func MountGoRoutinesWebhookReadRoute(base, route http.Handler) http.Handler

MountGoRoutinesWebhookReadRoute owns GET (and HEAD) on the webhook path while every other method and path keeps falling through to the base handler.

func MountGoSCIMCollectionDeleteRoute

func MountGoSCIMCollectionDeleteRoute(base, route http.Handler) http.Handler

MountGoSCIMCollectionDeleteRoute owns DELETE on the user collection only; item deletes and every other SCIM method or path fall through to the base handler.

func MountGoSCIMReadRoute

func MountGoSCIMReadRoute(base, scimRoute http.Handler) http.Handler

MountGoSCIMReadRoute mounts only the Go SCIM user reads when explicitly supplied.

func MountGoSCIMRoutes

func MountGoSCIMRoutes(base, scimReadRoute, scimWriteRoute http.Handler) http.Handler

MountGoSCIMRoutes keeps SCIM reads and writes independently opt-in.

func MountGoSCIMTokenManagementRoute

func MountGoSCIMTokenManagementRoute(base, route http.Handler) http.Handler

MountGoSCIMTokenManagementRoute mounts browser or API session management for SCIM bearer tokens when explicitly supplied.

func MountGoSalesCustomersRoute

func MountGoSalesCustomersRoute(base, route http.Handler) http.Handler

MountGoSalesCustomersRoute sends only the Sales customer picker GET to Go.

func MountGoSalesOrdersRoute

func MountGoSalesOrdersRoute(base, route http.Handler) http.Handler

MountGoSalesOrdersRoute sends only the orders collection GET to Go. The invoice detail route and all other sales methods remain with the base owner.

func MountGoSalesWriteRoute

func MountGoSalesWriteRoute(base, route http.Handler) http.Handler

MountGoSalesWriteRoute mounts only the sales order POST actions. The sales order GET list keeps its existing owner.

func MountGoSessionReadRoutes

func MountGoSessionReadRoutes(base, sessionsListRoute, sessionsDetailRoute, durableRunsRoute http.Handler) http.Handler

MountGoSessionReadRoutes mounts session reads and durable-run reads and creates only when their handlers are explicitly enabled by API configuration.

func MountGoSupportAdminRoute

func MountGoSupportAdminRoute(base, route http.Handler) http.Handler

MountGoSupportAdminRoute owns GET and POST /api/support; the channel, customer and draft subroutes stay with their existing mounts in the base handler.

func MountGoSupportCustomersRoute

func MountGoSupportCustomersRoute(base, route http.Handler) http.Handler

MountGoSupportCustomersRoute mounts only the Support customer-picker GET. CRM writes and the broader CRM customer directory remain with their owner.

func MountGoSupportReplyDraftRoute

func MountGoSupportReplyDraftRoute(base, route http.Handler) http.Handler

MountGoSupportReplyDraftRoute owns authenticated Vite support reply drafts.

func MountGoTeamRoute

func MountGoTeamRoute(base, teamReadRoute, teamWriteRoute http.Handler) http.Handler

MountGoTeamRoute gives the active Go team methods exact-path ownership while leaving disabled GET/POST methods available to the existing compatibility route.

func MountGoTeamSSORoute

func MountGoTeamSSORoute(base, route http.Handler) http.Handler

MountGoTeamSSORoute gives the Go API sole ownership of SSO connection management, including unsupported methods, so they cannot fall through to the compatibility app.

func MountGoTimeRoute

func MountGoTimeRoute(base, route http.Handler) http.Handler

MountGoTimeRoute owns authenticated HR time reporting and entry actions.

func MountMyWorkRoute

func MountMyWorkRoute(base, myWorkRoute http.Handler) http.Handler

MountMyWorkRoute mounts the Go-owned work queue when enabled.

func MountMyWorkSummaryRoute

func MountMyWorkSummaryRoute(base, summaryRoute http.Handler) http.Handler

MountMyWorkSummaryRoute mounts the Go work brief only when enabled.

func MountNotificationPreferencesRoute

func MountNotificationPreferencesRoute(base, preferences http.Handler) http.Handler

MountNotificationPreferencesRoute owns /api/notification-preferences and leaves every other request with the base handler.

func MountRecordSearchRoute

func MountRecordSearchRoute(base, searchRoute http.Handler) http.Handler

MountRecordSearchRoute gives GET /api/search exact ownership while leaving other methods on the base handler when search is disabled.

func MountSessionRevertRoute

func MountSessionRevertRoute(base, revertRoute http.Handler) http.Handler

MountSessionRevertRoute owns POST /api/sessions/{id}/revert and leaves every other session path with the base handler.

func MountSetupRoute

func MountSetupRoute(base, setupRoute http.Handler) http.Handler

MountSetupRoute mounts the Go-owned dashboard setup checklist when enabled.

func MountSignalsRoute

func MountSignalsRoute(base, signalsRoute http.Handler) http.Handler

MountSignalsRoute mounts the Go-owned signals feed only when explicitly supplied by server configuration.

func MountSupportPublicRoute

func MountSupportPublicRoute(base, supportRoute http.Handler) http.Handler

MountSupportPublicRoute mounts the unauthenticated website widget API only when explicitly supplied by the server configuration.

func NewAIConfigSessionHandler

func NewAIConfigSessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewAIConnectionsHandler

func NewAIConnectionsHandler(pool *pgxpool.Pool, resolver SessionResolver, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewAIConnectionsHandler builds the coding-agent connection endpoint. Mount it at GET and POST /api/ai-connections behind the Go API router.

func NewAIToolsMCPHandler

func NewAIToolsMCPHandler(pool *pgxpool.Pool, executor CapabilityExecutor, logger *slog.Logger) (http.Handler, error)

NewAIToolsMCPHandler builds the coding-agent MCP tool bridge. Mount it at POST /api/ai-tools/mcp behind the Go API router.

func NewAccountingBudgetsSessionHandler

func NewAccountingBudgetsSessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewAccountingPeriodCloseSessionHandler

func NewAccountingPeriodCloseSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewAccountingSessionHandler

func NewAccountingSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewAccountingTaxSessionHandler

func NewAccountingTaxSessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewAnalyticsSessionHandler

func NewAnalyticsSessionHandler(resolver analyticsSessionResolver, executor CapabilityExecutor, logger *slog.Logger) http.Handler

NewAnalyticsSessionHandler exposes authenticated analytics discovery, preview, and report generation directly through the governed Go capability executor.

func NewApprovalDecisionSessionHandler

func NewApprovalDecisionSessionHandler(resolver approvalDecisionSessionResolver, decider approvalSessionDecisionDecider, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewApprovalInboxSessionHandler

func NewApprovalInboxSessionHandler(resolver approvalInboxSessionResolver, reader ApprovalInboxReader, logger *slog.Logger) http.Handler

func NewAuthHandler

func NewAuthHandler(service *authn.Service, secret string, secureCookie bool, logger *slog.Logger) http.Handler

NewAuthHandler creates the Go implementation of Better Auth's email/password and session endpoints.

func NewAuthHandlerWithFederatedRoutes

func NewAuthHandlerWithFederatedRoutes(service *authn.Service, secret string, secureCookie bool, logger *slog.Logger, trustedProxyCIDRs []*net.IPNet, oidcRoutes, samlRoutes http.Handler) (http.Handler, error)

NewAuthHandlerWithFederatedRoutes composes the existing Go auth endpoints with independently constructed OIDC and SAML routes without changing either provider's default-off wiring.

func NewAuthHandlerWithOIDCRoutes

func NewAuthHandlerWithOIDCRoutes(service *authn.Service, secret string, secureCookie bool, logger *slog.Logger, trustedProxyCIDRs []*net.IPNet, oidcRoutes http.Handler) (http.Handler, error)

func NewAuthHandlerWithTrustedProxyCIDRs

func NewAuthHandlerWithTrustedProxyCIDRs(service *authn.Service, secret string, secureCookie bool, logger *slog.Logger, trustedProxyCIDRs []*net.IPNet) (http.Handler, error)

func NewBankingSessionHandler

func NewBankingSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, payments bankingPaymentReader, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewBrandingSessionHandler

func NewBrandingSessionHandler(resolver BrandingSessionResolver, executor CapabilityExecutor, reader BrandingReader, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewCRMCollectionSessionHandler

func NewCRMCollectionSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewCRMCollectionSessionHandlerWithFollowUpDraft

func NewCRMCollectionSessionHandlerWithFollowUpDraft(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, followUpDraft http.Handler, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewCRMFollowUpDraftSessionHandler

func NewCRMFollowUpDraftSessionHandler(
	resolver crmReadSessionResolver,
	executor CapabilityExecutor,
	pool dbx.Beginner,
	config crmFollowUpDraftConfigReader,
	model crmFollowUpDraftModel,
	logger *slog.Logger,
	trustedProxyCIDRs ...[]*net.IPNet,
) http.Handler

func NewCRMImportSessionHandler

func NewCRMImportSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewCRMReadSessionHandler

func NewCRMReadSessionHandler(resolver crmReadSessionResolver, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewCRMReadSessionHandlerWithPOSCustomers

func NewCRMReadSessionHandlerWithPOSCustomers(resolver crmReadSessionResolver, executor CapabilityExecutor, pool *pgxpool.Pool, logger *slog.Logger) http.Handler

func NewCapabilityGapsHandler

func NewCapabilityGapsHandler(resolver SessionResolver, executor CapabilityExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewCapabilityGapsHandler builds the authenticated capability gap list endpoint. Mount it at GET /api/capability-gaps behind the Go API router.

func NewCreatorAgentHandler

func NewCreatorAgentHandler(resolver SessionResolver, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewCreatorAgentHandler builds the read-only coding agent detection endpoint. Mount it at GET /api/creator/agent behind the Go API router.

func NewCreatorEvolutionHandler

func NewCreatorEvolutionHandler(resolver SessionResolver, executor CapabilityExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewCreatorEvolutionHandler builds the authenticated creator evolution endpoint. Mount it at POST /api/creator/evolution behind the Go API router.

func NewDashboardSessionHandler

func NewDashboardSessionHandler(resolver dashboardSessionResolver, reader dashboardReader, executor CapabilityExecutor, logger *slog.Logger) http.Handler

NewDashboardSessionHandler serves the authenticated dashboard snapshot from the tenant-scoped Go read model and preserves the legacy report fallbacks.

func NewDocumentContentDownloadHandler

func NewDocumentContentDownloadHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, logger *slog.Logger) http.Handler

func NewDocumentsAssistSessionHandler

func NewDocumentsAssistSessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewDocumentsCollectionHandler

func NewDocumentsCollectionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewDocumentsEditorWorkspaceHandler

func NewDocumentsEditorWorkspaceHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewDocumentsIngestHandler

func NewDocumentsIngestHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewDurableRunsSessionHandler

func NewDurableRunsSessionHandler(pool *pgxpool.Pool, resolver durableRunsSessionResolver, logger *slog.Logger) http.Handler

func NewEmailHandler

func NewEmailHandler(pool *pgxpool.Pool, resolver emailSessionResolver, executor CapabilityExecutor, smtpHost string, smtpPort int, smtpSecure bool, smtpUser, smtpPass, smtpFrom, appURL string, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewEmailHandler serves authenticated SMTP status, proof-send, and invoice-send requests.

func NewExpensesSessionHandler

func NewExpensesSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewGoApprovalDecisionHandler

func NewGoApprovalDecisionHandler(secret string, decider ApprovalDecisionDecider, logger *slog.Logger) http.Handler

func NewGoApprovalInboxHandler

func NewGoApprovalInboxHandler(secret string, reader ApprovalInboxReader, logger *slog.Logger) http.Handler

func NewGoCRMReadHandler

func NewGoCRMReadHandler(secret string, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewGoCapabilityHandler

func NewGoCapabilityHandler(secret string, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewGoChatHandlers

func NewGoChatHandlers(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...*net.IPNet) (http.Handler, http.Handler)

NewGoChatHandlers builds the chat and steer handlers that share one steering queue, ready for MountGoChatRoute.

func NewGoInvitationHandler

func NewGoInvitationHandler(pool *pgxpool.Pool, resolver invitationSessionResolver, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

func NewGoLedgerHandler

func NewGoLedgerHandler(secret string, reader LedgerReader, logger *slog.Logger) http.Handler

func NewGoMetricsHandler

func NewGoMetricsHandler(secret string, reader MetricsReader, logger *slog.Logger) http.Handler

func NewGoOnboardingHandler

func NewGoOnboardingHandler(
	pool *pgxpool.Pool,
	executor *capability.Executor,
	resolver onboardingSessionResolver,
	secret string,
	embeddingModel string,
	embedder capability.SupportKnowledgeEmbedder,
	logger *slog.Logger,
	trustedProxyCIDRs ...[]*net.IPNet,
) (http.Handler, error)

NewGoOnboardingHandler serves session-owned workspace creation. A nil embedder keeps creation available when the optional embedding provider is unavailable, matching the legacy best-effort upgrade behavior.

func NewGoOrgSwitchHandler

func NewGoOrgSwitchHandler(secret string, checker OrgMembershipChecker, logger *slog.Logger) http.Handler

func NewGoPolicyHandler

func NewGoPolicyHandler(secret string, reader PolicyReader, logger *slog.Logger) http.Handler

func NewGoProjectsReadHandler

func NewGoProjectsReadHandler(secret string, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewGoTeamHandler

func NewGoTeamHandler(pool *pgxpool.Pool, resolver modulesSessionResolver, catalog []string, logger *slog.Logger) http.Handler

NewGoTeamHandler builds the GET /api/team handler. The caller supplies the sorted capability permission catalog used by the Vite Team page.

func NewGoTeamSSOHandler

func NewGoTeamSSOHandler(pool *pgxpool.Pool, resolver teamSSOSessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewHRSessionHandler

func NewHRSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewHarnessCompositionsHandler

func NewHarnessCompositionsHandler(resolver SessionResolver, executor CapabilityExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewHarnessCompositionsHandler builds the authenticated composition inspection endpoint. Mount it at GET /api/harness/compositions behind the Go API router.

func NewHealthHandler

func NewHealthHandler(pinger Pinger, logger *slog.Logger) http.Handler

func NewInventoryReadSessionHandler

func NewInventoryReadSessionHandler(resolver inventoryReadSessionResolver, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewInventoryWriteSessionHandler

func NewInventoryWriteSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewLedgerSessionHandler

func NewLedgerSessionHandler(resolver ledgerSessionResolver, reader LedgerReader, logger *slog.Logger) http.Handler

func NewManufacturingCollectionHandler

func NewManufacturingCollectionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewManufacturingCollectionHandler builds the Go manufacturing surface for /api/manufacturing.

func NewMarketingSessionHandler

func NewMarketingSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewMarketplaceHandler

func NewMarketplaceHandler(resolver SessionResolver, executor CapabilityExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewMarketplaceHandler builds the authenticated creator marketplace endpoint. Mount it at GET and POST /api/marketplace behind the Go API router.

func NewMemorySessionHandler

func NewMemorySessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewMessageAttachmentDownloadHandler

func NewMessageAttachmentDownloadHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, logger *slog.Logger) http.Handler

func NewMessagingAgentHandler

func NewMessagingAgentHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewMessagingCollectionHandler

func NewMessagingCollectionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewMessagingCollectionHandler builds the authenticated messaging collection endpoint. Mount it with MountGoMessagingCollectionRoute behind the Go API router.

func NewMessagingPresenceHandler

func NewMessagingPresenceHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewMetricsSessionHandler

func NewMetricsSessionHandler(resolver metricsSessionResolver, reader MetricsReader, logger *slog.Logger) http.Handler

NewMetricsSessionHandler serves the Vite metrics response using the verified active organization from the Go session resolver.

func NewModuleSettingsSessionHandler

func NewModuleSettingsSessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewModulesHandler

func NewModulesHandler(resolver modulesSessionResolver) http.Handler

NewModulesHandler serves the authenticated module switchboard catalog for the organization resolved by the Go session resolver.

func NewModulesWriteHandler

func NewModulesWriteHandler(resolver modulesSessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewModulesWriteHandler serves governed module switchboard writes for a verified session.

func NewMyWorkSessionHandler

func NewMyWorkSessionHandler(resolver myWorkSessionResolver, reader myWorkReader, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewMyWorkSummaryPostgresReader

func NewMyWorkSummaryPostgresReader(pool dbx.Beginner) myWorkSummaryConfigReader

func NewMyWorkSummarySessionHandler

func NewMyWorkSummarySessionHandler(resolver myWorkSessionResolver, config myWorkSummaryConfigReader, model myWorkSummaryModel, logger *slog.Logger, trustedProxyCIDRs ...*net.IPNet) http.Handler

NewMyWorkSummarySessionHandler creates the authenticated Go handler for the work brief. Workspace credentials are loaded and decrypted only on the API.

func NewNotificationPreferencesHandler

func NewNotificationPreferencesHandler(pool *pgxpool.Pool, resolver notificationPreferencesResolver, logger *slog.Logger, trustedProxyCIDRs ...*net.IPNet) http.Handler

func NewNotificationReadHandler

func NewNotificationReadHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewNotificationReadHandler handles POST /api/notifications mark-read requests.

func NewNotificationsSessionHandler

func NewNotificationsSessionHandler(pool *pgxpool.Pool, resolver notificationsSessionResolver, logger *slog.Logger) http.Handler

func NewOIDCSignInHandler

func NewOIDCSignInHandler(ctx context.Context, service *authn.Service, secret string, secureCookie bool, logger *slog.Logger, trustedProxyCIDRs []*net.IPNet, config OIDCConfig) (http.Handler, error)

func NewPolicySessionHandler

func NewPolicySessionHandler(resolver DirectCapabilitySessionResolver, reader PolicyReader, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewPortalInvoiceHandler

func NewPortalInvoiceHandler(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewPortalInvoiceHandler builds the unauthenticated read-only invoice portal. The share token is the sole credential and is never echoed in a response.

func NewPosCustomersSessionHandler

func NewPosCustomersSessionHandler(pool *pgxpool.Pool, resolver posCustomersSessionResolver, logger *slog.Logger) http.Handler

func NewPosReadSessionHandler

func NewPosReadSessionHandler(pool *pgxpool.Pool, resolver interface {
	Resolve(context.Context, string, string) (*session.ResolvedUser, error)
	ResolveBearerToken(context.Context, string, string) (*session.ResolvedUser, error)
}, logger *slog.Logger) http.Handler

func NewPosSessionHandler

func NewPosSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewPosShiftSummarySessionHandler

func NewPosShiftSummarySessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewProjectsSessionHandler

func NewProjectsSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewProposalsHandler

func NewProposalsHandler(resolver SessionResolver, executor CapabilityExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewProposalsHandler builds the authenticated creator proposal collection endpoint. Mount it at GET and POST /api/proposals behind the Go API router.

func NewPurchasingCollectionSessionHandler

func NewPurchasingCollectionSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewPurchasingCollectionSessionHandler exposes the purchasing workspace read and every purchasing body action through the governed capability executor. Identity, permissions and approvals are resolved on every request.

func NewPurchasingPaymentRunsSessionHandler

func NewPurchasingPaymentRunsSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewPurchasingPaymentRunsSessionHandler exposes the supplier payment run workspace read and its draft/instruct/reverse actions through the governed capability executor.

func NewQuotesSessionHandler

func NewQuotesSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewRecordSearchHandler

func NewRecordSearchHandler(pool *pgxpool.Pool, resolver recordSearchResolver, logger *slog.Logger) http.Handler

func NewRecurringSessionHandler

func NewRecurringSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewReportsSessionHandler

func NewReportsSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewRouter

func NewRouter(pinger Pinger, logger *slog.Logger, bridgeSecret string, policyReader PolicyReader, ledgerReader LedgerReader, orgMembershipChecker OrgMembershipChecker, capabilityExecutor CapabilityExecutor, approvalDeciders ...ApprovalDecisionDecider) http.Handler

func NewRouterWithApprovalInbox

func NewRouterWithApprovalInbox(pinger Pinger, logger *slog.Logger, bridgeSecret string, policyReader PolicyReader, ledgerReader LedgerReader, orgMembershipChecker OrgMembershipChecker, capabilityExecutor CapabilityExecutor, metricsReader MetricsReader, approvalInboxReader ApprovalInboxReader, approvalDeciders ...ApprovalDecisionDecider) http.Handler

func NewRouterWithAuthAndOrgRoute

func NewRouterWithAuthAndOrgRoute(pinger Pinger, logger *slog.Logger, bridgeSecret string, policyReader PolicyReader, ledgerReader LedgerReader, orgMembershipChecker OrgMembershipChecker, capabilityExecutor CapabilityExecutor, metricsReader MetricsReader, approvalInboxReader ApprovalInboxReader, orgRoute, authRoute http.Handler, approvalDeciders ...ApprovalDecisionDecider) http.Handler

NewRouterWithAuthAndOrgRoute mounts the full auth namespace only when an auth handler is explicitly supplied. Unsupported auth paths remain owned by Go and fail closed instead of reaching the base handler.

func NewRouterWithMetrics

func NewRouterWithMetrics(pinger Pinger, logger *slog.Logger, bridgeSecret string, policyReader PolicyReader, ledgerReader LedgerReader, orgMembershipChecker OrgMembershipChecker, capabilityExecutor CapabilityExecutor, metricsReader MetricsReader, approvalDeciders ...ApprovalDecisionDecider) http.Handler

func NewRouterWithOrgRoute

func NewRouterWithOrgRoute(pinger Pinger, logger *slog.Logger, bridgeSecret string, policyReader PolicyReader, ledgerReader LedgerReader, orgMembershipChecker OrgMembershipChecker, capabilityExecutor CapabilityExecutor, metricsReader MetricsReader, approvalInboxReader ApprovalInboxReader, orgRoute http.Handler, approvalDeciders ...ApprovalDecisionDecider) http.Handler

NewRouterWithOrgRoute mounts the organization route in addition to the bridge endpoints. It is separate from NewRouterWithApprovalInbox so existing callers keep compiling unchanged while the route is still being proven.

func NewRoutinesSessionHandler

func NewRoutinesSessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewRoutinesWebhookHandler

func NewRoutinesWebhookHandler(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) http.Handler

func NewRoutinesWebhookReadHandler

func NewRoutinesWebhookReadHandler() http.Handler

NewRoutinesWebhookReadHandler builds the refusal handler for GET /api/routines/webhook/{token}.

func NewSAMLSignInHandler

func NewSAMLSignInHandler(service *authn.Service, secret string, secureCookie bool, logger *slog.Logger, config SAMLConfig) (http.Handler, error)

func NewSCIMCollectionDeleteHandler

func NewSCIMCollectionDeleteHandler(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewSCIMCollectionDeleteHandler builds the collection-level refusal with its own SCIM auth attempt budget.

func NewSCIMCollectionDeleteHandlerWithLimiter

func NewSCIMCollectionDeleteHandlerWithLimiter(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger, limiter *SCIMRateLimiter) (http.Handler, error)

NewSCIMCollectionDeleteHandlerWithLimiter shares the SCIM attempt budget and bearer-token resolution with the mounted read and write handlers.

func NewSCIMReadHandler

func NewSCIMReadHandler(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewSCIMReadHandler creates an opt-in SCIM 2.0 user read handler. SCIM bearer tokens are SHA-256 hashed before lookup and only select the org via a narrowly granted database resolver. User reads always run in WithOrgTx.

func NewSCIMReadHandlerWithLimiter

func NewSCIMReadHandlerWithLimiter(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger, limiter *SCIMRateLimiter) (http.Handler, error)

NewSCIMReadHandlerWithLimiter allows the server to share one attempt budget across its separately mounted SCIM read and write handlers.

func NewSCIMTokenSessionHandler

func NewSCIMTokenSessionHandler(pool *pgxpool.Pool, resolver SCIMTokenSessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs []*net.IPNet) http.Handler

func NewSCIMWriteHandler

func NewSCIMWriteHandler(pool *pgxpool.Pool, executor scimProvisionExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewSCIMWriteHandler creates the governed SCIM provisioning boundary. Its executor dependency has one external-actor capability and cannot execute arbitrary human or agent capabilities.

func NewSCIMWriteHandlerWithLimiter

func NewSCIMWriteHandlerWithLimiter(pool *pgxpool.Pool, executor scimProvisionExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger, limiter *SCIMRateLimiter) (http.Handler, error)

NewSCIMWriteHandlerWithLimiter shares the supplied SCIM attempt budget with the read handler when both handlers serve the same API process.

func NewSalesCustomersSessionHandler

func NewSalesCustomersSessionHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, logger *slog.Logger) http.Handler

func NewSalesInvoiceHandler

func NewSalesInvoiceHandler(pool *pgxpool.Pool, resolver salesInvoiceSessionResolver, logger *slog.Logger) http.Handler

NewSalesInvoiceHandler creates a handler backed by PostgreSQL and the Better Auth session resolver. The caller must mount GET /api/sales/{orderId}.

func NewSalesOrdersSessionHandler

func NewSalesOrdersSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger) http.Handler

func NewSalesOrdersWriteSessionHandler

func NewSalesOrdersWriteSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewSessionCapabilityHandler

func NewSessionCapabilityHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

NewSessionCapabilityHandler exposes the governed executor directly to authenticated clients. Identity and permissions are resolved from the Better Auth session on every request, never from caller-supplied claims.

func NewSessionCapabilityHandlerWithDisabledCapabilities

func NewSessionCapabilityHandlerWithDisabledCapabilities(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, disabledCapabilities map[string]struct{}, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewSessionRevertHandler

func NewSessionRevertHandler(pool *pgxpool.Pool, resolver sessionRevertResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...*net.IPNet) http.Handler

func NewSessionsDetailHandler

func NewSessionsDetailHandler(resolver sessionsDetailResolver, pool *pgxpool.Pool, logger *slog.Logger) http.Handler

NewSessionsDetailHandler serves the legacy session detail and replay routes from the verified Go session and the active organization.

func NewSessionsListHandler

func NewSessionsListHandler(pool *pgxpool.Pool, resolver sessionsListResolver, logger *slog.Logger) http.Handler

func NewSetupSessionHandler

func NewSetupSessionHandler(resolver setupSessionResolver, reader setupReader, logger *slog.Logger) http.Handler

func NewSignalsSessionHandler

func NewSignalsSessionHandler(resolver signalsSessionResolver, executor CapabilityExecutor, logger *slog.Logger) http.Handler

NewSignalsSessionHandler serves the legacy signals feed through the governed Go capability executor using identity resolved from the incoming session.

func NewSupportAdminHandler

func NewSupportAdminHandler(pool *pgxpool.Pool, resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) (http.Handler, error)

NewSupportAdminHandler builds the Go support surface for /api/support.

func NewSupportChannelsHandler

func NewSupportChannelsHandler(pool *pgxpool.Pool, resolver SessionResolver, executor CapabilityExecutor, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewSupportChannelsHandler builds the authenticated support channel settings endpoint. Mount it at /api/support/channels behind the Go API router.

func NewSupportCustomersSessionHandler

func NewSupportCustomersSessionHandler(pool *pgxpool.Pool, resolver supportCustomersSessionResolver, logger *slog.Logger) http.Handler

func NewSupportPublicHandler

func NewSupportPublicHandler(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger) (http.Handler, error)

NewSupportPublicHandler builds the unauthenticated website widget API. Its only tenant selector is the public embed token; visitor identity is a per-thread secret that is hashed before storage.

func NewSupportPublicHandlerWithEmbedding

func NewSupportPublicHandlerWithEmbedding(pool *pgxpool.Pool, trustedProxyCIDRs []*net.IPNet, logger *slog.Logger, model string, embedder capability.SupportKnowledgeEmbedder) (http.Handler, error)

NewSupportPublicHandlerWithEmbedding configures public knowledge search to use only public article embeddings. A nil embedder preserves the lexical fallback for existing callers and tests.

func NewSupportReplyDraftSessionHandler

func NewSupportReplyDraftSessionHandler(pool *pgxpool.Pool, resolver supportReplyDraftResolver, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewTeamWriteHandler

func NewTeamWriteHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func NewTimeSessionHandler

func NewTimeSessionHandler(resolver DirectCapabilitySessionResolver, executor CapabilityExecutor, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) http.Handler

func ParseTrustedProxyCIDRs

func ParseTrustedProxyCIDRs(raw string) ([]*net.IPNet, error)

func PurchasingAPAgingDisabledCapabilities

func PurchasingAPAgingDisabledCapabilities(enabled bool) map[string]struct{}

func PurchasingWorkflowDisabledCapabilities

func PurchasingWorkflowDisabledCapabilities(enabled bool) map[string]struct{}

PurchasingWorkflowDisabledCapabilities remains for call-site compatibility; the Go workflow read is now the only supported implementation.

Types

type AIConfigSessionHandler

type AIConfigSessionHandler struct {
	// contains filtered or unexported fields
}

func (*AIConfigSessionHandler) ServeHTTP

func (handler *AIConfigSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AccountingBudgetsSessionHandler

type AccountingBudgetsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*AccountingBudgetsSessionHandler) ServeHTTP

type AccountingPeriodCloseSessionHandler

type AccountingPeriodCloseSessionHandler struct {
	// contains filtered or unexported fields
}

func (*AccountingPeriodCloseSessionHandler) ServeHTTP

type AccountingSessionHandler

type AccountingSessionHandler struct {
	// contains filtered or unexported fields
}

func (*AccountingSessionHandler) ServeHTTP

func (handler *AccountingSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AccountingTaxSessionHandler

type AccountingTaxSessionHandler struct {
	// contains filtered or unexported fields
}

func (*AccountingTaxSessionHandler) ServeHTTP

func (handler *AccountingTaxSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AnalyticsSessionHandler

type AnalyticsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*AnalyticsSessionHandler) ServeHTTP

type ApprovalDecisionSessionHandler

type ApprovalDecisionSessionHandler struct {
	// contains filtered or unexported fields
}

func (*ApprovalDecisionSessionHandler) ServeHTTP

type ApprovalInboxReader

type ApprovalInboxReader interface {
	ReadApprovalInbox(context.Context, authbridge.ApprovalInboxClaims, map[string]string) (ApprovalInboxResponse, error)
}

type ApprovalInboxResponse

type ApprovalInboxResponse struct {
	Approvals []ApprovalInboxRow `json:"approvals"`
	History   []ApprovalInboxRow `json:"history"`
}

type ApprovalInboxRow

type ApprovalInboxRow struct {
	ID                   string            `json:"id"`
	OrgID                string            `json:"orgId"`
	SessionID            *string           `json:"sessionId"`
	RequestedByUserID    *string           `json:"requestedByUserId"`
	CapabilityID         string            `json:"capabilityId"`
	RiskClass            string            `json:"riskClass"`
	Payload              json.RawMessage   `json:"payload"`
	Rationale            *string           `json:"rationale"`
	Status               string            `json:"status"`
	Version              int               `json:"version"`
	SupersedesApprovalID *string           `json:"supersedesApprovalId,omitempty"`
	DecidedByUserID      *string           `json:"decidedByUserId"`
	DecisionComment      *string           `json:"decisionComment"`
	ExpiresAt            *string           `json:"expiresAt"`
	DecidedAt            *string           `json:"decidedAt"`
	CreatedAt            string            `json:"createdAt"`
	RaisedBy             RaisedBy          `json:"raisedBy"`
	DecidedBy            *string           `json:"decidedBy"`
	RelatedDocuments     []RelatedDocument `json:"relatedDocuments"`
}

type ApprovalInboxSessionHandler

type ApprovalInboxSessionHandler struct {
	// contains filtered or unexported fields
}

func (*ApprovalInboxSessionHandler) ServeHTTP

type BankingSessionHandler

type BankingSessionHandler struct {
	// contains filtered or unexported fields
}

func (*BankingSessionHandler) ServeHTTP

func (handler *BankingSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type BrandingRead

type BrandingRead struct {
	LogoDataURL   *string `json:"logoDataUrl"`
	AccentColor   *string `json:"accentColor"`
	InvoiceFooter *string `json:"invoiceFooter"`
	Layout        string  `json:"layout"`
}

type BrandingReader

type BrandingReader interface {
	ReadBranding(context.Context, string) (*BrandingRead, error)
}

type BrandingSessionHandler

type BrandingSessionHandler struct {
	// contains filtered or unexported fields
}

func (*BrandingSessionHandler) ServeHTTP

type BrandingSessionResolver

type BrandingSessionResolver interface {
	Resolve(context.Context, string, string) (*session.ResolvedUser, error)
	ResolveBearerToken(context.Context, string, string) (*session.ResolvedUser, error)
}

type CRMCollectionSessionHandler

type CRMCollectionSessionHandler struct {
	// contains filtered or unexported fields
}

CRMCollectionSessionHandler serves the legacy CRM collection writes (POST /api/crm, POST /api/customers, POST /api/deals, GET+POST /api/crm/views) through the governed capability executor.

func (*CRMCollectionSessionHandler) ServeHTTP

type CRMFollowUpDraftSessionHandler

type CRMFollowUpDraftSessionHandler struct {
	// contains filtered or unexported fields
}

func (*CRMFollowUpDraftSessionHandler) ServeHTTP

type CRMImportSessionHandler

type CRMImportSessionHandler struct {
	// contains filtered or unexported fields
}

CRMImportSessionHandler ports the legacy CSV import route for customers (crm.importCustomers) and products (inventory.importItems) plus their undo actions, executing the same capabilities the Vite client calls directly.

func (*CRMImportSessionHandler) ServeHTTP

type CRMReadSessionHandler

type CRMReadSessionHandler struct {
	// contains filtered or unexported fields
}

func (*CRMReadSessionHandler) ServeHTTP

type CapabilityExecutor

type CapabilityExecutor interface {
	Execute(context.Context, authbridge.CapabilityClaims, string, json.RawMessage) (capability.Result, error)
}

type DashboardSessionHandler

type DashboardSessionHandler struct {
	// contains filtered or unexported fields
}

func (*DashboardSessionHandler) ServeHTTP

type DirectCapabilitySessionResolver

type DirectCapabilitySessionResolver interface {
	Resolve(context.Context, string, string) (*session.ResolvedUser, error)
	ResolveBearerToken(context.Context, string, string) (*session.ResolvedUser, error)
}

type DocumentContentDownloadHandler

type DocumentContentDownloadHandler struct {
	// contains filtered or unexported fields
}

func (*DocumentContentDownloadHandler) ServeHTTP

type DurableRunsSessionHandler

type DurableRunsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*DurableRunsSessionHandler) ServeHTTP

type EmailHandler

type EmailHandler struct {
	// contains filtered or unexported fields
}

func (*EmailHandler) ServeHTTP

func (h *EmailHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type EvaluationCheckResult

type EvaluationCheckResult struct {
	ID     string `json:"id"`
	Label  string `json:"label"`
	Passed bool   `json:"passed"`
	Detail string `json:"detail"`
}

type EvaluationCheckSpec

type EvaluationCheckSpec struct {
	ID    string
	Label string
	Kind  string
	Tool  string
	Field string
	Text  string
	Limit int
}

type EvaluationRunResult

type EvaluationRunResult struct {
	ScenarioID  string                  `json:"scenarioId"`
	Status      string                  `json:"status"`
	Model       string                  `json:"model"`
	FinalAnswer string                  `json:"finalAnswer"`
	DurationMS  int64                   `json:"durationMs"`
	Usage       chatUsage               `json:"usage"`
	ToolCalls   []EvaluationToolCall    `json:"toolCalls"`
	Checks      []EvaluationCheckResult `json:"checks"`
	Error       string                  `json:"error,omitempty"`
	Persisted   bool                    `json:"persisted"`
	CreatedAt   time.Time               `json:"createdAt"`
}

type EvaluationScenario

type EvaluationScenario struct {
	ID          string
	Title       string
	Description string
	Prompt      string
	Fixtures    map[string]json.RawMessage
	Checks      []EvaluationCheckSpec
	MaxSteps    int
}

EvaluationScenario is a bounded tool-choice exercise. It never executes a real business capability: every tool call is answered from Fixtures, so a live model can be evaluated without creating records or spending authority.

type EvaluationScenarioSummary

type EvaluationScenarioSummary struct {
	ID          string   `json:"id"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Checks      []string `json:"checks"`
}

type EvaluationSessionHandler

type EvaluationSessionHandler struct {
	// contains filtered or unexported fields
}

func NewEvaluationSessionHandler

func NewEvaluationSessionHandler(pool *pgxpool.Pool, resolver evaluationSessionResolver, logger *slog.Logger, trustedProxyCIDRs ...*net.IPNet) *EvaluationSessionHandler

func (*EvaluationSessionHandler) ServeHTTP

type EvaluationToolCall

type EvaluationToolCall struct {
	Name      string          `json:"name"`
	Arguments json.RawMessage `json:"arguments"`
	Result    json.RawMessage `json:"result"`
}

type ExpensesSessionHandler

type ExpensesSessionHandler struct {
	// contains filtered or unexported fields
}

func (*ExpensesSessionHandler) ServeHTTP

type GoApprovalDecisionHandler

type GoApprovalDecisionHandler struct {
	// contains filtered or unexported fields
}

func (*GoApprovalDecisionHandler) ServeHTTP

type GoApprovalInboxHandler

type GoApprovalInboxHandler struct {
	// contains filtered or unexported fields
}

func (*GoApprovalInboxHandler) ServeHTTP

type GoCRMReadHandler

type GoCRMReadHandler struct {
	// contains filtered or unexported fields
}

func (*GoCRMReadHandler) ServeHTTP

func (h *GoCRMReadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GoCapabilityHandler

type GoCapabilityHandler struct {
	// contains filtered or unexported fields
}

func (*GoCapabilityHandler) ServeHTTP

func (h *GoCapabilityHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GoInvitationHandler

type GoInvitationHandler struct {
	// contains filtered or unexported fields
}

func (*GoInvitationHandler) ServeHTTP

func (h *GoInvitationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GoLedgerHandler

type GoLedgerHandler struct {
	// contains filtered or unexported fields
}

func (*GoLedgerHandler) ServeHTTP

func (h *GoLedgerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GoMetricsHandler

type GoMetricsHandler struct {
	// contains filtered or unexported fields
}

func (*GoMetricsHandler) ServeHTTP

func (h *GoMetricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GoOrgSwitchHandler

type GoOrgSwitchHandler struct {
	// contains filtered or unexported fields
}

func (*GoOrgSwitchHandler) ServeHTTP

func (h *GoOrgSwitchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GoPolicyHandler

type GoPolicyHandler struct {
	// contains filtered or unexported fields
}

func (*GoPolicyHandler) ServeHTTP

func (h *GoPolicyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GoProjectsReadHandler

type GoProjectsReadHandler struct {
	// contains filtered or unexported fields
}

func (*GoProjectsReadHandler) ServeHTTP

type GoTeamHandler

type GoTeamHandler struct {
	// contains filtered or unexported fields
}

GoTeamHandler serves the authenticated read side of the team API. The permission catalog comes from the application capability registry so it stays aligned with the permissions that role editors may grant.

func (*GoTeamHandler) ServeHTTP

func (h *GoTeamHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HRSessionHandler

type HRSessionHandler struct {
	// contains filtered or unexported fields
}

func (*HRSessionHandler) ServeHTTP

func (handler *HRSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HealthHandler

type HealthHandler struct {
	// contains filtered or unexported fields
}

func (*HealthHandler) ServeHTTP

func (h *HealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type InventoryReadSessionHandler

type InventoryReadSessionHandler struct {
	// contains filtered or unexported fields
}

func (*InventoryReadSessionHandler) ServeHTTP

type InventoryWriteSessionHandler

type InventoryWriteSessionHandler struct {
	// contains filtered or unexported fields
}

func (*InventoryWriteSessionHandler) ServeHTTP

type LedgerReader

type LedgerReader interface {
	RecentForOrg(context.Context, string, int) ([]ledger.Event, error)
}

type LedgerSessionHandler

type LedgerSessionHandler struct {
	// contains filtered or unexported fields
}

func (*LedgerSessionHandler) ServeHTTP

func (h *LedgerSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ManufacturingCollectionHandler

type ManufacturingCollectionHandler struct {
	// contains filtered or unexported fields
}

ManufacturingCollectionHandler serves GET and POST /api/manufacturing: the overview and lot-trace reads, plus the legacy manufacturing action union, all through the governed capability executor.

func (*ManufacturingCollectionHandler) ServeHTTP

type MarketingSessionHandler

type MarketingSessionHandler struct {
	// contains filtered or unexported fields
}

func (*MarketingSessionHandler) ServeHTTP

type MemorySessionHandler

type MemorySessionHandler struct {
	// contains filtered or unexported fields
}

func (*MemorySessionHandler) ServeHTTP

func (h *MemorySessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MessageAttachmentDownloadHandler

type MessageAttachmentDownloadHandler struct {
	// contains filtered or unexported fields
}

func (*MessageAttachmentDownloadHandler) ServeHTTP

type MetricsReader

type MetricsReader interface {
	ForOrg(context.Context, string) (metrics.Payload, error)
}

type MetricsSessionHandler

type MetricsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*MetricsSessionHandler) ServeHTTP

type ModuleSettingsSessionHandler

type ModuleSettingsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*ModuleSettingsSessionHandler) ServeHTTP

type ModulesWriteHandler

type ModulesWriteHandler struct {
	// contains filtered or unexported fields
}

func (*ModulesWriteHandler) ServeHTTP

func (h *ModulesWriteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MyWorkCard

type MyWorkCard = businesscontract.MyWorkCard

type MyWorkSessionHandler

type MyWorkSessionHandler struct {
	// contains filtered or unexported fields
}

func (*MyWorkSessionHandler) ServeHTTP

func (h *MyWorkSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MyWorkSummarySessionHandler

type MyWorkSummarySessionHandler struct {
	// contains filtered or unexported fields
}

func (*MyWorkSummarySessionHandler) ServeHTTP

type NotificationPreferencesHandler

type NotificationPreferencesHandler struct {
	// contains filtered or unexported fields
}

func (*NotificationPreferencesHandler) ServeHTTP

type NotificationReadHandler

type NotificationReadHandler struct {
	// contains filtered or unexported fields
}

func (*NotificationReadHandler) ServeHTTP

type NotificationsSessionHandler

type NotificationsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*NotificationsSessionHandler) ServeHTTP

func (handler *NotificationsSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type OIDCConfig

type OIDCConfig struct {
	Issuer               string
	ClientID             string
	ClientSecret         string
	RedirectURI          string
	NativeRedirectURI    string
	TrustVerifiedEmail   bool
	AllowedEndpointHosts string
}

type OrgHandler

type OrgHandler struct {
	// contains filtered or unexported fields
}

OrgHandler serves the public /api/org surface: the organization switcher, the active-organization switch, and the organization's agent persona.

It resolves the session itself through the session middleware rather than trusting an assertion minted elsewhere, which is what lets it eventually own the route outright.

func NewOrgHandler

func NewOrgHandler(repo OrgRepository, resolver SessionResolver, executor CapabilityExecutor, secret string, logger *slog.Logger, trustedProxyCIDRs ...[]*net.IPNet) *OrgHandler

func (*OrgHandler) ServeHTTP

func (h *OrgHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type OrgMembershipChecker

type OrgMembershipChecker interface {
	IsMember(context.Context, string, string) (bool, error)
}

type OrgRepository

type OrgRepository interface {
	// ListOrgsForUser returns the organizations from the authenticated session's
	// membership snapshot, rechecking each membership inside its RLS context.
	ListOrgsForUser(ctx context.Context, userID string, orgIDs []string) ([]OrgSummary, error)
	// IsMember reports whether the user belongs to the organization.
	IsMember(ctx context.Context, userID, orgID string) (bool, error)
	// AgentSoul reads the organization's standing agent persona.
	AgentSoul(ctx context.Context, orgID string) (string, error)
}

OrgRepository is the storage the organization route needs. It is an interface so the route can be exercised without a database.

type OrgSummary

type OrgSummary struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	BaseCurrency string `json:"baseCurrency"`
}

OrgSummary is one entry of the organization switcher.

type PGXBankingPaymentReader

type PGXBankingPaymentReader struct {
	// contains filtered or unexported fields
}

func NewPGXBankingPaymentReader

func NewPGXBankingPaymentReader(pool *pgxpool.Pool) *PGXBankingPaymentReader

func (*PGXBankingPaymentReader) RecentBankingPayments

func (reader *PGXBankingPaymentReader) RecentBankingPayments(ctx context.Context, orgID string) ([]bankingRESTPayment, error)

type PGXBrandingReader

type PGXBrandingReader struct {
	// contains filtered or unexported fields
}

func NewPGXBrandingReader

func NewPGXBrandingReader(pool *pgxpool.Pool) *PGXBrandingReader

func (*PGXBrandingReader) ReadBranding

func (r *PGXBrandingReader) ReadBranding(ctx context.Context, orgID string) (*BrandingRead, error)

type PgOrgRepository

type PgOrgRepository struct {
	// contains filtered or unexported fields
}

PgOrgRepository is the PostgreSQL-backed OrgRepository.

func NewPgOrgRepository

func NewPgOrgRepository(pool *pgxpool.Pool) *PgOrgRepository

func (*PgOrgRepository) AgentSoul

func (r *PgOrgRepository) AgentSoul(ctx context.Context, orgID string) (string, error)

AgentSoul returns the organization's persona, or the empty string when the organization has none. A missing organization reads as empty rather than erroring, matching the legacy route's optional chaining.

func (*PgOrgRepository) IsMember

func (r *PgOrgRepository) IsMember(ctx context.Context, userID, orgID string) (bool, error)

func (*PgOrgRepository) ListOrgsForUser

func (r *PgOrgRepository) ListOrgsForUser(ctx context.Context, userID string, orgIDs []string) ([]OrgSummary, error)

ListOrgsForUser loads the caller's session-scoped membership candidates one tenant at a time. Each organization and membership check runs under its RLS context, and revoked memberships are omitted.

type Pinger

type Pinger interface {
	Ping(context.Context) error
}

type PolicyReader

type PolicyReader interface {
	ForOrg(context.Context, string) (policy.Value, error)
}

type PolicySessionHandler

type PolicySessionHandler struct {
	// contains filtered or unexported fields
}

func (*PolicySessionHandler) ServeHTTP

func (h *PolicySessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PosCustomersSessionHandler

type PosCustomersSessionHandler struct {
	// contains filtered or unexported fields
}

func (*PosCustomersSessionHandler) ServeHTTP

type PosReadSessionHandler

type PosReadSessionHandler struct {
	// contains filtered or unexported fields
}

func (*PosReadSessionHandler) ServeHTTP

type PosSessionHandler

type PosSessionHandler struct {
	// contains filtered or unexported fields
}

func (*PosSessionHandler) ServeHTTP

func (handler *PosSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PosShiftSummarySessionHandler

type PosShiftSummarySessionHandler struct {
	// contains filtered or unexported fields
}

func (*PosShiftSummarySessionHandler) ServeHTTP

type PostgresApprovalInboxReader

type PostgresApprovalInboxReader struct {
	// contains filtered or unexported fields
}

func NewPostgresApprovalInboxReader

func NewPostgresApprovalInboxReader(pool dbx.Beginner) *PostgresApprovalInboxReader

func (*PostgresApprovalInboxReader) ReadApprovalInbox

func (reader *PostgresApprovalInboxReader) ReadApprovalInbox(ctx context.Context, claims authbridge.ApprovalInboxClaims, capabilityPermissions map[string]string) (ApprovalInboxResponse, error)

type ProjectsSessionHandler

type ProjectsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*ProjectsSessionHandler) ServeHTTP

type PurchasingCollectionSessionHandler

type PurchasingCollectionSessionHandler struct {
	// contains filtered or unexported fields
}

func (*PurchasingCollectionSessionHandler) ServeHTTP

type PurchasingPaymentRunsSessionHandler

type PurchasingPaymentRunsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*PurchasingPaymentRunsSessionHandler) ServeHTTP

type QuotesSessionHandler

type QuotesSessionHandler struct {
	// contains filtered or unexported fields
}

func (*QuotesSessionHandler) ServeHTTP

func (h *QuotesSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RaisedBy

type RaisedBy struct {
	Name string `json:"name"`
	Kind string `json:"kind"`
}

type RecordSearchHandler

type RecordSearchHandler struct {
	// contains filtered or unexported fields
}

func (*RecordSearchHandler) ServeHTTP

func (h *RecordSearchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RecurringSessionHandler

type RecurringSessionHandler struct {
	// contains filtered or unexported fields
}

func (*RecurringSessionHandler) ServeHTTP

type RelatedDocument

type RelatedDocument struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

type ReportsSessionHandler

type ReportsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*ReportsSessionHandler) ServeHTTP

type RoutinesSessionHandler

type RoutinesSessionHandler struct {
	// contains filtered or unexported fields
}

func (*RoutinesSessionHandler) ServeHTTP

type RoutinesWebhookHandler

type RoutinesWebhookHandler struct {
	// contains filtered or unexported fields
}

func (*RoutinesWebhookHandler) ServeHTTP

type RoutinesWebhookReadHandler

type RoutinesWebhookReadHandler struct{}

RoutinesWebhookReadHandler answers the legacy GET alias on the routine webhook path. The legacy route re-ran the trigger on GET, which lets a crawler or prefetcher fire a routine; Go refuses with 405 and names the supported method in Allow so orchestrators fail loudly instead of silently executing work.

func (RoutinesWebhookReadHandler) ServeHTTP

type SAMLConfig

type SAMLConfig struct {
	IDPIssuer          string
	IDPSSOURL          string
	IDPSigningCertPEM  string
	SPEntityID         string
	ACSURL             string
	SuccessURL         string
	TrustVerifiedEmail bool
	EmailAttribute     string
	NameAttribute      string
}

SAMLConfig contains operator-pinned trust. The SSO URL and signing certificate are never discovered from a request or from assertion content.

type SAMLIdentityClaims

type SAMLIdentityClaims struct {
	Issuer      string
	Subject     string
	Email       string
	Name        string
	ResponseID  string
	AssertionID string
}

type SCIMRateLimiter

type SCIMRateLimiter struct {
	// contains filtered or unexported fields
}

SCIMRateLimiter shares the collection and provisioning attempt budget for a source IP when the handlers are enabled independently.

func NewSCIMRateLimiter

func NewSCIMRateLimiter() *SCIMRateLimiter

NewSCIMRateLimiter constructs the process-local SCIM auth attempt budget.

type SCIMTokenSessionHandler

type SCIMTokenSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SCIMTokenSessionHandler) ServeHTTP

type SCIMTokenSessionResolver

type SCIMTokenSessionResolver interface {
	Resolve(context.Context, string, string) (*session.ResolvedUser, error)
	ResolveBearerToken(context.Context, string, string) (*session.ResolvedUser, error)
}

type SalesCustomersSessionHandler

type SalesCustomersSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SalesCustomersSessionHandler) ServeHTTP

type SalesInvoiceHandler

type SalesInvoiceHandler struct {
	// contains filtered or unexported fields
}

SalesInvoiceHandler serves the authenticated invoice-print API contract. It deliberately resolves Better Auth sessions inside Go so clients do not need a server-minted assertion.

func (*SalesInvoiceHandler) ServeHTTP

func (h *SalesInvoiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SalesOrdersSessionHandler

type SalesOrdersSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SalesOrdersSessionHandler) ServeHTTP

type SalesOrdersWriteSessionHandler

type SalesOrdersWriteSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SalesOrdersWriteSessionHandler) ServeHTTP

type SessionCapabilityHandler

type SessionCapabilityHandler struct {
	// contains filtered or unexported fields
}

func (*SessionCapabilityHandler) ServeHTTP

type SessionResolver

type SessionResolver interface {
	Resolve(ctx context.Context, signedCookie, activeOrgCookie string) (*session.ResolvedUser, error)
}

SessionResolver is the slice of the session package this route depends on. Depending on the behaviour rather than the concrete resolver keeps the route testable without a database and without a cross-package test seam into the session package's internals.

type SessionResolverFunc

type SessionResolverFunc func(ctx context.Context, signedCookie, activeOrgCookie string) (*session.ResolvedUser, error)

SessionResolverFunc adapts a function to SessionResolver.

func (SessionResolverFunc) Resolve

func (f SessionResolverFunc) Resolve(ctx context.Context, signedCookie, activeOrgCookie string) (*session.ResolvedUser, error)

Resolve calls the function.

type SessionRevertHandler

type SessionRevertHandler struct {
	// contains filtered or unexported fields
}

func (*SessionRevertHandler) ServeHTTP

func (h *SessionRevertHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SessionsDetailHandler

type SessionsDetailHandler struct {
	// contains filtered or unexported fields
}

func (*SessionsDetailHandler) ServeHTTP

type SessionsListHandler

type SessionsListHandler struct {
	// contains filtered or unexported fields
}

func (*SessionsListHandler) ServeHTTP

func (h *SessionsListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SetupSessionHandler

type SetupSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SetupSessionHandler) ServeHTTP

func (h *SetupSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SignalsSessionHandler

type SignalsSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SignalsSessionHandler) ServeHTTP

type SupportAdminHandler

type SupportAdminHandler struct {
	// contains filtered or unexported fields
}

SupportAdminHandler serves GET and POST /api/support through the governed capability executor: the inbox, conversation transcript and library reads, plus the legacy action union. Drafting reuses the same context reader and generator implementations as the dedicated draft route; each surface keeps its own rate limiter instance.

func (*SupportAdminHandler) ServeHTTP

func (h *SupportAdminHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SupportCustomersSessionHandler

type SupportCustomersSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SupportCustomersSessionHandler) ServeHTTP

type SupportReplyDraftSessionHandler

type SupportReplyDraftSessionHandler struct {
	// contains filtered or unexported fields
}

func (*SupportReplyDraftSessionHandler) ServeHTTP

type TeamSSOSessionHandler

type TeamSSOSessionHandler struct {
	// contains filtered or unexported fields
}

func (*TeamSSOSessionHandler) ServeHTTP

type TeamWriteHandler

type TeamWriteHandler struct {
	// contains filtered or unexported fields
}

func (*TeamWriteHandler) ServeHTTP

func (h *TeamWriteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TimeSessionHandler

type TimeSessionHandler struct {
	// contains filtered or unexported fields
}

func (*TimeSessionHandler) ServeHTTP

func (h *TimeSessionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL