conf

package
v0.0.0-...-5a98790 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package conf gathers all configuration data.

Index

Constants

View Source
const (
	// MaximumWaitTimeoutEnvVar contains the name
	// of the environment variable "MAXIMUM_WAIT_TIMEOUT".
	MaximumWaitTimeoutEnvVar string = "MAXIMUM_WAIT_TIMEOUT"
	// MaximumWaitDelayEnvVar contains the name
	// of the environment variable "MAXIMUM_WAIT_DELAY".
	MaximumWaitDelayEnvVar string = "MAXIMUM_WAIT_DELAY"
	// MaximumWebhookURLTimeoutEnvVar contains the name
	// of the environment variable "MAXIMUM_WEBHOOK_URL_TIMEOUT".
	MaximumWebhookURLTimeoutEnvVar string = "MAXIMUM_WEBHOOK_URL_TIMEOUT"
	// DefaultWaitTimeoutEnvVar contains the name
	// of the environment variable "DEFAULT_WAIT_TIMEOUT".
	DefaultWaitTimeoutEnvVar string = "DEFAULT_WAIT_TIMEOUT"
	// DefaultWebhookURLTimeoutEnvVar contains the name
	// of the environment variable "DEFAULT_WEBHOOK_URL_TIMEOUT".
	DefaultWebhookURLTimeoutEnvVar string = "DEFAULT_WEBHOOK_URL_TIMEOUT"
	// DefaultListenPortEnvVar contains the name
	// of the environment variable "DEFAULT_LISTEN_PORT".
	DefaultListenPortEnvVar string = "DEFAULT_LISTEN_PORT"
	// DisableGoogleChromeEnvVar contains the name
	// of the environment variable "DISABLE_GOOGLE_CHROME".
	DisableGoogleChromeEnvVar string = "DISABLE_GOOGLE_CHROME"
	// DisableUnoconvEnvVar contains the name
	// of the environment variable "DISABLE_UNOCONV".
	DisableUnoconvEnvVar string = "DISABLE_UNOCONV"
	// LogLevelEnvVar contains the name
	// of the environment variable "LOG_LEVEL".
	LogLevelEnvVar string = "LOG_LEVEL"
	// RootPathEnvVar contains the name
	// of the environment variable "ROOT_PATH".
	RootPathEnvVar string = "ROOT_PATH"
	// DefaultGoogleChromeRpccBufferSizeEnvVar contains the name
	// of the environment variable "DEFAULT_GOOGLE_CHROME_RPCC_BUFFER_SIZE".
	DefaultGoogleChromeRpccBufferSizeEnvVar string = "DEFAULT_GOOGLE_CHROME_RPCC_BUFFER_SIZE"
	// GoogleChromeIgnoreCertificateErrorsEnvVar contains the name
	// of the environment variable "GOOGLE_CHROME_IGNORE_CERTIFICATE_ERRORS".
	GoogleChromeIgnoreCertificateErrorsEnvVar string = "GOOGLE_CHROME_IGNORE_CERTIFICATE_ERRORS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config contains the application configuration.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration.

func FromEnv

func FromEnv() (Config, error)

FromEnv returns a Conf according to environment variables.

func (Config) DefaultGoogleChromeRpccBufferSize

func (c Config) DefaultGoogleChromeRpccBufferSize() int64

DefaultGoogleChromeRpccBufferSize returns the default

Google Chrome rpcc buffer size from the configuration.

func (Config) DefaultListenPort

func (c Config) DefaultListenPort() int64

DefaultListenPort returns the default listen port from the configuration.

func (Config) DefaultWaitTimeout

func (c Config) DefaultWaitTimeout() float64

DefaultWaitTimeout returns the default wait timeout from the configuration.

func (Config) DefaultWebhookURLTimeout

func (c Config) DefaultWebhookURLTimeout() float64

DefaultWebhookURLTimeout returns the default webhook URL wait timeout from the configuration.

func (Config) DisableGoogleChrome

func (c Config) DisableGoogleChrome() bool

DisableGoogleChrome returns true if Google Chrome is disabled in the configuration.

func (Config) DisableUnoconv

func (c Config) DisableUnoconv() bool

DisableUnoconv returns true if Unoconv is disabled in the configuration.

func (Config) GoogleChromeIgnoreCertificateErrors

func (c Config) GoogleChromeIgnoreCertificateErrors() bool

func (Config) LogLevel

func (c Config) LogLevel() xlog.Level

LogLevel returns the xlog.Level from the configuration.

func (Config) MaximumGoogleChromeRpccBufferSize

func (c Config) MaximumGoogleChromeRpccBufferSize() int64

MaximumGoogleChromeRpccBufferSize returns the maximum Google Chrome rpcc buffer size from the configuration.

func (Config) MaximumWaitDelay

func (c Config) MaximumWaitDelay() float64

MaximumWaitDelay returns the maximum wait timeout from the configuration.

func (Config) MaximumWaitTimeout

func (c Config) MaximumWaitTimeout() float64

MaximumWaitTimeout returns the maximum wait timeout from the configuration.

func (Config) MaximumWebhookURLTimeout

func (c Config) MaximumWebhookURLTimeout() float64

MaximumWebhookURLTimeout returns the maximum webhook URL wait timeout from the configuration.

func (Config) RootPath

func (c Config) RootPath() string

RootPath returns the rooth path from the configuration.

Jump to

Keyboard shortcuts

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