env

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AthensMaxConcurrency

func AthensMaxConcurrency() int

AthensMaxConcurrency retrieves maximal level of concurrency based on ATHENS_MAX_CONCURRENCY. Defaults to number of cores if env is not set.

func CDNEndpointWithDefault

func CDNEndpointWithDefault(value *url.URL) *url.URL

CDNEndpointWithDefault returns CDN endpoint if set if not it should default to clouds default blob storage endpoint e.g

func CloudRuntime

func CloudRuntime() string

CloudRuntime returns the Cloud Provider underneath which the Proxy/Registry is running.

func DiskRoot

func DiskRoot() (string, error)

DiskRoot returns Athens Mongo Disk Root folder defined by ATHENS_DISK_STORAGE_ROOT

func EnableCSRFProtection

func EnableCSRFProtection() bool

EnableCSRFProtection determines whether to enable CSRF protection

func GcpBucketName

func GcpBucketName() (string, error)

GcpBucketName returns Google Cloud Storage bucket name defined by ATHENS_STORAGE_GCP_BUCKET

func GoBinPath

func GoBinPath() string

GoBinPath returns the path to the go binary to use, defined by GO_BINARY_PATH. This value can be a name on the PATH, or the full path

func GoEnvironmentWithDefault

func GoEnvironmentWithDefault(value string) string

GoEnvironmentWithDefault returns environment used. Supported values are: 'development' and 'production'

func GoPath

func GoPath() (string, error)

GoPath returns gopath defined by env variable GOPATH.

func IncludeExcludeFileName

func IncludeExcludeFileName() string

IncludeExcludeFileName specifies file name for include exclude filter If no filename is specified it fallbacks to 'filter.conf'

func LogLevel

func LogLevel() string

LogLevel returns the system's exposure to internal logs. Defaults to debug.

func MinioAccessKeyID

func MinioAccessKeyID() (string, error)

MinioAccessKeyID returns Minio access key ID defined by ATHENS_MINIO_ACCESS_KEY_ID.

func MinioBucketNameWithDefault

func MinioBucketNameWithDefault(value string) string

MinioBucketNameWithDefault returns bucket name used with Minio. Defined by ATHENS_MINIO_BUCKET_NAME.

func MinioEndpoint

func MinioEndpoint() (string, error)

MinioEndpoint returns Minio endpoing URI defined by ATHENS_MINIO_ENDPOINT.

func MinioSSLWithDefault

func MinioSSLWithDefault(value string) string

MinioSSLWithDefault returns flag whether or not SSL should be used with Minio. Defined by ATHENS_MINIO_USE_SSL.

func MinioSecretAccessKey

func MinioSecretAccessKey() (string, error)

MinioSecretAccessKey returns Minio secret access key defined by ATHENS_MINIO_SECRET_ACCESS_KEY.

func MongoConnectionTimeoutWithDefault

func MongoConnectionTimeoutWithDefault(value string) string

MongoConnectionTimeoutWithDefault returns Athens Mongo Storage connection timeout defined by MONGO_CONN_TIMEOUT_SEC. Values are in seconds.

func MongoHost

func MongoHost() (string, error)

MongoHost returns Athens Mongo host defined by MONGO_HOST

func MongoPassword

func MongoPassword() (string, error)

MongoPassword returns Athens Mongo Storage user password defined by MONGO_PASSWORD

func MongoPort

func MongoPort() (string, error)

MongoPort returns Athens Mongo port defined by MONGO_PORT

func MongoSSLWithDefault

func MongoSSLWithDefault(value string) string

MongoSSLWithDefault returns Athens Mongo Storage SSL flag defined by MONGO_SSL. Defines whether or not SSL should be used.

func MongoURI

func MongoURI() (string, error)

MongoURI returns Athens Mongo Storage URI defined by ATHENS_MONGO_STORAGE_URL

func MongoUser

func MongoUser() (string, error)

MongoUser returns Athens Mongo Storage user defined by MONGO_USER

func OlympusGlobalEndpointWithDefault

func OlympusGlobalEndpointWithDefault(value string) string

OlympusGlobalEndpointWithDefault returns Olympus global endpoint defined by OLYMPUS_GLOBAL_ENDPOINT.

func OlympusRedisQueuePortWithDefault

func OlympusRedisQueuePortWithDefault(value string) string

OlympusRedisQueuePortWithDefault returns Redis queue port used by workers defined by ATHENS_REDIS_QUEUE_PORT. Standard port is 6379

func Port

func Port(value string) string

Port returns the PORT env var that a server (Olympus/Zeus) should run on. Buffalo uses the PORT environment so this keeps it consistent but can also be used directly as a Buffalo service option

func RdbmsName

func RdbmsName() (string, error)

RdbmsName returns RDBMS storage name defined by ATHENS_RDBMS_STORAGE_NAME

func RedisQueuePortWithDefault

func RedisQueuePortWithDefault(value string) string

RedisQueuePortWithDefault returns Redis queue port used by workers defined by ATHENS_REDIS_QUEUE_PORT. Standard port is 6379

func StorageType

func StorageType() (string, error)

StorageType returns storage type used by Athens with error if env is not set. Possible values are memory, disk, mongo, postgres, sqlite, cockroach, mysql

func StorageTypeWithDefault

func StorageTypeWithDefault(value string) string

StorageTypeWithDefault returns storage type used by Athens with default value if env is not set. Possible values are memory, disk, mongo, postgres, sqlite, cockroach, mysql

func Timeout

func Timeout() time.Duration

Timeout is timeout for external network calls

func WorkerMaxFails

func WorkerMaxFails() uint

WorkerMaxFails retrieves maximal level of concurrency based on ATHENS_WORKER_MAX_FAILS. Defaults to 5.

Types

This section is empty.

Jump to

Keyboard shortcuts

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