diff options
author | Matthew Holt <[email protected]> | 2019-04-26 12:35:39 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-04-26 12:35:39 -0600 |
commit | 43961b542b077f99f78d64629348b9300d3cd4a3 (patch) | |
tree | f4d2b9d8478064912daf1e5de49803afcd7de242 /storage.go | |
parent | 2d056fbe66849f041a233a0d961639fae3835cbb (diff) | |
download | caddy-43961b542b077f99f78d64629348b9300d3cd4a3.tar.gz caddy-43961b542b077f99f78d64629348b9300d3cd4a3.zip |
General cleanup and more godocs
Diffstat (limited to 'storage.go')
-rw-r--r-- | storage.go | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/storage.go b/storage.go index cb93f5981..2b77851a2 100644 --- a/storage.go +++ b/storage.go @@ -16,22 +16,14 @@ func init() { } // StorageConverter is a type that can convert itself -// to a valid, usable certmagic.Storage value. The -// value might be short-lived. +// to a valid, usable certmagic.Storage value. (The +// value might be short-lived.) This interface allows +// us to adapt any CertMagic storage implementation +// into a consistent API for Caddy configuration. type StorageConverter interface { CertMagicStorage() (certmagic.Storage, error) } -// TODO: Wrappers other than file_system should be enterprise-only. - -// It may seem trivial to wrap these, but the benefits are: -// 1. We don't need to change the actual CertMagic storage implementions -// to a structure that is operable with Caddy's config (including JSON -// tags), and -// 2. We don't need to rely on rely on maintainers of third-party -// certmagic.Storage implementations. We can make any certmagic.Storage -// work with Caddy this way. - // fileStorage is a certmagic.Storage wrapper for certmagic.FileStorage. type fileStorage struct { Root string `json:"root"` |