conf

package
v0.0.0-...-d08230c Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: Apache-2.0 Imports: 1 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 {
	FomoApi struct {
		Host string `json:"host,omitempty"`
	}
	Log struct {
		Level  string `json:"level,omitempty"`
		Path   string `json:"path,omitempty"`
		Name   string `json:"file,omitempty"`
		Format string `json:"format,omitempty"`
	}
	Server struct {
		Addr         string        `json:"addr,omitempty"`
		WriteTimeout time.Duration `json:"writeTimeout,omitempty"`
		ReadTimeout  time.Duration `json:"readTimeout,omitempty"`
		IdleTimeout  time.Duration `json:"idleTimeout,omitempty"`
	}
	Pprof struct {
		Enable bool   `json:"enable,omitempty"`
		Host   string `json:"host,omitempty"`
	}
	DBs map[string]DBConf `json:"dbs,omitempty"`
}
var Cfg *Config

type DBConf

type DBConf struct {
	DriverName   string `json:"drivername,omitempty"`
	DataSource   string `json:"datasource,omitempty"`
	MaxIdleConns int    `json:"maxidleconns,omitempty"`
	MaxOpenConns int    `json:"maxopenconns,omitempty"`
	Enable       bool   `json:"enable,omitempty"`
}

type Version

type Version struct {
	Version   string `json:"Version,omitempty"`
	Commit    string `json:"Commit,omitempty"`
	Branch    string `json:"Branch,omitempty"`
	CompileAt string `json:"CompileAt,omitempty"`
}

Jump to

Keyboard shortcuts

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