MCPcopy Index your code

hub / github.com/gotenberg/gotenberg / functions

Functions1,037 in github.com/gotenberg/gotenberg

↓ 6 callersMethodMustInt
MustInt returns the int value of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:107
↓ 6 callersMethodRequestTraceAttrs
RequestTraceAttrs returns trace attributes for an HTTP request received by a server. The server must be the primary server name if it is known. For e
pkg/gotenberg/semconv/server.go:97
↓ 6 callersFunctionValidateFacturXCompat
ValidateFacturXCompat enforces the Factur-X pairing and PDF/A-3 rules. It returns a 400 error when the request is half-specified, or when an explicit
pkg/modules/pdfengines/routes.go:534
↓ 6 callersMethodWarn
Warn logs a message at the warning level using the wrapped slog.Logger.
pkg/gotenberg/telemetry.go:236
↓ 6 callersFunctiondetachAsyncContext
detachAsyncContext detaches ctx from the inbound request lifecycle so the webhook goroutine survives echo recycling the request, while preserving the
pkg/modules/webhook/async_context.go:30
↓ 6 callersFunctionisClientCancellation
isClientCancellation reports whether err originates from the client (for example Chromium) closing the connection or letting the request deadline pass
pkg/modules/chromium/pinning_proxy.go:361
↓ 6 callersMethodmustMandatoryField
mustMandatoryField binds the target interface with a form field. It populates an error if the value is empty or the "key" does not exist. Currently, o
pkg/modules/api/formdata.go:595
↓ 6 callersMethodonResponseReceived
onResponseReceived records the response origin and remembers the URL for the request id, so a later loading-finished event can attribute its bytes.
pkg/modules/chromium/network_aggregate.go:50
↓ 6 callersMethodsnapshot
()
pkg/modules/chromium/pinning_proxy_test.go:45
↓ 6 callersFunctionstartProxy
(t *testing.T, opts outboundProxyOptions)
pkg/modules/libreoffice/api/proxy_test.go:36
↓ 5 callersFunctionEmbedFilesStub
EmbedFilesStub embeds files into PDF files.
pkg/modules/pdfengines/routes.go:717
↓ 5 callersFunctionEncryptPdfStub
EncryptPdfStub adds password protection and permission restrictions to PDF files. It does nothing when no password is provided.
pkg/modules/pdfengines/routes.go:701
↓ 5 callersFunctionFormDataPdfSplitMode
FormDataPdfSplitMode creates a [gotenberg.SplitMode] from the form data.
pkg/modules/pdfengines/routes.go:21
↓ 5 callersMethodHttpError
()
pkg/modules/api/errors.go:7
↓ 5 callersMethodMandatoryPath
MandatoryPath binds the absolute path of a form data file to a string variable. It populates an error if the file does not exist. var path string
pkg/modules/api/formdata.go:330
↓ 5 callersMethodModule
Module returns a module which satisfies the requested interface. func (m *YourModule) Provision(ctx *gotenberg.Context) error { mod, _ := ctx.Modu
pkg/gotenberg/context.go:48
↓ 5 callersFunctionNewContext
NewContext creates a [Context]. In a module, prefer the [Provisioner] interface to get a [Context].
pkg/gotenberg/context.go:18
↓ 5 callersFunctionNewFileSystem
NewFileSystem initializes a new [FileSystem] instance with a unique working directory.
pkg/gotenberg/fs.go:50
↓ 5 callersFunctionRotateStub
RotateStub rotates pages of PDF files. If angle is 0, it does nothing.
pkg/modules/pdfengines/routes.go:206
↓ 5 callersFunctionSpanErrorType
SpanErrorType records errorType as the semconv error.type attribute on span. It is a no-op when errorType is empty.
pkg/gotenberg/errortype.go:47
↓ 5 callersFunctionStampStub
StampStub applies a stamp to a list of PDF files. If the stamp has no source, it does nothing.
pkg/modules/pdfengines/routes.go:897
↓ 5 callersFunctionWatermarkStub
WatermarkStub applies a watermark to a list of PDF files. If the stamp has no source, it does nothing.
pkg/modules/pdfengines/routes.go:880
↓ 5 callersFunctionWriteMetadataStub
WriteMetadataStub writes the metadata into PDF files. If no metadata, it does nothing.
pkg/modules/pdfengines/routes.go:371
↓ 5 callersFunctionhandleErr
(err error)
pkg/gotenberg/semconv/util.go:113
↓ 5 callersFunctionnewFallbackRecorder
(t *testing.T)
pkg/modules/pdfengines/fallback_test.go:17
↓ 5 callersFunctionnewNetworkAggregate
()
pkg/modules/chromium/network_aggregate.go:41
↓ 5 callersFunctionnewTestSpanRecorder
(t *testing.T)
pkg/gotenberg/cmd_test.go:15
↓ 5 callersFunctionparsePdfObjects
parsePdfObjects parses QPDF JSON v2 output and returns the objects map.
pkg/modules/qpdf/qpdf.go:486
↓ 5 callersFunctionpatchFilespecMetadata
patchFilespecMetadata walks QPDF objects to find Filespecs matching the metadata keys. It sets /AFRelationship and /Subtype on matching objects and re
pkg/modules/qpdf/qpdf.go:509
↓ 5 callersFunctionsetStreamSubtype
setStreamSubtype finds a stream object by reference and sets the /Subtype key in its dict.
pkg/modules/qpdf/qpdf.go:656
↓ 5 callersFunctionshouldCheckResourceHttpStatusCode
(rawURL string, ignoreDomains []string)
pkg/modules/chromium/events.go:289
↓ 4 callersFunctionDebug
Debug returns the debug data.
pkg/gotenberg/debug.go:57
↓ 4 callersMethodDirPath
DirPath returns the path to the request's working directory.
pkg/modules/api/context.go:560
↓ 4 callersFunctionFlattenStub
FlattenStub merges annotation appearances with page content for each given PDF, effectively deleting the original annotations.
pkg/modules/pdfengines/routes.go:336
↓ 4 callersMethodKill
Kill kills the unix process and all its children without creating orphans. See https://medium.com/@felixge/killing-a-child-process-and-all-of-its-chi
pkg/gotenberg/cmd.go:246
↓ 4 callersMethodMerge
Merge combines multiple PDFs into a single PDF. The resulting page order is determined by the order of files provided in inputPaths.
pkg/gotenberg/pdfengine.go:269
↓ 4 callersFunctionMeter
Meter returns a [metric.Meter] with the instrumentation name and version already set.
pkg/gotenberg/telemetry.go:200
↓ 4 callersMethodMustDeprecatedBool
MustDeprecatedBool returns the boolean value of a deprecated flag if it was explicitly set or the int value of the new flag. It panics if an error occ
pkg/gotenberg/flags.go:75
↓ 4 callersMethodMustDeprecatedString
MustDeprecatedString returns the string value of a deprecated flag if it was explicitly set or the string value of the new flag. It panics if an error
pkg/gotenberg/flags.go:31
↓ 4 callersMethodMustHumanReadableBytes
MustHumanReadableBytes returns the human-readable bytes string of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:174
↓ 4 callersFunctionNewHTTPClient
(meter metric.Meter)
pkg/gotenberg/semconv/client.go:32
↓ 4 callersFunctionNewHTTPServer
(meter metric.Meter)
pkg/gotenberg/semconv/server.go:45
↓ 4 callersMethodRestricted
Restricted reports whether at least one permission is denied.
pkg/gotenberg/pdfengine.go:175
↓ 4 callersFunctionStringEnv
StringEnv retrieves the value of the environment variable named by the key. If the variable is present in the environment and not empty, the value is
pkg/gotenberg/env.go:12
↓ 4 callersFunctionValidatePdfEncryptCompat
ValidatePdfEncryptCompat returns a 400 error when permission restrictions are requested without a password to anchor them.
pkg/modules/pdfengines/routes.go:688
↓ 4 callersFunctionValidatePdfFormatsCompat
ValidatePdfFormatsCompat checks for incompatible combinations of PDF formats with other features and returns an appropriate error if found.
pkg/modules/pdfengines/routes.go:223
↓ 4 callersFunctionbuildResource
buildResource assembles the OpenTelemetry resource shared by the tracer, meter, and logger providers. Detection is best-effort: a detector or merge fa
pkg/gotenberg/internal/otel/otel.go:27
↓ 4 callersFunctionconversionInputAttrs
conversionInputAttrs derives low-cardinality input attributes for a conversion span: the number of received files (when ctx is an [api.Context]) and t
pkg/modules/chromium/chromium.go:1056
↓ 4 callersFunctionfindFallbackSpan
(recorder *tracetest.SpanRecorder, name string)
pkg/modules/pdfengines/fallback_test.go:27
↓ 4 callersFunctionhardTimeoutMiddleware
hardTimeoutMiddleware manages hard timeout scenarios, i.e., when a route handler fails to timeout as expected.
pkg/modules/api/middlewares.go:398
↓ 4 callersFunctionnetProtocol
(proto string)
pkg/gotenberg/semconv/util.go:86
↓ 4 callersMethodonLoadingFinished
onLoadingFinished records a successfully completed request and its size, tracking the single heaviest resource.
pkg/modules/chromium/network_aggregate.go:68
↓ 4 callersFunctionpatchCatalogAF
patchCatalogAF ensures the Catalog /AF array references all filespec objects.
pkg/modules/qpdf/qpdf.go:573
↓ 4 callersFunctionrequiredHTTPPort
(https bool, port int)
pkg/gotenberg/semconv/util.go:59
↓ 4 callersMethodrunWithDeadline
(ctx context.Context, task func() error)
pkg/gotenberg/supervisor.go:604
↓ 4 callersFunctionsanitizeFilename
sanitizeFilename strips path separators (including backslashes, which [filepath.Base] ignores on Linux) and control characters from a caller-supplied
pkg/modules/api/context.go:692
↓ 4 callersMethodsnapshot
()
pkg/modules/chromium/network_aggregate.go:99
↓ 4 callersFunctionxmlEscape
xmlEscape escapes a string for safe inclusion in XML character data.
pkg/modules/qpdf/qpdf.go:1088
↓ 3 callersMethodBuildOutputFile
BuildOutputFile builds the output file according to the output paths registered in the context. If many output paths, an archive is created.
pkg/modules/api/context.go:628
↓ 3 callersFunctionCapAttr
CapAttr truncates s to at most [maxAttrRunes] runes, appending an ellipsis when it shortens the value. It is multibyte-safe.
pkg/gotenberg/attrs.go:14
↓ 3 callersFunctionClassifyError
ClassifyError maps err to a bounded, engine-agnostic error.type value. It recognizes the failure modes shared by every engine: deadline, cancellation,
pkg/gotenberg/errortype.go:28
↓ 3 callersMethodContent
Content binds the content of a form data file to a string variable. var content string ctx.FormData().Content("foo.txt", &content, "bar")
pkg/modules/api/formdata.go:339
↓ 3 callersMethodCreateSubDirectory
CreateSubDirectory creates a subdirectory within the context's working directory.
pkg/modules/api/context.go:583
↓ 3 callersFunctionDefaultOptions
DefaultOptions returns the default values for Options.
pkg/modules/chromium/chromium.go:222
↓ 3 callersFunctionDialPinned
DialPinned dials each addr in turn until one connects, returning the first successful connection or the last error. Callers pass the Pinned slice from
pkg/gotenberg/outbound.go:441
↓ 3 callersMethodEmbedFiles
EmbedFiles embeds files into a PDF. All files are embedded as file attachments without modifying the main PDF content. TODO: attachments instead? Rena
pkg/gotenberg/pdfengine.go:309
↓ 3 callersMethodEnabled
(ctx context.Context, level slog.Level)
pkg/gotenberg/internal/log/handler.go:111
↓ 3 callersMethodError
()
pkg/gotenberg/semconv/httpconvtest_test.go:453
↓ 3 callersMethodFileCount
FileCount returns the number of files received in the request.
pkg/modules/api/context.go:540
↓ 3 callersFunctionFormDataChromiumPdfOptions
FormDataChromiumPdfOptions creates [PdfOptions] from the form data. Fallback to the default value if the considered key is not present.
pkg/modules/chromium/routes.go:281
↓ 3 callersFunctionFormDataChromiumScreenshotOptions
FormDataChromiumScreenshotOptions creates [ScreenshotOptions] from the form data. Fallback to the default value if the considered key is not present.
pkg/modules/chromium/routes.go:339
↓ 3 callersFunctionGarbageCollect
GarbageCollect scans the root path and deletes files or directories with names containing specific substrings and before a given expiration time.
pkg/gotenberg/gc.go:15
↓ 3 callersMethodGeneratePathFromFilename
GeneratePathFromFilename generates a path within the context's working directory. It uses a UUID-based name on disk to avoid filesystem NAME_MAX limit
pkg/modules/api/context.go:574
↓ 3 callersMethodHandle
(ctx context.Context, r slog.Record)
pkg/gotenberg/internal/log/handler.go:120
↓ 3 callersMethodLaunch
Launch starts the managed [Process].
pkg/gotenberg/supervisor.go:54
↓ 3 callersFunctionLogger
Logger returns the global logger.
pkg/gotenberg/telemetry.go:179
↓ 3 callersMethodMandatoryString
MandatoryString binds a form field to a string variable. It populates an error if the value is empty or the "key" does not exist. var foo string c
pkg/modules/api/formdata.go:82
↓ 3 callersMethodMetricAttributes
(server string, req *http.Request, statusCode int, route string, additionalAttributes []attribute.KeyValue)
pkg/gotenberg/semconv/server.go:348
↓ 3 callersMethodMustDeprecatedRegexpSlice
MustDeprecatedRegexpSlice returns the slice of compiled regular expressions of a deprecated flag if it was explicitly set or the slice of the new flag
pkg/gotenberg/flags.go:247
↓ 3 callersMethodMustFloat64
MustFloat64 returns the float value of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:129
↓ 3 callersMethodMustRegexp
MustRegexp returns the regular expression of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:206
↓ 3 callersMethodNewDirPath
NewDirPath generates a new unique path for a directory inside the working directory.
pkg/gotenberg/fs.go:70
↓ 3 callersFunctionNewOutboundHttpClient
NewOutboundHttpClient returns an [http.Client] that validates every outbound request URL via the same logic as [FilterOutboundURL] and pins the result
pkg/gotenberg/outbound.go:392
↓ 3 callersMethodOutputFilename
OutputFilename returns the filename based on the given output path or the "Gotenberg-Output-Filename" header's value.
pkg/modules/api/context.go:677
↓ 3 callersFunctionParseError
ParseError parses an error and returns the corresponding HTTP status and HTTP message.
pkg/modules/api/middlewares.go:38
↓ 3 callersMethodReadBookmarks
ReadBookmarks reads the document outline (bookmarks) of a PDF file.
pkg/gotenberg/pdfengine.go:294
↓ 3 callersMethodRecordMetrics
(ctx context.Context, md ServerMetricData)
pkg/gotenberg/semconv/server.go:270
↓ 3 callersFunctionRedactURL
RedactURL parses raw and returns a redacted, length-capped form safe to use as a span attribute or event value. Userinfo, query, and fragment are drop
pkg/gotenberg/attrs.go:26
↓ 3 callersFunctionResolveAndCheckPublic
ResolveAndCheckPublic resolves host and rejects any resolved address that fails [IsPublicIP] with [ErrNonPublicIP]. It is the strict equivalent of [De
pkg/gotenberg/outbound.go:117
↓ 3 callersMethodResponseTraceAttrs
ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. If any of the fields in the ResponseTelemetry are not set the attrib
pkg/gotenberg/semconv/server.go:309
↓ 3 callersMethodRoute
Route returns the attribute for the route.
pkg/gotenberg/semconv/server.go:344
↓ 3 callersFunctionSplitPdfStub
SplitPdfStub splits a list of PDF files based on [gotenberg.SplitMode]. It returns a list of output paths or the list of provided input paths if no sp
pkg/modules/pdfengines/routes.go:279
↓ 3 callersMethodStamp
Stamp applies a stamp (on top of page content) to a PDF file.
pkg/gotenberg/pdfengine.go:321
↓ 3 callersMethodStart
Start initiates the process and returns an error if the process cannot be started.
pkg/gotenberg/supervisor.go:34
↓ 3 callersMethodStop
Stop terminates the process and returns an error if the process cannot be stopped.
pkg/gotenberg/supervisor.go:38
↓ 3 callersMethodWatermark
Watermark applies a watermark (behind page content) to a PDF file.
pkg/gotenberg/pdfengine.go:318
↓ 3 callersMethodWriteBookmarks
WriteBookmarks adds a document outline (bookmarks) to a PDF file. The bookmarks parameter represents the hierarchical tree of the outline.
pkg/gotenberg/pdfengine.go:298
↓ 3 callersFunctionchromiumErrorType
chromiumErrorType maps a conversion error to chromium's bounded reason value, reused as the span error.type. queueReason preserves the historical, rou
pkg/modules/chromium/chromium.go:1078
↓ 3 callersFunctioncontainerHttpEndpoint
(ctx context.Context, container testcontainers.Container, port string)
test/integration/scenario/containers.go:211
↓ 3 callersFunctionconvertUrl
(ctx *api.Context, chromium Api, engine gotenberg.PdfEngine, url string, options PdfOptions, mode gotenberg.Sp
pkg/modules/chromium/routes.go:784
← previousnext →101–200 of 1,037, ranked by callers