Module Namespaces
Caddy guest modules are loaded generically as interface{}
or any
types. In order for the host modules to be able to use them, the loaded guest modules are usually type-asserted to a known type first. This page describes the mapping from module namespaces to Go types for all the standard modules.
Documentation for non-standard module namespaces can be found with the documentation for the host module that defines them.
Namespace | Expected Type | Description | Notes |
---|---|---|---|
caddy.App |
Caddy app | ||
caddy.config_loaders | caddy.ConfigLoader |
Loads a config | ⚠️ Experimental |
caddy.fs | fs.FS |
Virtual file system | ⚠️ Experimental |
caddy.listeners | caddy.ListenerWrapper |
Wrap network listeners | |
caddy.logging.encoders | zapcore.Encoder |
Log entry encoder | |
caddy.logging.encoders.filter | logging.LogFieldFilter |
Log field filter | |
caddy.logging.writers | caddy.WriterOpener |
Log writers | |
caddy.storage | caddy.StorageConverter |
Storage backends | |
dns.providers | certmagic.ACMEDNSProvider |
DNS challenge solver | |
events.handlers | caddyevents.Handler |
Event handlers | ⚠️ Experimental |
http.authentication.hashes | caddyauth.Comparer |
Password hashers/comparers | |
http.authentication.providers | caddyauth.Authenticator |
HTTP authentication providers | |
http.encoders | encode.Encoder |
Usually, compression | |
http.handlers | caddyhttp.MiddlewareHandler |
HTTP handlers | |
http.ip_sources | caddyhttp.IPRangeSource |
IP ranges for trusted proxies | |
http.matchers | caddyhttp.RequestMatcher |
HTTP request matchers | |
http.precompressed | encode.Precompressed |
Supported precompress mappings | |
http.reverse_proxy.circuit_breakers | reverseproxy.CircuitBreaker |
Reverse proxy circuit breakers | |
http.reverse_proxy.selection_policies | reverseproxy.Selector |
Load balancing selection policies | |
http.reverse_proxy.transport | http.RoundTripper |
HTTP reverse proxy transports | |
http.reverse_proxy.upstreams | reverseproxy.UpstreamSource |
Dynamic upstream source | ⚠️ Experimental |
tls.certificates | caddytls.CertificateLoader |
TLS certificate source | |
tls.client_auth | caddytls.ClientCertificateVerifier |
Verifies client certificates | |
tls.handshake_match | caddytls.ConnectionMatcher |
TLS connection matcher | |
tls.issuance | certmagic.Issuer |
TLS certificate issuer | |
tls.get_certificate | certmagic.Manager |
TLS certificate manager | ⚠️ Experimental |
tls.stek | caddytls.STEKProvider |
TLS session ticket key source |
Namespaces marked as "Experimental" are subject to change. (Please develop with them so we can finalize their interfaces!)