configuration

package
v0.0.0-...-2b1d2f2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindStructKeys

func BindStructKeys(input interface{}) error

BindStructKeys TODO: delete this when this PR is merged: https://github.com/spf13/viper/pull/1429 Here we do a simplified version of that PR so we can read in config from the environmental variables

Types

type Configuration

type Configuration struct {
	Tz                      string        `env:"TZ" default:"UTC"`
	DatabaseUrl             string        `env:"DATABASE_URL"`
	DatabaseMaxConnection   int32         `env:"DATABASE_MAX_CONNECTIONS" default:"6"`
	DatabaseMinConnection   int32         `env:"DATABASE_MIN_CONNECTIONS" default:"3"`
	DatabaseMaxConnIdleTime time.Duration `env:"DATABASE_MAX_CONN_IDLE_TIME" default:"5m"`
}

Configuration Do not put structs in here until TODO below is completed

func NewConfig

func NewConfig() *Configuration

func (*Configuration) LoadConfig

func (c *Configuration) LoadConfig() error

Jump to

Keyboard shortcuts

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