config

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	BindAddr                   string `envconfig:"BIND_ADDR"`
	HealthCheckCriticalTimeout time.Duration
	HealthCheckInterval        time.Duration
	MongoConfig                MongoConfig
}

func Get

func Get() (*Configuration, error)

Get configures the application and returns the configuration

type MongoConfig

type MongoConfig struct {
	BindAddr          string `envconfig:"MONGODB_BIND_ADDR"   json:"-"`
	Database          string `envconfig:"MONGODB_DATABASE"`
	BooksCollection   string `envconfig:"MONGODB_BOOKS_COLLECTION"`
	ReviewsCollection string `envconfig:"MONGODB_REVIEWS_COLLECTION"`
}

Jump to

Keyboard shortcuts

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