Discover Packages
github.com/CodeMaster482/ShortLinkAPI
config
package
Version:
v0.0.0-...-e10dee8
Opens a new window with list of versions in this module.
Published: Apr 9, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type App struct {
Name string `env-required:"true" yaml:"name" env:"APP_NAME"`
Version string `env-required:"true" yaml:"version" env:"APP_VERSION"`
}
type Config struct {
App `yaml:"app"`
HTTP `yaml:"http"`
GRPC `yaml:"grpc"`
Log `yaml:"log"`
PG `yaml:"postgres"`
Service `yaml:"service"`
LinkGen `yaml:"generator"`
Redis `yaml:"redis"`
UseRedis bool
}
type GRPC struct {
Port string `env-required:"true" yaml:"port" env:"GRPC_PORT"`
}
type HTTP struct {
Port string `env-required:"true" yaml:"port" env:"HTTP_PORT"`
WriteTimeout time .Duration `env-required:"true" yaml:"write_timeout" env:"WRITE_TIMEOUT"`
ReadTimeout time .Duration `env-required:"true" yaml:"read_timeout" env:"READ_TIMEOUT"`
}
type LinkGen struct {
Alphabet string `yaml:"alphabet"`
Length int `yaml:"length"`
}
type Log struct {
Level string `yaml:"log_level"`
}
type PG struct {
Name string `env:"DB_NAME"`
User string `env:"DB_USER"`
Port int `env:"DB_PORT"`
Password string `env:"DB_PASSWORD"`
Host string `env:"DB_HOST"`
PoolMax int `yaml:"pool_max"`
}
type Redis struct {
Port string `env:"REDIS_PORT"`
Host string `env:"REDIS_HOST"`
}
type Service struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
RecalculationInterval int `yaml:"interval"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.