package
0.9.5
Repository: https://github.com/hilerchyn/caddy.git
Documentation: pkg.go.dev

# Functions

CleanMaskedPath prevents one or more of the path cleanup operations: - collapse multiple slashes into one - eliminate "/." (current directory) - eliminate "<parent_directory>/.." by masking certain patterns in the path with a temporary random string.
CleanPath calls CleanMaskedPath() with the default mask of "://" to preserve double slashes of protocols such as "http://", "https://", and "ftp://" etc.
ContextInclude opens filename using fs and executes a template with the context ctx.
DefaultErrorFunc responds to an HTTP request with a simple description of the specified HTTP status code.
GetConfig gets the SiteConfig that corresponds to c.
IfMatcherKeyword checks if the next value in the dispenser is a keyword for 'if' config block.
IndexFile looks for a file in /root/fpath/indexFile for each string in indexFiles.
MaxBytesReader and its associated methods are borrowed from the Go Standard library (comments intact).
MergeRequestMatchers merges multiple RequestMatchers into one.
NewReplacer makes a new replacer based on r and rr which are used for request and response placeholders, respectively.
NewResponseRecorder makes and returns a new responseRecorder, which captures the HTTP Status code from the ResponseWriter and also the length of the response body written through it.
NewServer creates a new Server instance that will listen on addr and will serve the sites configured in group.
ParseRoller parses roller contents out of c.
RegisterDevDirective splices name into the list of directives immediately before another directive.
SameNext does a pointer comparison between next1 and next2.
SetLastModifiedHeader checks if the provided modTime is valid and if it is sets it as a Last-Modified header to the ResponseWriter.
SetupIfMatcher parses `if` or `if_op` in the current dispenser block.
WriteTextResponse writes body with code status to w.

# Constants

DefaultHost is the default host.
DefaultPort is the default port.
DefaultRoot is the default root folder.
MaxLogBodySize limits the size of logged request's body.

# Variables

CaseSensitivePath determines if paths should be case sensitive.
EmptyNext is a no-op function that can be passed into Middleware functions so that the assignment to the Next field of the Handler can be tested.
GracefulTimeout is the maximum duration of a graceful shutdown.
Host is the site host.
HTTP2 indicates whether HTTP2 is enabled or not.
Port is the site port.
QUIC indicates whether QUIC is enabled or not.
Root is the site root.

# Structs

Address represents a site address.
Context is the context with which Caddy templates are executed.
IfMatcher is a RequestMatcher for 'if' conditions.
LogRoller implements a type that provides a rolling logger.
MaxBytesExceeded is the error type returned by MaxBytesReader when the request body exceeds the limit imposed.
NonCloseNotifierError is more descriptive error caused by a non closeNotifier.
NonFlusherError is more descriptive error caused by a non flusher.
NonHijackerError is more descriptive error caused by a non hijacker.
PathLimit is a mapping from a site's path to its corresponding maximum request body size (in bytes).
ResponseRecorder is a type of http.ResponseWriter that captures the status code written to it and also the size of the body written in the response.
Server is the HTTP server implementation.
SiteConfig contains information about a site (also known as a virtual host).
Timeouts specify various timeouts for a server to use.

# Interfaces

No description provided by the author
No description provided by the author
Replacer is a type which can replace placeholder substrings in a string with actual values from a http.Request and ResponseRecorder.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
Path represents a URI path.
PathMatcher is a Path RequestMatcher.