config

package
v0.0.0-...-c687c81 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 5 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 {
	Log          logger.LogConf `yaml:"log" mapstructure:"log"`
	HTTPAddr     string         `yaml:"http_listen" mapstructure:"http_listen"`
	Host         string         `yaml:"host" mapstructure:"http_host"`
	Port         string         `yaml:"port" mapstructure:"http_port"`
	IsPrettyJSON bool           `yaml:"isPrettyJSON" mapstructure:"isPrettyJSON"`
	DB           DBConf         `yaml:"db" mapstructure:"db"`
}

Config Структура файла с конфигурацией

func LoadConfig

func LoadConfig(filePath string) (*Config, error)

LoadConfig Загрузка конфигурации из файла

type DBConf

type DBConf struct {
	Name     string `yaml:"name" mapstructure:"name"`
	Host     string `yaml:"host" mapstructure:"host"`
	Port     string `yaml:"port" mapstructure:"port"`
	User     string `yaml:"user" mapstructure:"user"`
	Password string `yaml:"password" mapstructure:"password"`
	Database string `yaml:"database" mapstructure:"database"`
	SSL      string `yaml:"ssl" mapstructure:"ssl"`
}

DBConf .

Jump to

Keyboard shortcuts

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