config

package
v0.0.0-...-4cd7a92 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 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 Configuration

type Configuration struct {
	BindAddr                string        `envconfig:"BIND_ADDR"`
	GracefulShutdownTimeout time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	Host                    string        `envconfig:"HOST_NAME"`
	MongoConfig             *MongoConfig
}

Configuration structure which hold information for configuring the datasetAPI

func Get

func Get() (*Configuration, error)

Get the application and returns the configuration structure

func (Configuration) String

func (config Configuration) String() string

String is implemented to prevent sensitive fields being logged. The config is returned as JSON with sensitive fields omitted.

type MongoConfig

type MongoConfig struct {
	BindAddr   string `envconfig:"MONGO_ADDR"`
	Collection string `envconfig:"MONGO_COLLECTION"`
	Database   string `envconfig:"MONGO_DATABASE"`
}

MongoConfig structure which contains information to access mongo datastore

Jump to

Keyboard shortcuts

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