Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// name for the service. Will be used in the admin panel
Name string
// Routing configuration. You can use the supplied router or
// return your own handler.
Routing func(*httprouter.Router) http.Handler
// Extra admin handlers to register on the admin page
AdminHandlers []admin.RouteConfig
}
type HTTPOptions ¶
type HTTPOptions struct {
Address string `long:"http-address" default:":3080" description:"Address to listen on."`
TLSKeyFile string `long:"http-tls-key" description:"Private key file to enable SSL support."`
TLSCertFile string `long:"http-tls-cert" description:"Certificate file to enable SSL support."`
BasicAuthUsername string `long:"http-admin-username" default:"admin" description:"Basic auth username for admin panel."`
BasicAuthPassword string `long:"http-admin-password" default:"bingo" description:"Basic auth password for admin panel."`
AccessLog string `long:"http-access-log" description:"Write http access log to a file. Defaults to stdout."`
}
func (HTTPOptions) Serve ¶
func (opts HTTPOptions) Serve(config Config)
Click to show internal directories.
Click to hide internal directories.