From 43961b542b077f99f78d64629348b9300d3cd4a3 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 26 Apr 2019 12:35:39 -0600 Subject: General cleanup and more godocs --- storage.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'storage.go') diff --git a/storage.go b/storage.go index cb93f59..2b77851 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"` -- cgit v1.2.3