config

package
v0.0.0-...-c97fb91 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// Debug mode useful to print .
	Debug bool

	// HTTPAddress to receive incoming HTTP requests.
	HTTPAddress string

	// HTTPCertFile path to a TLS certificate. Set this to listen for HTTPS requests.
	HTTPCertFile string

	// HTTPKeyFile path to a certificate key. Set this to listen for HTTPS requests.
	HTTPKeyFile string

	// SQLDataSourceName for the PostgreSQL database.
	SQLDataSourceName string

	// RedisAddress for the key-value storage.
	RedisAddress string

	// RedisUsername for the key-value storage.
	RedisUsername string

	// RedisPassword for the key-value storage.
	RedisPassword string

	// ElasticsearchHost for the search engine.
	ElasticsearchHost string

	// ElasticsearchUsername for the search engine.
	ElasticsearchUsername string

	// ElasticsearchPassword for the search engine.
	ElasticsearchPassword string

	// ElasticsearchAPIKey for the search engine.
	ElasticsearchAPIKey string

	// FileStorageHost to a storage service such as AWS S3, MinIO, or Google Storage.
	FileStorageHost string

	// FileStorageKey of the storage service.
	FileStorageAPIKey string

	// FileStorageSecret of the storage service.
	FileStorageSecret string

	// HTTPInspectionAddress for Go pprof and expvar. Only accessible on localhost.
	HTTPInspectionAddress string

	// StaticDirectory where regular files are stored.
	// TODO(henvic): Embed files in the binary (see https://github.com/golang/go/issues/35950).
	StaticDirectory string

	// TemplatesDirectory where HTML templates are stored.
	TemplatesDirectory string

	// ThumbnailServiceHost for the imaginary microservice.
	ThumbnailServiceHost string
}

Settings loaded from the configuration file.

func ReadFile

func ReadFile(path string) (s Settings, err error)

ReadFile loads the settings from a configuration file.

Jump to

Keyboard shortcuts

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