config

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config provides configuration for the application.

This package is stateful, as it derives configuration from the environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbDSN

func DbDSN() string

DbDSN is deprecated. Use Get() to retrieve the typed configuration option.

func DbMaxConnections

func DbMaxConnections() int

DbMaxConnections is deprecated. Use Get() to retrieve the typed configuration option.

Types

type Config added in v0.6.0

type Config struct {
	DB *DB

	// TestLoad is used during development to enable load testing.
	TestLoad bool `mapstructure:"test_load"`
}

Config is the top level aggregator for all configurations.

func Get added in v0.6.0

func Get() *Config

Get retrieves the singleton Config of this application.

You may store references to this config, but you shall not modify it.

type DB added in v0.6.0

type DB struct {
	DSN            string `mapstructure:"dsn"`
	MaxConnections int    `mapstructure:"max_connections"`
}

Jump to

Keyboard shortcuts

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