Documentation
¶
Index ¶
Constants ¶
View Source
const ( NotFoundRedirect = NotFoundResponseKind(iota) NotFoundPage )
View Source
const DefaultPort = 80
View Source
const DefaultTLSPort = 443
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(config Config) http.HandlerFunc
func HandlerWithOnNotFound ¶ added in v0.0.6
func HandlerWithOnNotFound(config Config, onNotFound func(string) NotFoundResponse) http.HandlerFunc
Types ¶
type Config ¶
type Config struct { Address string Port uint StaticFilesPath string ServerName string CertFilePath string KeyFilePath string EnableHttpToHttps bool EnableGzip bool }
func CommandLineConfig ¶
func DefaultConfig ¶
func DefaultConfig() Config
func FileConfig ¶
type NotFoundResponse ¶ added in v0.0.6
type NotFoundResponse struct { Kind NotFoundResponseKind RedirectURL string }
type NotFoundResponseKind ¶ added in v0.0.6
type NotFoundResponseKind int
Click to show internal directories.
Click to hide internal directories.