configs

package
v0.0.0-...-8fcb6f2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configs

type Configs struct {
	WebPort  int `env:"WEB_PORT"`
	RestPort int `env:"REST_PORT"`
	Database DbConfig
	Redis    RedisCfg
}

func NewConfigs

func NewConfigs() *Configs

type DbConfig

type DbConfig struct {
	Host          string `env:"DB_HOST"`
	User          string `env:"DB_USER"`
	Password      string `env:"DB_PASSWORD"`
	DBName        string `env:"DB_NAME"`
	Port          int    `env:"DB_PORT"`
	SSLMode       string `env:"DB_SSL_MODE"`
	MigrationPath string `env:"DB_MIGRATIONS_PATH"`
}

func (*DbConfig) GetDbSource

func (pc *DbConfig) GetDbSource() string

func (*DbConfig) GetDns

func (pc *DbConfig) GetDns() string
type NavConfig struct {
	Layout        string   `yaml:"layout"`
	NavPath       string   `yaml:"nav_path"`
	ErrorFilePath string   `yaml:"error_file_path"`
	FilePath      string   `yaml:"file_path"`
	Pages         []string `yaml:"pages"`
}

func NewNavConfig

func NewNavConfig() *NavConfig

type RedisCfg

type RedisCfg struct {
	HOST     string `env:"REDIS_HOST"`
	PORT     int    `env:"REDIS_PORT"`
	PASSWORD string `env:"REDIS_PASSWORD"`
	DB       int    `env:"REDIS_DB"`
}

func (*RedisCfg) GetAddr

func (r *RedisCfg) GetAddr() string

type WebCfg

type WebCfg struct {
	NavCfg *NavConfig
}

func NewWebCfg

func NewWebCfg() *WebCfg

Jump to

Keyboard shortcuts

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