config

package
v0.0.0-...-d6efe1e Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 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 APIConfig

type APIConfig struct {
	Version string

	Web struct {
		ReadTimeout     time.Duration `default:"5s"`
		WriteTimeout    time.Duration `default:"10s"`
		IdleTimeout     time.Duration `default:"120s"`
		ShutdownTimeout time.Duration `default:"20s"`
		APIHost         string        `default:"0.0.0.0:8000" envconfig:"API_HOST"`
		DebugHost       string        `default:"0.0.0.0:4000"`
	}

	Db struct {
		ConnectionURI string `envconfig:"DB_CONNECTION_URI" required:"true"`
	}
}

func New

func New() (*APIConfig, error)

Returns parsed config

Jump to

Keyboard shortcuts

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