config

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 8 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 {
	Debug    bool   `yaml:"debug"`
	Bind     string `yaml:"bind"`
	Admin    string `yaml:"admin"`
	Password string `yaml:"password"`
	BaseURL  string `yaml:"base_url"`

	Db Db
}

Config save config

func Load

func Load() *Config

Load config from config.yml

type Db

type Db struct {
	Type     string `yaml:"type"`
	Path     string `yaml:"path"`
	Addr     string `yaml:"addr"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	DbName   string `yaml:"db_name"`
	MaxConns int    `yaml:"max_conns"`
	MaxIdles int    `yaml:"max_idles"`
	ConnLife int    `yaml:"conn_life"`
}

Db saves db config

Jump to

Keyboard shortcuts

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