config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 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 Config

type Config struct {
	AppName                  string        `envconfig:"X_APP_NAME" required:"true"`
	AppVersion               string        `envconfig:"X_APP_VERSION" required:"true"`
	Env                      string        `envconfig:"X_ENV" required:"true"`
	AppPort                  int           `envconfig:"X_APP_PORT" default:"8080"`
	LogLevel                 string        `envconfig:"X_LOG_LEVEL" default:"info"`
	ReadTimeout              time.Duration `envconfig:"X_READ_TIMEOUT" default:"5s"`
	WriteTimeout             time.Duration `envconfig:"X_WRITE_TIMEOUT" default:"5s"`
	IdleTimeout              time.Duration `envconfig:"X_IDLE_TIMEOUT" default:"5s"`
	GracefullShutdownTimeout time.Duration `envconfig:"X_GRACEFULL_SHUTDOWN_TIMEOUT" default:"10s"`
}

func NewConfig

func NewConfig() (Config, error)

func NewTestConfig

func NewTestConfig() Config

Jump to

Keyboard shortcuts

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