Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type WebServer ¶
type WebServer interface { // SetPorts sets the ports for the server. SetPorts(httpPort, httpsPort int) WebServer // SetMetricsEnabled enables Prometheus metrics export. SetMetricsEnabled(enabled bool) WebServer // SetServePath specifies the path to serve the file system. SetServePath(fileSystemServePath string, metricsServePath string) WebServer // SetPath sets the directory to serve. SetPath(path string) error // SetCertificateFile sets the certificates that should be used to serve HTTPS traffic. SetCertificateFile(certificateFilePath string) WebServer // SetPrivateKey sets the private key file path for HTTPS traffic encryption. SetPrivateKey(privateKeyFilePath string) WebServer // SetVerbose sets verbose logging. SetVerbose(verbose bool) WebServer // SetUpload sets the upload endpoint and upload directory. SetUpload(uploadPath string, uploadServePath string) error // Serve starts serving the HTTP/HTTPS server synchronously. Serve(<-chan error) error }
WebServer is a convience wrapper for Go's HTTP/HTTPS Web serving API.
Click to show internal directories.
Click to hide internal directories.