config

package
v0.0.0-...-4d35d9b Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(config *Config)

Types

type Config

type Config struct {
	Bind         string `toml:"bind"`
	HostProtocol string `toml:"protocol"`
	Sessionkey   string `toml:"session_key"`

	TemplatePath string `toml:"template_path"`
	StaticPath   string `toml:"static_path"`

	DbConfig struct {
		DbConnStr  string `toml:"db_conn_str"`
		DbMinCount int    `toml:"db_min_count"`
		DbMaxCount int    `toml:"db_max_count"`
	} `toml:"db"`

	HttpConfig struct {
		Enable bool   `toml:"enable"`
		Bind   string `toml:"bind"`
	} `toml:"http"`

	SiteConfig struct {
		DefaultSiteName string `toml:"default_site_name"`
	} `toml:"site"`

	DbObjConfig struct {
		DbConnStr  string `toml:"db_conn_str"`
		DbMinCount int    `toml:"db_min_count"`
		DbMaxCount int    `toml:"db_max_count"`
	} `toml:"db_obj"`
}

func GlobalConfig

func GlobalConfig() *Config

func Load

func Load(path string) *Config

Jump to

Keyboard shortcuts

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