Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGotHelp returned after showing requested help ErrGotHelp = errors.New("help printed") // ErrBadArgs returned after showing command args error message ErrBadArgs = errors.New("option error printed") )
Functions ¶
Types ¶
type Config ¶
type Config struct {
Addr string `long:"addr" default:"localhost:7070" description:"Listen address"`
MetricAddr string `long:"metric_addr" default:"localhost:8080" description:"prometheus service host:port"`
MetricURL string `long:"metric_url" default:"/metrics" description:"prometheus service URL"`
LogLevel string `long:"log_level" default:"debug" description:"Log level"`
API api.Config `group:"API Options" namespace:"api"`
DB DBConfig `group:"DB Options" namespace:"db"`
}
Config holds all config vars
type DBConfig ¶
type DBConfig struct {
Addr string `long:"addr" default:"localhost:5432" description:"host:port"`
Driver string `long:"driver" default:"postgres" description:"DB driver"`
User string `long:"user" description:"User name"`
Password string `long:"password" description:"User password"`
Database string `long:"name" description:"Database name"`
Options string `long:"opts" default:"sslmode=disable" description:"Database connect options"`
}
DBConfig holds cli part of pg.Options
Click to show internal directories.
Click to hide internal directories.