MCPcopy Index your code

hub / github.com/gotenberg/gotenberg / functions

Functions1,037 in github.com/gotenberg/gotenberg

↓ 269 callersMethodString
String binds a form field to a string variable. var foo string ctx.FormData().String("foo", &foo, "bar")
pkg/modules/api/formdata.go:72
↓ 225 callersMethodError
Error returns the message.
pkg/modules/api/errors.go:27
↓ 141 callersMethodRun
Run executes a provided task while managing the state of the [Process]. Run manages the request queue and may restart the process if it is not health
pkg/gotenberg/supervisor.go:73
↓ 109 callersMethodBool
Bool binds a form field to a bool variable. It populates an error if the value is not bool. var foo bool ctx.FormData().Bool("foo", &foo, true)
pkg/modules/api/formdata.go:92
↓ 95 callersMethodStart
()
pkg/gotenberg/modules.go:65
↓ 87 callersMethodGet
Get returns the value stored in the detached store, not the embedded context's pooled store.
pkg/modules/webhook/pool_safe_context.go:45
↓ 87 callersMethodIs
(err error)
pkg/modules/api/errors.go:43
↓ 85 callersMethodClose
Close closes the stream, discard any temporary backing storage.
pkg/modules/chromium/stream.go:75
↓ 83 callersMethodAdd
(s string)
pkg/gotenberg/internal/log/color.go:23
↓ 73 callersFunctionTracer
Tracer returns a [trace.Tracer] with the instrumentation name and version already set.
pkg/gotenberg/telemetry.go:191
↓ 61 callersMethodDuration
Duration binds a form field to a time.Duration variable. It populates an error if the form field is not time.Duration. var foo time.Duration ctx.F
pkg/modules/api/formdata.go:152
↓ 47 callersMethodLog
Log returns the context [slog.Logger].
pkg/modules/api/context.go:622
↓ 44 callersFunctionNewSentinelHttpError
NewSentinelHttpError creates a [SentinelHttpError]. The message will be sent as the response's body if returned from a handler, so make sure to not le
pkg/modules/api/errors.go:19
↓ 44 callersFunctionWrapError
WrapError wraps the given error with a [SentinelHttpError]. The wrapped error will be displayed in a log, while the [SentinelHttpError] will be sent i
pkg/modules/api/errors.go:64
↓ 37 callersMethodSet
Set writes to the detached store, not the embedded context's pooled store. This prevents downstream middleware writes from leaking into a later reques
pkg/modules/webhook/pool_safe_context.go:54
↓ 34 callersMethodMustBool
MustBool returns the boolean value of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:63
↓ 32 callersMethodCustom
Custom helps to define a custom binding function for a form field. var foo map[string]string ctx.FormData().Custom("foo", func(value string) error
pkg/modules/api/formdata.go:270
↓ 29 callersMethodInt
Int binds a form field to an int variable. It populates an error if the value is not int. var foo int ctx.FormData().Int("foo", &foo, 2)
pkg/modules/api/formdata.go:112
↓ 28 callersMethodStop
(ctx context.Context)
pkg/gotenberg/modules.go:69
↓ 27 callersMethodExec
Exec executes the command and waits for its completion or until the context is done. In any case, it kills the unix process and all its children. Whe
pkg/gotenberg/cmd.go:107
↓ 25 callersFunctionCommandContext
CommandContext creates a [Cmd] with a context. It configures the internal [exec.Cmd] of [Cmd] so that we may kill its unix process and all its childre
pkg/gotenberg/cmd.go:49
↓ 25 callersMethodRequest
Request returns the [http.Request].
pkg/modules/api/context.go:524
↓ 23 callersMethodValidate
()
pkg/gotenberg/modules.go:59
↓ 22 callersFunctionNewProcessSupervisor
NewProcessSupervisor initializes a new [ProcessSupervisor]. engine names the managed process (for example "chromium" or "libreoffice") and prefixes th
pkg/gotenberg/supervisor.go:143
↓ 20 callersMethodDescriptor
()
pkg/gotenberg/modules.go:32
↓ 20 callersFunctionWithDenyPrivateIPs
WithDenyPrivateIPs rejects URLs whose host resolves to a non-public IP address (loopback, RFC1918, link-local, unique-local, multicast, unspecified).
pkg/gotenberg/outbound.go:205
↓ 19 callersMethodMustStringSlice
MustStringSlice returns the string slice value of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:41
↓ 18 callersMethodMandatoryPaths
MandatoryPaths binds the absolute paths of form data files, according to a list of file extensions, to a string slice variable. It populates an error
pkg/modules/api/formdata.go:438
↓ 18 callersMethodWait
Wait waits for the command to complete. It should be called when using the Start method so that the command does not leak zombies.
pkg/gotenberg/cmd.go:90
↓ 18 callersMethodspanAttrs
spanAttrs returns the client-span attributes for a qpdf invocation: the server address and the qpdf version, plus any extra attributes. The version ri
pkg/modules/qpdf/qpdf.go:113
↓ 17 callersMethodPrintf
Printf logs a debug message.
pkg/modules/chromium/debug.go:24
↓ 17 callersFunctionnewPinningProxy
newPinningProxy returns a pinning proxy configured with the given allow/deny lists and IP-class policy. The policy bools are applied via [gotenberg.De
pkg/modules/chromium/pinning_proxy.go:60
↓ 16 callersMethodAddr
Addr returns the host:port the proxy listens on.
pkg/modules/libreoffice/api/proxy.go:79
↓ 16 callersMethodFormData
FormData return a [FormData].
pkg/modules/api/context.go:529
↓ 16 callersMethodHealthy
Healthy checks the health of the process. It returns true if the process is healthy; otherwise, it returns false.
pkg/gotenberg/supervisor.go:42
↓ 16 callersMethodWrite
Write logs the bytes in a debug message.
pkg/modules/chromium/debug.go:17
↓ 15 callersMethodAddOutputPaths
AddOutputPaths adds the given paths. Those paths will be used later to build the output file.
pkg/modules/api/context.go:605
↓ 15 callersMethodError
Error logs a message at the error level using the wrapped slog.Logger.
pkg/gotenberg/telemetry.go:231
↓ 15 callersMethodMustString
MustString returns the string value of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:19
↓ 14 callersMethodMustDuration
MustDuration returns the time.Duration value of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:151
↓ 14 callersMethodReqQueueSize
ReqQueueSize returns the current size of the request queue.
pkg/gotenberg/supervisor.go:76
↓ 14 callersMethodspanAttrs
spanAttrs returns the client-span attributes for a pdfcpu invocation: the server address and the pdfcpu version, plus any extra attributes. The versio
pkg/modules/pdfcpu/pdfcpu.go:121
↓ 14 callersMethodspanAttrs
spanAttrs returns the client-span attributes for an ExifTool invocation: the server address and the ExifTool version, plus any extra attributes. The v
pkg/modules/exiftool/exiftool.go:233
↓ 14 callersMethodspanAttrs
spanAttrs returns the client-span attributes for a PDFtk invocation: the server address and the PDFtk version, plus any extra attributes. The version
pkg/modules/pdftk/pdftk.go:105
↓ 13 callersFunctionMustRegisterModule
MustRegisterModule registers a module. To register a module, create an init() method in the module main go file: func init() { gotenberg.MustRegi
pkg/gotenberg/modules.go:99
↓ 13 callersMethodRename
Rename uses the same signature as [os.Rename].
pkg/gotenberg/fs.go:29
↓ 13 callersFunctionbuildExifToolWriteArgs
buildExifToolWriteArgs builds the variadic argv tail for exiftool -overwrite_original <args> <path> from a user-supplied metadata map. Dangerous ps
pkg/modules/exiftool/exiftool.go:108
↓ 12 callersMethodMustRegexpSlice
MustRegexpSlice returns a slice of compiled regular expressions from a string-slice flag given by name. Empty strings are skipped. It panics if an err
pkg/gotenberg/flags.go:229
↓ 12 callersFunctionSplitHostPort
SplitHostPort splits a network address hostport of the form "host", "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", "[host]:port",
pkg/gotenberg/semconv/util.go:27
↓ 12 callersMethodStatus
Status returns a span status code and message for an HTTP status code value returned by a server.
pkg/gotenberg/semconv/server.go:68
↓ 12 callersMethodappend
append adds an error to the list of errors.
pkg/modules/api/formdata.go:559
↓ 12 callersFunctionrunWithFallbackVoid
runWithFallbackVoid adapts [runWithFallback] for operations that return no value beyond an error.
pkg/modules/pdfengines/multi.go:143
↓ 12 callersFunctionwithStubResolver
(t *testing.T, fn func(host string) ([]netip.Addr, error))
pkg/gotenberg/outbound_test.go:108
↓ 11 callersFunctionDecideOutbound
DecideOutbound parses rawURL, runs the regex allow/deny lists against the normalized form, and (when no allow-list match) resolves the host and applie
pkg/gotenberg/outbound.go:254
↓ 11 callersMethodMkdirAll
MkdirAll uses the same signature as [os.MkdirAll].
pkg/gotenberg/fs.go:15
↓ 11 callersMethodModules
Modules return the list of modules which satisfies the requested interface. func (m *YourModule) Provision(ctx *gotenberg.Context) error { mods, _
pkg/gotenberg/context.go:73
↓ 11 callersMethodOriginalFilename
OriginalFilename returns the original filename associated with a disk path. If no mapping exists, it falls back to [filepath.Base].
pkg/modules/api/context.go:546
↓ 11 callersFunctionexecCommandInIntegrationToolsContainer
(ctx context.Context, cmd []string, path string)
test/integration/scenario/containers.go:166
↓ 11 callersFunctionmustAddrs
(t *testing.T, ss ...string)
pkg/gotenberg/outbound_test.go:115
↓ 11 callersFunctionmustParseURL
(t *testing.T, raw string)
pkg/modules/chromium/pinning_proxy_test.go:57
↓ 11 callersFunctionrunWithFallback
runWithFallback runs op against each engine in order and returns the first success. It wraps the attempts in a pdfengines span, records the winning en
pkg/modules/pdfengines/multi.go:85
↓ 10 callersFunctionWithDenyPublicIPs
WithDenyPublicIPs rejects URLs whose host resolves to a public IP address. Use it on air-gapped or data-governed deployments where Gotenberg must only
pkg/gotenberg/outbound.go:216
↓ 9 callersMethodFloat64
Float64 binds a form field to a float64 variable. It populates an error if the value is not float64. var foo float64 ctx.FormData().Float64("foo",
pkg/modules/api/formdata.go:132
↓ 9 callersMethodLen
()
pkg/gotenberg/sort.go:28
↓ 9 callersMethodShutdown
Shutdown stops the managed [Process].
pkg/gotenberg/supervisor.go:57
↓ 9 callersFunctionassertContains
(t *testing.T, haystack, needle string)
pkg/modules/qpdf/facturx_test.go:244
↓ 9 callersFunctiontestLogger
()
pkg/modules/chromium/pinning_proxy_test.go:53
↓ 8 callersFunctionFormDataPdfFacturX
FormDataPdfFacturX extracts the Factur-X parameters and the invoice XML path from form data. Factur-X is requested when both facturxConformanceLevel a
pkg/modules/pdfengines/routes.go:474
↓ 8 callersFunctionFormDataPdfFormats
FormDataPdfFormats creates [gotenberg.PdfFormats] from the form data. Fallback to the default value if the considered key is not present.
pkg/modules/pdfengines/routes.go:90
↓ 8 callersMethodGeneratePath
GeneratePath generates a path within the context's working directory. It generates a new UUID-based filename. It does not create a file.
pkg/modules/api/context.go:566
↓ 8 callersMethodMustInt64
MustInt64 returns the int64 value of a flag given by name. It panics if an error occurs.
pkg/gotenberg/flags.go:85
↓ 8 callersMethodParsedFlags
ParsedFlags returns the parsed flags. func (m *YourModule) Provision(ctx *gotenberg.Context) error { flags := ctx.ParsedFlags() m.foo = flags.Re
pkg/gotenberg/context.go:35
↓ 8 callersMethodRestartsCount
RestartsCount returns the current number of restart.
pkg/gotenberg/supervisor.go:79
↓ 8 callersMethodURL
URL returns the proxy URL suitable for Chromium's --proxy-server flag. Returns an empty string when the proxy is not listening.
pkg/modules/chromium/pinning_proxy.go:143
↓ 8 callersMethodWithContext
WithContext returns a new [LeveledLogger] with the given context.
pkg/gotenberg/telemetry.go:223
↓ 8 callersMethodmustValue
mustValue binds the target interface with a form field. If the value is empty or the "key" does not exist, it binds the default value. Currently, only
pkg/modules/api/formdata.go:566
↓ 8 callersFunctionnewProxyForTest
newProxyForTest returns a pinning proxy whose decide and dial functions are set to test stubs. The proxy is started on a loopback ephemeral port and s
pkg/modules/chromium/pinning_proxy_test.go:92
↓ 7 callersFunctionBuildVersion
BuildVersion returns the build-time version captured for the module with the given ID. The boolean is false when no version was captured, which is the
pkg/gotenberg/buildversions.go:25
↓ 7 callersFunctionConvertStub
ConvertStub transforms a given PDF to the specified formats defined in [gotenberg.PdfFormats]. If no format, it does nothing and returns the input pat
pkg/modules/pdfengines/routes.go:350
↓ 7 callersFunctionEnsureStampFile
EnsureStampFile validates that, when stamp.Source is image or pdf, an uploaded stamp file was supplied, and replaces stamp.Expression with uploadedFil
pkg/modules/pdfengines/routes.go:840
↓ 7 callersFunctionEnsureWatermarkFile
EnsureWatermarkFile mirrors [EnsureStampFile] for a watermark. The shape is identical: image or pdf sources must be accompanied by an uploaded file, a
pkg/modules/pdfengines/routes.go:861
↓ 7 callersFunctionFilterOutboundURL
FilterOutboundURL validates that rawURL is acceptable for an outbound request from Gotenberg. It is the URL-aware replacement for [FilterDeadline] and
pkg/gotenberg/outbound.go:347
↓ 7 callersFunctionFormDataPdfEmbeds
FormDataPdfEmbeds extracts embedded file paths from form data. Only files uploaded with the "embeds" field name are included.
pkg/modules/pdfengines/routes.go:440
↓ 7 callersFunctionFormDataPdfEmbedsMetadata
FormDataPdfEmbedsMetadata extracts embeds metadata from form data. The "embedsMetadata" field is a JSON string keyed by filename.
pkg/modules/pdfengines/routes.go:448
↓ 7 callersFunctionFormDataPdfEncrypt
FormDataPdfEncrypt extracts the encryption parameters and permissions from form data. Permissions default to allowed.
pkg/modules/pdfengines/routes.go:672
↓ 7 callersFunctionFormDataPdfMetadata
FormDataPdfMetadata creates metadata object from the form data.
pkg/modules/pdfengines/routes.go:107
↓ 7 callersFunctionFormDataPdfRotate
FormDataPdfRotate creates rotation parameters from the form data.
pkg/modules/pdfengines/routes.go:172
↓ 7 callersFunctionFormDataPdfStamp
FormDataPdfStamp creates a [gotenberg.Stamp] for stamping from the form data.
pkg/modules/pdfengines/routes.go:759
↓ 7 callersFunctionFormDataPdfStampFile
FormDataPdfStampFile extracts the stamp file path from form data.
pkg/modules/pdfengines/routes.go:828
↓ 7 callersFunctionFormDataPdfWatermark
FormDataPdfWatermark creates a [gotenberg.Stamp] for watermarking from the form data.
pkg/modules/pdfengines/routes.go:754
↓ 7 callersFunctionFormDataPdfWatermarkFile
FormDataPdfWatermarkFile extracts the watermark file path from form data.
pkg/modules/pdfengines/routes.go:821
↓ 7 callersMethodInches
Inches bind a form field to a float64 variable. It populates an error if the value cannot be computed back to inches. var foo float64 ctx.FormData
pkg/modules/api/formdata.go:173
↓ 7 callersMethodMandatoryCustom
MandatoryCustom helps to define a custom binding function for a form field. It populates an error if the value is empty or the "key" does not exist.
pkg/modules/api/formdata.go:297
↓ 7 callersMethodSplit
Split splits a given PDF file.
pkg/gotenberg/pdfengine.go:272
↓ 7 callersFunctioninjectFacturXIntoXMP
injectFacturXIntoXMP splices the fx rdf:Description and the PDF/A extension-schema declaration into an XMP packet. It returns the new packet and wheth
pkg/modules/qpdf/qpdf.go:972
↓ 6 callersFunctionApplyFacturXStub
ApplyFacturXStub turns each input PDF into a Factur-X document: it embeds the CII invoice XML under the canonical name with AFRelationship "Alternativ
pkg/modules/pdfengines/routes.go:599
↓ 6 callersMethodConversionsSinceRestart
ConversionsSinceRestart returns the number of tasks handled since the last process (re)start.
pkg/gotenberg/supervisor.go:86
↓ 6 callersFunctionDefaultPdfOptions
DefaultPdfOptions returns the default values for PdfOptions.
pkg/modules/chromium/chromium.go:312
↓ 6 callersFunctionEmbedFilesMetadataStub
EmbedFilesMetadataStub sets metadata on embedded files in PDFs.
pkg/modules/pdfengines/routes.go:455
↓ 6 callersFunctionFacturXPdfFormats
FacturXPdfFormats returns the PDF/A formats to convert to so the output meets Factur-X's PDF/A-3 requirement. It returns pdfFormats unchanged when Fac
pkg/modules/pdfengines/routes.go:568
next →1–100 of 1,037, ranked by callers