config

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockedLocation

type BlockedLocation struct {
	ResponseStatus int `json:"responseStatus"`
}

type CompressedDirectoryLocation

type CompressedDirectoryLocation struct {
	StripPrefix   string `json:"stripPrefix"`
	DirectoryPath string `json:"directoryPath"`
}

type Configuration

type Configuration struct {
	DropPrivileges *DropPrivileges `json:"dropPrivileges"`
	RequestLogger  *RequestLogger  `json:"requestLogger"`
	Servers        []Server        `json:"servers"`
}

func ReadConfiguration

func ReadConfiguration(configFile string) *Configuration

type DirectoryLocation

type DirectoryLocation struct {
	StripPrefix   string `json:"stripPrefix"`
	DirectoryPath string `json:"directoryPath"`
}

type DropPrivileges

type DropPrivileges struct {
	ChrootEnabled   bool   `json:"chrootEnabled"`
	ChrootDirectory string `json:"chrootDirectory"`
	GroupName       string `json:"groupName"`
	UserName        string `json:"userName"`
}

type FastCGILocation

type FastCGILocation struct {
	Network        string `json:"network"`
	Address        string `json:"address"`
	ConnectionPool *struct {
		Size                 int `json:"size"`
		LifetimeMilliseconds int `json:"lifetimeMilliseconds"`
	} `json:"connectionPool"`
}

type Location

type Location struct {
	LocationID                  string                       `json:"locationID"`
	HttpPathPrefix              string                       `json:"httpPathPrefix"`
	BlockedLocation             *BlockedLocation             `json:"blockedLocation"`
	DirectoryLocation           *DirectoryLocation           `json:"directoryLocation"`
	CompressedDirectoryLocation *CompressedDirectoryLocation `json:"compressedDirectoryLocation"`
	RedirectLocation            *RedirectLocation            `json:"redirectLocation"`
	FastCGILocation             *FastCGILocation             `json:"fastCGILocation"`
	ResponseHeaders             *ResponseHeaders             `json:"responseHeaders"`
}

type NetworkAndListenAddress

type NetworkAndListenAddress struct {
	Network       string `json:"network"`
	ListenAddress string `json:"listenAddress"`
}

type RedirectLocation

type RedirectLocation struct {
	RedirectURL    string `json:"redirectURL"`
	ResponseStatus int    `json:"responseStatus"`
}

type RequestLogger

type RequestLogger struct {
	LogToStdout      bool   `json:"logToStdout"`
	RequestLogFile   string `json:"requestLogFile"`
	MaxSizeMegabytes int    `json:"maxSizeMegabytes"`
	MaxBackups       int    `json:"maxBackups"`
}

type ResponseHeaders

type ResponseHeaders map[string]string

type Server

type Server struct {
	ServerID                    string                    `json:"serverID"`
	NetworkAndListenAddressList []NetworkAndListenAddress `json:"networkAndListenAddressList"`
	TLSInfo                     *TLSInfo                  `json:"tlsInfo"`
	Timeouts                    *Timeouts                 `json:"timeouts"`
	ResponseHeaders             *ResponseHeaders          `json:"responseHeaders"`
	Locations                   []Location                `json:"locations"`
}

type TLSInfo

type TLSInfo struct {
	CertFile string `json:"certFile"`
	KeyFile  string `json:"keyFile"`
}

type Timeouts

type Timeouts struct {
	ReadTimeoutMilliseconds  int `json:"readTimeoutMilliseconds"`
	WriteTimeoutMilliseconds int `json:"writeTimeoutMilliseconds"`
}

func (*Timeouts) ApplyToHTTPServer

func (timeouts *Timeouts) ApplyToHTTPServer(httpServer *http.Server)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL