package
0.11.5
Repository: https://github.com/singhalkarun/caddy.git
Documentation: pkg.go.dev

# Functions

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.
DefaultLogRoller will roll logs by default.
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.
IsLogRollerSubdirective is true if the subdirective is for the log roller.
MergeRequestMatchers merges multiple RequestMatchers into one.
NewContextWithHeader creates a context with given response header.
NewReplacer makes a new replacer based on r and rr which are used for request and response placeholders, respectively.
NewResponseBuffer returns a new ResponseBuffer that will use buf to store the full body of the response if shouldBuffer returns true.
NewResponseRecorder makes and returns a new ResponseRecorder.
NewServer creates a new Server instance that will listen on addr and will serve the sites configured in group.
NewTestLogger creates logger suitable for testing purposes.
ParseRoller parses roller contents out of c.
RegisterDevDirective splices name into the list of directives immediately before another directive.
SafePath joins siteRoot and reqPath and converts it to a path that can be used to access a path on the local disk.
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.
WriteSiteNotFound writes appropriate error code to w, signaling that requested host is not served by Caddy on a given port.
WriteTextResponse writes body with code status to w.

# Constants

DefaultHost is the default host.
DefaultHTTPPort is the default port for HTTP.
DefaultHTTPSPort is the default port for HTTPS.
DefaultPort is the default port.
DefaultRoot is the default root folder.
MaxLogBodySize limits the size of logged request's body.
MitmCtxKey is the key for the result of MITM detection.
OriginalURLCtxKey is the key for accessing the original, incoming URL on an HTTP request.
RemoteUserCtxKey is the key for the remote user of the request, if any (basicauth).
ReplacerCtxKey is the context key for a per-request replacer.
RequestIDCtxKey is the key for the U4 UUID value.
Define variables used for TLS communication.
Define variables used for TLS communication.
new PSK ciphers introduced by TLS 1.3, not (yet) in crypto/tls https://tlswg.github.io/tls13-spec/#rfc.appendix.A.4).
Define variables used for TLS communication.
Define variables used for TLS communication.
Define variables used for TLS communication.
Define variables used for TLS communication.
cipher suites missing from the crypto/tls package, in no particular order here.
Define variables used for TLS communication.
Define variables used for TLS communication.
Define variables used for TLS communication.

# 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.
ErrMaxBytesExceeded is the error returned by MaxBytesReader when the request body exceeds the limit imposed.
GracefulTimeout is the maximum duration of a graceful shutdown.
Host is the site host.
HTTP2 indicates whether HTTP2 is enabled or not.
HTTPPort is the port to use for HTTP.
HTTPSPort is the port to use for HTTPS.
Port is the site port.
QUIC indicates whether QUIC is enabled or not.
Root is the site root.
TemplateFuncs contains user-defined functions for execution in templates.

# Structs

Address represents a site address.
Context is the context with which Caddy templates are executed.
IfMatcher is a RequestMatcher for 'if' conditions.
Limits specify size limit of request's header and body.
Logger is shared between errors and log plugins and supports both logging to a file (with an optional file roller), local and remote syslog servers.
LogRoller implements a type that provides a rolling logger.
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.
NonPusherError is more descriptive error caused by a non pusher.
PathLimit is a mapping from a site's path to its corresponding maximum request body size (in bytes).
ResponseBuffer is a type that conditionally buffers the response in memory.
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.
ResponseWriterWrapper wrappers underlying ResponseWriter and inherits its Hijacker/Pusher/CloseNotifier/Flusher as well.
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
HTTPInterfaces mix all the interfaces that middleware ResponseWriters need to support.
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
No description provided by the author
Path represents a URI path.
PathMatcher is a Path RequestMatcher.