Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Listen = func(srv *http.Server, cert, key string) (err error) {
return srv.ListenAndServeTLS(cert, key)
}
Listen function that runs sever, could be overloaded by testing needs.
Functions ¶
func Default ¶
func Default() http.HandlerFunc
func Mast ¶
func Mast() http.HandlerFunc
Mast is like a telegraph mast that receives messages from telegram and responds back.
func Reload ¶
func Reload() http.HandlerFunc
Types ¶
type Command ¶
type Command struct {
common.Auth `group:"auth" description:"authentication related options"`
Port int `short:"p" long:"port" default:"8443" env:"DNQ_SERVER_PORT" description:"server port"`
Address string `short:"H" long:"host" default:"0.0.0.0" env:"DNQ_SERVER_HOST" description:"server address"`
Config flags.Filename `short:"c" long:"config" env:"DNQ_CONFIG" default:"config.yaml" description:"configuration file"`
// TSL options
Cert string `long:"cert" env:"DNQ_SERVER_CERT" default:"resources/server.pem" description:"server.{pem,crt} file"`
Key string `long:"key" env:"DNQ_SERVER_KEY" default:"resources/server.key" description:"server.key file"`
// contains filtered or unexported fields
}
Command +
Click to show internal directories.
Click to hide internal directories.