go fmt and regenerating documentation

This commit is contained in:
Julien Neuhart
2020-06-08 09:44:37 +02:00
parent 7e76809860
commit 0b86d38517
2 changed files with 41 additions and 39 deletions

View File

@@ -167,14 +167,14 @@ $ make publish <span class="nv">GOTENBERG_USER_GID</span><span class="o">=</span
<p>You may also add it in your Docker Compose stack:</p> <p>You may also add it in your Docker Compose stack:</p>
<pre class="chroma"><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;3&#39;</span><span class="w"> <pre class="chroma"><span class="k">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;3&#39;</span><span class="w">
</span><span class="w"> </span><span class="w">
</span><span class="w"></span><span class="nt">services</span><span class="p">:</span><span class="w"> </span><span class="w"></span><span class="k">services</span><span class="p">:</span><span class="w">
</span><span class="w"> </span><span class="w">
</span><span class="w"> </span><span class="c"># your other services</span><span class="w"> </span><span class="w"> </span><span class="c"># your other services</span><span class="w">
</span><span class="w"> </span><span class="w">
</span><span class="w"> </span><span class="nt">gotenberg</span><span class="p">:</span><span class="w"> </span><span class="w"> </span><span class="k">gotenberg</span><span class="p">:</span><span class="w">
</span><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">thecodingmachine/gotenberg:6</span><span class="w"> </span><span class="w"> </span><span class="k">image</span><span class="p">:</span><span class="w"> </span>thecodingmachine/gotenberg<span class="p">:</span><span class="m">6</span><span class="w">
</span></pre> </span></pre>
<blockquote> <blockquote>
@@ -332,11 +332,13 @@ The hard limit is 100 MB and is defined by Google Chrome itself.</p>
See the <a href="#html.rpcc_buffer_size">rpcc buffer size section</a>.</p> See the <a href="#html.rpcc_buffer_size">rpcc buffer size section</a>.</p>
</blockquote> </blockquote>
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.ignore_certificate_errors" href="#environment_variables.ignore_certificate_errors"> <h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.google_chrome_ignore_certificate_errors" href="#environment_variables.google_chrome_ignore_certificate_errors">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
</a>Ignore certificate errors</h2> </a>Google Chrome ignore certificate errors</h2>
<p>By default the chrome instance will not accept certificate errors when using the URL print method. Setting this environment variable to <code>&#34;1&#34;</code> will allow insecure connections to be used. In dev environment for example. Be careful with this! Do not use in production.</p> <p>When performing a <a href="#url">URL</a> conversion, Google Chrome will not accept certificate errors .</p>
<p>You may allow insecure connections by setting <code>GOOGLE_CHROME_IGNORE_CERTIFICATE_ERRORS</code> variable to <code>&#34;1&#34;</code>. <strong>You should be careful with this feature and only enable it in your development environment.</strong></p>
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.disable_libre_office_unoconv" href="#environment_variables.disable_libre_office_unoconv"> <h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.disable_libre_office_unoconv" href="#environment_variables.disable_libre_office_unoconv">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
@@ -1706,14 +1708,14 @@ if the API is under heavy load.</p>
<p>For instance, using the following Docker Compose file:</p> <p>For instance, using the following Docker Compose file:</p>
<pre class="chroma"><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;3&#39;</span><span class="w"> <pre class="chroma"><span class="k">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;3&#39;</span><span class="w">
</span><span class="w"> </span><span class="w">
</span><span class="w"></span><span class="nt">services</span><span class="p">:</span><span class="w"> </span><span class="w"></span><span class="k">services</span><span class="p">:</span><span class="w">
</span><span class="w"> </span><span class="w">
</span><span class="w"> </span><span class="c"># your other services</span><span class="w"> </span><span class="w"> </span><span class="c"># your other services</span><span class="w">
</span><span class="w"> </span><span class="w">
</span><span class="w"> </span><span class="nt">gotenberg</span><span class="p">:</span><span class="w"> </span><span class="w"> </span><span class="k">gotenberg</span><span class="p">:</span><span class="w">
</span><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">thecodingmachine/gotenberg:6</span><span class="w"> </span><span class="w"> </span><span class="k">image</span><span class="p">:</span><span class="w"> </span>thecodingmachine/gotenberg<span class="p">:</span><span class="m">6</span><span class="w">
</span></pre> </span></pre>
<p>You may now launch your services using:</p> <p>You may now launch your services using:</p>

View File

@@ -40,46 +40,46 @@ const (
// DefaultGoogleChromeRpccBufferSizeEnvVar contains the name // DefaultGoogleChromeRpccBufferSizeEnvVar contains the name
// of the environment variable "DEFAULT_GOOGLE_CHROME_RPCC_BUFFER_SIZE". // of the environment variable "DEFAULT_GOOGLE_CHROME_RPCC_BUFFER_SIZE".
DefaultGoogleChromeRpccBufferSizeEnvVar string = "DEFAULT_GOOGLE_CHROME_RPCC_BUFFER_SIZE" DefaultGoogleChromeRpccBufferSizeEnvVar string = "DEFAULT_GOOGLE_CHROME_RPCC_BUFFER_SIZE"
// GoogleChromeIgnoreCertificateErrorsEnvVar contains the name // GoogleChromeIgnoreCertificateErrorsEnvVar contains the name
// of the environment variable "GOOGLE_CHROME_IGNORE_CERTIFICATE_ERRORS". // of the environment variable "GOOGLE_CHROME_IGNORE_CERTIFICATE_ERRORS".
GoogleChromeIgnoreCertificateErrorsEnvVar string = "GOOGLE_CHROME_IGNORE_CERTIFICATE_ERRORS" GoogleChromeIgnoreCertificateErrorsEnvVar string = "GOOGLE_CHROME_IGNORE_CERTIFICATE_ERRORS"
) )
// Config contains the application // Config contains the application
// configuration. // configuration.
type Config struct { type Config struct {
maximumWaitTimeout float64 maximumWaitTimeout float64
maximumWaitDelay float64 maximumWaitDelay float64
maximumWebhookURLTimeout float64 maximumWebhookURLTimeout float64
defaultWaitTimeout float64 defaultWaitTimeout float64
defaultWebhookURLTimeout float64 defaultWebhookURLTimeout float64
defaultListenPort int64 defaultListenPort int64
disableGoogleChrome bool disableGoogleChrome bool
disableUnoconv bool disableUnoconv bool
googleChromeIgnoreCertificateErrors bool googleChromeIgnoreCertificateErrors bool
logLevel xlog.Level logLevel xlog.Level
rootPath string rootPath string
maximumGoogleChromeRpccBufferSize int64 maximumGoogleChromeRpccBufferSize int64
defaultGoogleChromeRpccBufferSize int64 defaultGoogleChromeRpccBufferSize int64
} }
// DefaultConfig returns the default // DefaultConfig returns the default
// configuration. // configuration.
func DefaultConfig() Config { func DefaultConfig() Config {
return Config{ return Config{
maximumWaitTimeout: 30.0, maximumWaitTimeout: 30.0,
maximumWaitDelay: 10.0, maximumWaitDelay: 10.0,
maximumWebhookURLTimeout: 30.0, maximumWebhookURLTimeout: 30.0,
defaultWaitTimeout: 10.0, defaultWaitTimeout: 10.0,
defaultWebhookURLTimeout: 10.0, defaultWebhookURLTimeout: 10.0,
defaultListenPort: 3000, defaultListenPort: 3000,
disableGoogleChrome: false, disableGoogleChrome: false,
disableUnoconv: false, disableUnoconv: false,
logLevel: xlog.InfoLevel, logLevel: xlog.InfoLevel,
rootPath: "/", rootPath: "/",
maximumGoogleChromeRpccBufferSize: 104857600, // ~100 MB maximumGoogleChromeRpccBufferSize: 104857600, // ~100 MB
defaultGoogleChromeRpccBufferSize: 1048576, // 1 MB defaultGoogleChromeRpccBufferSize: 1048576, // 1 MB
googleChromeIgnoreCertificateErrors: false, googleChromeIgnoreCertificateErrors: false,
} }
} }