config

package
v0.0.0-...-b7d53eb Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ENV = struct {
	Host string `env:"OPV_HOST" envDefault:"127.0.0.1"`

	DBDriver             string        `env:"OPV_DB_DRIVER" envDefault:"sqlite3"`
	DBSetupRetryAttempts uint          `env:"OPV_DB_SETUP_RETRY_ATTEMPTS" envDefault:"9"`
	DBSetupRetryDelay    time.Duration `env:"OPV_DB_SETUP_RETRY_DELAY" envDefault:"100ms"`
	DBConnectionStr      string        `env:"OPV_DB_CONNECTION_STR" envDefault:"file:memdb1?mode=memory&cache=shared&_fk=1"`

	PrometheusEnabled bool `env:"OPV_PROMETHEUS_ENABLED" envDefault:"true"`

	GracefullyShutdownTimeout time.Duration `env:"OPV_GRACEFULLY_SHUTDOWN_TIMEOUT" envDefault:"3s"`

	EncryptorName          string   `env:"OPV_ENCRYPTOR_NAME" envDefault:"secretbox"`
	EncryptorSecretboxKeys []string `env:"OPV_ENCRYPTOR_SECRETBOX_KEYS" envDefault:"please_change_to_random_32bytes,old_key_rotation_32bytes" envSeparator:","`

	// HasherName represents the hashing algorithm to be used
	// Supported algorithms: scrypt, keccak256
	HasherName    string `env:"OPV_HASHER_NAME" envDefault:"keccak256"`
	HasherScryptN int    `env:"OPV_HASHER_SCRYPT_N" envDefault:"32768"`

	ControlPlanePort                   int      `env:"OPV_CONTROL_PLANE_PORT" envDefault:"27999"`
	ControlPlaneCORSEnabled            bool     `env:"OPV_CONTROL_PLANE_CORS_ENABLED" envDefault:"true"`
	ControlPlaneSwaggerHostOverride    string   `env:"OPV_CONTROL_PLANE_SWAGGER_HOST_OVERRIDE" envDefault:""`
	ControlPlaneSwaggerSchemesOverride []string `env:"OPV_CONTROL_PLANE_SWAGGER_SCHEMES_OVERRIDE" envDefault:"http,https" envSeparator:","`

	DataPlanePort                   int      `env:"OPV_DATA_PLANE_PORT" envDefault:"28000"`
	DataPlaneCORSEnabled            bool     `env:"OPV_DATA_PLANE_CORS_ENABLED" envDefault:"true"`
	DataPlaneSwaggerHostOverride    string   `env:"OPV_DATA_PLANE_SWAGGER_HOST_OVERRIDE" envDefault:""`
	DataPlaneSwaggerSchemesOverride []string `env:"OPV_DATA_PLANE_SWAGGER_SCHEMES_OVERRIDE" envDefault:"http,https" envSeparator:","`

	AuthzCasbinAutoloadInterval time.Duration `env:"OPV_AUTHZ_CASBIN_AUTOLOAD_INTERVAL" envDefault:"3s"`

	ProxyPlaneHTTPPort            int    `env:"OPV_PROXY_PLANE_HTTP_PORT" envDefault:"28001"`
	ProxyPlaneHTTPConfig          string `env:"OPV_PROXY_PLANE_HTTP_CONFIG" envDefault:"./cmd/proxyplane/opv-proxyplane-http.example.json"`
	ProxyPlaneDefaultDPBaseURL    string `env:"OPV_PROXY_PLANE_DEFAULT_DP_BASE_URL" envDefault:"http://127.0.0.1:28000"`
	ProxyPlaneDefaultDPGrantToken string `env:"OPV_PROXY_PLANE_DEFAULT_DP_GRANT_TOKEN" envDefault:""`
}{}

ENV is the whole configuration of the app

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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