config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 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 App added in v0.0.2

type App struct {
	TimeZone string `mapstructure:"TIME_ZONE"`
}

APP -.

type Config

type Config struct {
	App  `mapstructure:",squash"`
	HTTP `mapstructure:",squash"`
	PG   `mapstructure:",squash"`
}

Config -.

func Load

func Load() (*Config, error)

type HTTP

type HTTP struct {
	Mode           string        `mapstructure:"GIN_MODE"`
	Port           string        `mapstructure:"HTTP_PORT" validate:"required"`
	ReadTimeout    time.Duration `mapstructure:"HTTP_READ_TIMEOUT"`
	WriteTimeout   time.Duration `mapstructure:"HTTP_WRITE_TIMEOUT"`
	MaxHeaderBytes int           `mapstructure:"HTTP_MAX_HEADER_BYTES"`
}

HTTP -.

type PG

type PG struct {
	URL     string `mapstructure:"PG_URL" validate:"required"`
	PoolMax int    `mapstructure:"PG_POOL_MAX"`
}

PG -.

Jump to

Keyboard shortcuts

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