MCPcopy Index your code

hub / github.com/gotenberg/gotenberg / functions

Functions1,037 in github.com/gotenberg/gotenberg

↓ 1 callersFunctioncopyHeaders
(dst, src http.Header)
pkg/modules/chromium/pinning_proxy.go:342
↓ 1 callersFunctiondoRequest
(method, url string, headers map[string]string, body io.Reader)
test/integration/scenario/http.go:13
↓ 1 callersMethoddoRestart
doRestart coordinates a process restart, draining all active concurrent tasks before stopping and restarting the process.
pkg/gotenberg/supervisor.go:565
↓ 1 callersFunctionembedFacturXXml
embedFacturXXml embeds the Factur-X invoice XML into each PDF under the canonical [gotenberg.FacturXDocumentFileName] name, regardless of the uploaded
pkg/modules/pdfengines/routes.go:631
↓ 1 callersFunctionembedRoute
embedRoute returns an [api.Route] which can add embedded files to PDFs. TODO: attachments instead?
pkg/modules/pdfengines/routes.go:1522
↓ 1 callersFunctionencryptRoute
encryptRoute returns an [api.Route] which can add password protection to PDFs.
pkg/modules/pdfengines/routes.go:1477
↓ 1 callersMethodensureHealthy
ensureHealthy checks the underlying process health and triggers a synchronous restart if the process is unhealthy. Skips the check if a restart is alr
pkg/gotenberg/supervisor.go:521
↓ 1 callersMethodensureStarted
ensureStarted performs a lazy launch of the process on its first use. Concurrent callers serialize on firstStartMu; once the launch succeeds, subseque
pkg/gotenberg/supervisor.go:475
↓ 1 callersMethodexec
exec runs the command and returns its exit code and error.
pkg/gotenberg/cmd.go:138
↓ 1 callersFunctionexecErrorType
execErrorType maps an execution failure to a bounded semconv error.type value.
pkg/gotenberg/cmd.go:182
↓ 1 callersFunctionfacturXDescription
facturXDescription builds the fx rdf:Description carrying the runtime values.
pkg/modules/qpdf/qpdf.go:1020
↓ 1 callersFunctionfacturXExtensionSchema
facturXExtensionSchema builds the rdf:Description that declares the PDF/A extension schema for the fx namespace, including the namespace declarations.
pkg/modules/qpdf/qpdf.go:1038
↓ 1 callersFunctionfacturXRoute
facturXRoute returns an [api.Route] which turns existing PDFs into Factur-X documents: it ensures PDF/A-3, embeds the CII invoice XML, and injects the
pkg/modules/pdfengines/routes.go:1705
↓ 1 callersFunctionfindScenarioLine
(filePath, name string)
test/integration/scenario/scenario.go:70
↓ 1 callersFunctionflattenRoute
flattenRoute returns an [api.Route] which can flatten PDFs.
pkg/modules/pdfengines/routes.go:1230
↓ 1 callersFunctionfreePort
(logger *slog.Logger)
pkg/modules/libreoffice/api/freeport.go:11
↓ 1 callersFunctiongcpSeverityColorEncoder
(l slog.Level)
pkg/gotenberg/internal/log/stdhandler.go:133
↓ 1 callersMethodgetEventBody
()
test/integration/scenario/server.go:188
↓ 1 callersMethodhandleConnect
handleConnect handles HTTPS (and any other CONNECT) tunnels. Chromium issues CONNECT host:port; the proxy validates the host, dials the pinned IP, and
pkg/modules/chromium/pinning_proxy.go:165
↓ 1 callersMethodhandleConnect
handleConnect implements an HTTPS tunnel. It validates the destination host through [gotenberg.DecideOutbound] (synthesizing an https URL), dials the
pkg/modules/libreoffice/api/proxy.go:161
↓ 1 callersMethodhandleForward
handleForward handles plain HTTP requests sent to the proxy as absolute URIs (GET http://host/path). The proxy revalidates the URL, then forwards the
pkg/modules/chromium/pinning_proxy.go:256
↓ 1 callersMethodhandleHttp
handleHttp forwards a plain HTTP request whose URL line is absolute (RFC 7230 5.3.2) through the outbound HTTP client, which validates the destination
pkg/modules/libreoffice/api/proxy.go:119
↓ 1 callersFunctionhostnameFromURL
(rawURL string)
pkg/modules/chromium/events.go:299
↓ 1 callersFunctionhttpErrorHandler
httpErrorHandler is the centralized HTTP error handler. It parses the error, returns a response as "text/plain; charset=UTF-8".
pkg/modules/api/middlewares.go:92
↓ 1 callersFunctionhttpLikeScheme
httpLikeScheme reports whether scheme is one of http, https, ws, or wss. Only these schemes go through the IP-based address check; data, blob, file, a
pkg/gotenberg/outbound.go:223
↓ 1 callersFunctionhttpRoute
(pattern string)
pkg/gotenberg/semconv/util.go:79
↓ 1 callersMethodiMakeARequestToGotenbergWithTheFollowingHeaders
(ctx context.Context, method, endpoint string, headersTable *godog.Table)
test/integration/scenario/scenario.go:161
↓ 1 callersFunctioninjectSchemaIntoExistingBag
injectSchemaIntoExistingBag appends the fx schema entry into an existing pdfaExtension:schemas bag.
pkg/modules/qpdf/qpdf.go:999
↓ 1 callersFunctionlatencyMiddleware
latencyMiddleware sets the start time in the [echo.Context] under "startTime". Its value will be used later to calculate request latency. startTime
pkg/modules/api/middlewares.go:110
↓ 1 callersFunctionlistenForEventExceptionThrown
listenForEventExceptionThrown listens for exceptions in the console and appends those exceptions to the given error pointer. See https://github.com/go
pkg/modules/chromium/events.go:438
↓ 1 callersFunctionlistenForEventLoadingFailed
listenForEventLoadingFailed listens for an event indicating that the main page or one or more resources failed to load. See: https://github.com/gotenb
pkg/modules/chromium/events.go:376
↓ 1 callersFunctionlistenForEventRequestPaused
listenForEventRequestPaused listens for requests to check if they are allowed or not. It also set the extra HTTP headers, if any. See https://github.
pkg/modules/chromium/events.go:58
↓ 1 callersFunctionlistenForEventResponseReceived
listenForEventResponseReceived listens for an invalid HTTP status code returned by the main page or by one or more resources. See: https://github.com/
pkg/modules/chromium/events.go:208
↓ 1 callersFunctionlistenForNetworkActivity
listenForNetworkActivity accumulates per-conversion network activity into aggregate from the always-on Network domain events. It is a no-op when aggre
pkg/modules/chromium/events.go:29
↓ 1 callersMethodmaybeIdleShutdown
maybeIdleShutdown stops the process if it has been idle for longer than the configured timeout. It is safe to call concurrently with Run and restart.
pkg/gotenberg/supervisor.go:407
↓ 1 callersMethodmaybeRestartAfterTask
maybeRestartAfterTask checks if the maximum request limit has been reached and, if so, triggers an asynchronous restart. If a restart is initiated, it
pkg/gotenberg/supervisor.go:539
↓ 1 callersFunctionmergeRoute
mergeRoute returns an [api.Route] which can merge PDFs.
pkg/modules/pdfengines/routes.go:913
↓ 1 callersMethodmethod
(method string)
pkg/gotenberg/semconv/client.go:188
↓ 1 callersFunctionnewChromiumBrowser
(arguments browserArguments)
pkg/modules/chromium/browser.go:67
↓ 1 callersFunctionnewLibreOfficeProcess
(arguments libreOfficeArguments)
pkg/modules/libreoffice/api/libreoffice.go:43
↓ 1 callersFunctionnewMultiPdfEngines
( mergeEngines, splitEngines, flattenEngines, convertEngines, readMetadataEngines, writeMetadataEngines,
pkg/modules/pdfengines/multi.go:34
↓ 1 callersFunctionnewRawTCPServer
newRawTCPServer starts a TCP server on 127.0.0.1:0 that calls handle for every accepted connection. It returns the listener address and a cleanup func
pkg/modules/chromium/pinning_proxy_test.go:69
↓ 1 callersFunctionnewServer
(ctx context.Context, workdir string)
test/integration/scenario/server.go:31
↓ 1 callersMethodnext
(pos, size int)
pkg/modules/chromium/stream.go:84
↓ 1 callersFunctionoutputFilenameMiddleware
outputFilenameMiddleware sets the output filename in the [echo.Context] under "outputFilename". outputFilename := c.Get("outputFilename").(string)
pkg/modules/api/middlewares.go:149
↓ 1 callersMethodpdf
(ctx context.Context, logger *slog.Logger, url, outputPath string, options PdfOptions, aggregate *networkAggre
pkg/modules/chromium/browser.go:28
↓ 1 callersMethodpdf
(ctx context.Context, logger *slog.Logger, inputPath, outputPath string, options Options)
pkg/modules/libreoffice/api/libreoffice.go:21
↓ 1 callersMethodpipeOutput
pipeOutput creates logs entries according to the process stdout and stderr. It does nothing if the logging level is not debug.
pkg/gotenberg/cmd.go:195
↓ 1 callersFunctionprintToPdfActionFunc
(reqCtx context.Context, logger *slog.Logger, outputPath string, options PdfOptions)
pkg/modules/chromium/tasks.go:24
↓ 1 callersFunctionreadBookmarksRoute
readBookmarksRoute returns an [api.Route] which returns the bookmarks of PDFs.
pkg/modules/pdfengines/routes.go:1400
↓ 1 callersFunctionreadMetadataRoute
readMetadataRoute returns an [api.Route] which returns the metadata of PDFs.
pkg/modules/pdfengines/routes.go:1322
↓ 1 callersFunctionrecordFailedScenario
(sc *godog.Scenario)
test/integration/scenario/scenario.go:47
↓ 1 callersMethodreset
(ctx context.Context)
test/integration/scenario/scenario.go:97
↓ 1 callersFunctionrootPathMiddleware
rootPathMiddleware sets the root path in the [echo.Context] under "rootPath". Its value may be used to skip a middleware execution based on a request
pkg/modules/api/middlewares.go:135
↓ 1 callersFunctionrotateRoute
rotateRoute returns an [api.Route] which can rotate pages of PDFs.
pkg/modules/pdfengines/routes.go:1668
↓ 1 callersFunctionrunBatch
runBatch runs all functions simultaneously and waits until all of them are completed or an error is encountered.
pkg/modules/chromium/events.go:577
↓ 1 callersMethodscheme
(req *http.Request)
pkg/gotenberg/semconv/client.go:296
↓ 1 callersMethodscreenshot
(ctx context.Context, logger *slog.Logger, url, outputPath string, options ScreenshotOptions, aggregate *netwo
pkg/modules/chromium/browser.go:29
↓ 1 callersFunctionscreenshotHtmlRoute
screenshotHtmlRoute returns an [api.Route] which can take a screenshot from an HTML file.
pkg/modules/chromium/routes.go:579
↓ 1 callersFunctionscreenshotMarkdownRoute
screenshotMarkdownRoute returns an [api.Route] which can take a screenshot from Markdown files.
pkg/modules/chromium/routes.go:671
↓ 1 callersFunctionscreenshotUrlRoute
screenshotUrlRoute returns an [api.Route] which can take a screenshot from a URL.
pkg/modules/chromium/routes.go:493
↓ 1 callersFunctionserverClientIP
(xForwardedFor string)
pkg/gotenberg/semconv/util.go:72
↓ 1 callersFunctionsetDeviceMetricsOverride
(logger *slog.Logger, width, height int, deviceScaleFactor float64)
pkg/modules/chromium/tasks.go:211
↓ 1 callersFunctionshiftBookmarks
(bookmarks []gotenberg.Bookmark, offset int)
pkg/modules/pdfengines/routes.go:386
↓ 1 callersMethodspanAttrs
spanAttrs returns the client-span attributes for a LibreOffice invocation: the server address and the LibreOffice version, plus any extra attributes.
pkg/modules/libreoffice/api/api.go:579
↓ 1 callersFunctionsplitRoute
splitRoute returns an [api.Route] which can extract pages from a PDF.
pkg/modules/pdfengines/routes.go:1090
↓ 1 callersFunctionstampRoute
stampRoute returns an [api.Route] which can add stamps to PDFs. nolint:dupl
pkg/modules/pdfengines/routes.go:1627
↓ 1 callersMethodstart
(ctx context.Context)
test/integration/scenario/server.go:194
↓ 1 callersMethodstartIdleTicker
startIdleTicker starts a background goroutine that periodically checks whether the process has been idle long enough to shut down.
pkg/gotenberg/supervisor.go:372
↓ 1 callersMethodstop
(ctx context.Context)
test/integration/scenario/server.go:214
↓ 1 callersFunctiontelemetryMiddleware
telemetryMiddleware manages telemetry. It sets the correlation ID in the [echo.Context] under "correlationId". correlationIdHeader := c.Get("correla
pkg/modules/api/middlewares.go:169
↓ 1 callersFunctiontestTraceRequest
(t *testing.T, serv semconv.HTTPServer, want func(testServerReq) []attribute.KeyValue)
pkg/gotenberg/semconv/common_test.go:31
↓ 1 callersFunctionwaitForEventDomContentEventFired
waitForEventDomContentEventFired registers a listener for the DomContentEventFired event and returns a waiter that blocks until the event fires or ctx
pkg/modules/chromium/events.go:459
↓ 1 callersFunctionwaitForEventLoadEventFired
waitForEventLoadEventFired registers a listener for the LoadEventFired event and returns a waiter that blocks until the event fires or ctx is done. Se
pkg/modules/chromium/events.go:483
↓ 1 callersFunctionwaitForEventLoadingFinished
waitForEventLoadingFinished registers a listener for the LoadingFinished event and returns a waiter that blocks until the event fires or ctx is done.
pkg/modules/chromium/events.go:555
↓ 1 callersFunctionwaitForEventNetworkAlmostIdle
waitForEventNetworkAlmostIdle registers a listener for the networkIdle2 lifecycle event and returns a waiter that blocks until the event fires or ctx
pkg/modules/chromium/events.go:531
↓ 1 callersFunctionwaitForEventNetworkIdle
waitForEventNetworkIdle registers a listener for the networkIdle lifecycle event and returns a waiter that blocks until the event fires or ctx is done
pkg/modules/chromium/events.go:507
↓ 1 callersFunctionwatermarkRoute
watermarkRoute returns an [api.Route] which can add watermarks to PDFs. nolint:dupl
pkg/modules/pdfengines/routes.go:1584
↓ 1 callersFunctionwebhookMiddleware
(w *Webhook)
pkg/modules/webhook/middleware.go:33
↓ 1 callersFunctionwriteBookmarksRoute
writeBookmarksRoute returns an [api.Route] which can write bookmarks into PDFs.
pkg/modules/pdfengines/routes.go:1442
↓ 1 callersFunctionwriteMetadataRoute
writeMetadataRoute returns an [api.Route] which can write metadata into PDFs.
pkg/modules/pdfengines/routes.go:1365
MethodActiveTasksCount
()
pkg/gotenberg/mocks.go:199
MethodActiveTasksCount
()
pkg/gotenberg/supervisor.go:628
MethodAddOptions
()
pkg/gotenberg/semconv/client.go:267
MethodAsyncCount
AsyncCount returns the number of asynchronous requests.
pkg/modules/webhook/webhook.go:103
FunctionBenchmarkHTTPServerRequest
BenchmarkHTTPServerRequest allows comparison between different version of the HTTP server. To use an alternative start this test with OTEL_SEMCONV_STA
pkg/gotenberg/semconv/bench_test.go:22
MethodChecks
()
pkg/modules/api/mocks.go:130
MethodChecks
Checks adds a health check that verifies if Chromium is healthy.
pkg/modules/chromium/chromium.go:787
MethodChecks
Checks adds a health check that verifies if LibreOffice is healthy.
pkg/modules/libreoffice/api/api.go:610
MethodChromium
()
pkg/modules/chromium/chromium.go:441
MethodChromium
Chromium returns an [Api] for interacting with Chromium for converting HTML documents to PDF.
pkg/modules/chromium/chromium.go:832
MethodConversionsSinceRestart
()
pkg/gotenberg/mocks.go:203
MethodConversionsSinceRestart
ConversionsSinceRestart returns the number of tasks handled since the last process (re)start. reqCounter is reset to zero on every restart and idle sh
pkg/gotenberg/supervisor.go:635
MethodConvert
(ctx context.Context, logger *slog.Logger, formats PdfFormats, inputPath, outputPath string)
pkg/gotenberg/mocks.go:79
MethodConvert
Convert is not available in this implementation.
pkg/modules/pdfcpu/pdfcpu.go:247
MethodConvert
Convert is not available in this implementation.
pkg/modules/exiftool/exiftool.go:286
MethodConvert
Convert is not available in this implementation.
pkg/modules/pdftk/pdftk.go:209
MethodConvert
Convert is not available in this implementation.
pkg/modules/qpdf/qpdf.go:245
MethodConvert
Convert transforms the given PDF to a specific PDF format using the first available engine that supports PDF conversion.
pkg/modules/pdfengines/multi.go:194
MethodConvert
Convert converts the given PDF to a specific PDF format. Currently, only the PDF/A-1b, PDF/A-2b, PDF/A-3b and PDF/UA formats are available. If another
pkg/modules/libreoffice/pdfengine/pdfengine.go:67
← previousnext →401–500 of 1,037, ranked by callers