caddy-website/src/docs/markdown/extending-caddy/namespaces.md
2022-07-24 22:32:38 -06:00

3.6 KiB

title
Module Namespaces

Module Namespaces

Caddy guest modules are loaded generically as interface{} 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
caddy.App Caddy app
caddy.fs fs.FS Virtual file system ⚠️ Experimental
caddy.logging.encoders.filter logging.LogFieldFilter Log field filter
caddy.logging.writers caddy.WriterOpener Log writers
caddy.storage caddy.StorageConverter Storage backends
http.authentication.hashes caddyauth.Comparer Password hashers/comparers
http.authentication.providers caddyauth.Authenticator HTTP authentication providers
http.handlers caddyhttp.MiddlewareHandler HTTP handlers
http.matchers caddyhttp.RequestMatcher HTTP request matchers
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.handshake_match caddytls.ConnectionMatcher TLS connection matcher
tls.issuance certmagic.Issuer TLS certificate issuer
tls.get_certificate certmagic.CertificateManager TLS certificate manager
⚠️ Experimental
tls.stek caddytls.STEKProvider TLS session ticket key source