Versions in this module Expand all Collapse all v0 v0.1.0 Apr 30, 2023 Changes in this version + type Backend struct + FileExt string + Location string + Name string + Script string + Type string + type Cert struct + CertFile string + KeyFile string + type CgiError struct + ExitCode int + func (e CgiError) Error() string + type CgiResponse struct + func (resp *CgiResponse) Backend() string + func (resp *CgiResponse) Close() + func (resp *CgiResponse) Init(req *Request) (err error) + func (resp *CgiResponse) Read(p []byte) (n int, err error) + type Config struct + Backends []Backend + Certs []Cert + CgiTimeout int + ContentType ContentTypeConfig + ListenAddr string + MatchOptions MatchOptionsConfig + Routes []Route + func LoadConfig(configFilePath string) (config Config, err error) + func (cfg *Config) GetBackendByName(name string) *Backend + func (cfg *Config) GetBackendByUrl(u url.URL) (backend *Backend, unmatched string) + type ContentTypeConfig struct + Default string + ExtMap map[string]string + type ErrorResponse struct + Meta string + StatusCode int + func (resp *ErrorResponse) Backend() string + func (resp *ErrorResponse) Close() + func (resp *ErrorResponse) Init(req *Request) (err error) + func (resp *ErrorResponse) Read(p []byte) (n int, err error) + type MatchOptionsConfig struct + DefaultExts []string + IndexFilename string + QueryParams string + TrailingSlash string + type RedirectResponse struct + StatusCode int + Target string + func (resp *RedirectResponse) Backend() string + func (resp *RedirectResponse) Close() + func (resp *RedirectResponse) Init(req *Request) (err error) + func (resp *RedirectResponse) Read(p []byte) (n int, err error) + type Request struct + RemoteAddr string + Url *url.URL + type Response interface + Backend func() string + Close func() + Init func(req *Request) (err error) + Read func(p []byte) (n int, err error) + func NewCgiResp(req Request, scriptPath string, cfg *Config) (resp Response) + func NewFileResp(filename string, req Request, cfg *Config) (resp Response) + func NewPermRedirectResp(target string) (resp Response) + func NewTempRedirectResp(target string) (resp Response) + type Route struct + Backend string + Hostname string + Prefix string + Url string + type StaticResponse struct + func (resp *StaticResponse) Backend() string + func (resp *StaticResponse) Close() + func (resp *StaticResponse) Init(req *Request) (err error) + func (resp *StaticResponse) Read(p []byte) (n int, err error)