rest_config

package
v0.0.0-...-972b0a0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 1 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 {
	Env    string `env:"ENV"`
	Db     DbConfig
	Server ServerConfig
	Redis  RedisConfig
}

type DbConfig

type DbConfig struct {
	Driver string `env:"DB_DRIVER"`
	Url    string `env:"DB_URL"`
}

type RedisConfig

type RedisConfig struct {
	Address  string        `env:"REDIS_ADDRESS"`
	Password string        `env:"REDIS_PASSWORD"`
	DB       int           `env:"REDIS_DB"`
	Timeout  time.Duration `env:"REDIS_PING_TIMEOUT"`
}

type ServerConfig

type ServerConfig struct {
	Address     string        `env:"SERVER_ADDRESS"`
	Timeout     time.Duration `env:"SERVER_TIMEOUT"`
	IdleTimeout time.Duration `env:"SERVER_IDLE_TIMEOUT"`
}

Jump to

Keyboard shortcuts

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