config

package
v0.0.0-...-911e263 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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 AdminConfig

type AdminConfig struct {
	UserName  string `toml:"user_name"`
	LastName  string `toml:"last_name"`
	FirstName string `toml:"first_name"`
	Password  string `toml:"password"`
}

type Config

type Config struct {
	DB      DBConfig      `toml:"database"`
	Admin   AdminConfig   `toml:"admin"`
	General GeneralConfig `toml:"general"`
	Logger  LoggerConfig  `toml:"logger"`
	Rooting RootingConfig `toml:"rooting"`
}

func NewConfig

func NewConfig() (*Config, error)

type DBConfig

type DBConfig struct {
	DataBase string `toml:"data_base"`
	FileName string `toml:"file_name"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	Name     string `toml:"name"`
	Debug    int    `toml:"debug"`
}

type GeneralConfig

type GeneralConfig struct {
	Debug       int    `toml:"debug"`
	LogFileName string `toml:"log_file_name"`
}

type LoggerConfig

type LoggerConfig struct {
	FileName   string `toml:"file_name"`
	MaxSize    int    `toml:"max_size"`
	MaxBackups int    `toml:"max_backups"`
	MaxAge     int    `toml:"max_age"`
}

type RootingConfig

type RootingConfig struct {
	Port int `toml:"port"`
}

Jump to

Keyboard shortcuts

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