gophi/config.go
kim (grufwub) 8a67a88660 use net/url's path parser, pass more Request objects round instead of RequestPath
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-14 17:54:06 +01:00

47 lines
1.1 KiB
Go

package main
import (
"time"
"regexp"
)
/* ServerConfig:
* Holds onto global server configuration details
* and any data objects we want to keep in memory
* (e.g. loggers, restricted files regular expressions
* and file cache)
*/
type ServerConfig struct {
/* Executable Settings */
Env []string
CgiEnv []string
CgiEnabled bool
MaxExecRunTime time.Duration
/* Content settings */
FooterText []byte
PageWidth int
/* Logging */
SysLog LoggerInterface
AccLog LoggerInterface
/* Filesystem access */
FileSystem *FileSystem
/* Buffer sizes */
SocketWriteBufSize int
SocketReadBufSize int
SocketReadMax int
SkipPrefixBufSize int
FileReadBufSize int
/* Socket deadlines */
SocketReadDeadline time.Duration
SocketWriteDeadline time.Duration
/* Precompiled regular expressions */
RgxGophermap *regexp.Regexp
RgxCgiBin *regexp.Regexp
}