aboutsummaryrefslogtreecommitdiffhomepage
path: root/storage.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2019-09-19 12:42:36 -0600
committerMatthew Holt <[email protected]>2019-09-19 12:42:36 -0600
commitba29f9d41d7951bde07dc2e0d6a1471c40bb7145 (patch)
tree1a76ab0796e57a31bf8fc36ff4bb34779215edb7 /storage.go
parent40e05e5a01d50b381fa7a7a472ea38f44518f02c (diff)
downloadcaddy-ba29f9d41d7951bde07dc2e0d6a1471c40bb7145.tar.gz
caddy-ba29f9d41d7951bde07dc2e0d6a1471c40bb7145.zip
httpcaddyfile: Global storage configuration (closes #2758)
Diffstat (limited to 'storage.go')
-rw-r--r--storage.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/storage.go b/storage.go
index f695a49b4..b325b7bb0 100644
--- a/storage.go
+++ b/storage.go
@@ -22,10 +22,6 @@ import (
"github.com/mholt/certmagic"
)
-func init() {
- RegisterModule(fileStorage{})
-}
-
// StorageConverter is a type that can convert itself
// to a valid, usable certmagic.Storage value. (The
// value might be short-lived.) This interface allows
@@ -35,23 +31,6 @@ type StorageConverter interface {
CertMagicStorage() (certmagic.Storage, error)
}
-// fileStorage is a certmagic.Storage wrapper for certmagic.FileStorage.
-type fileStorage struct {
- Root string `json:"root"`
-}
-
-// CaddyModule returns the Caddy module information.
-func (fileStorage) CaddyModule() ModuleInfo {
- return ModuleInfo{
- Name: "caddy.storage.file_system",
- New: func() Module { return new(fileStorage) },
- }
-}
-
-func (s fileStorage) CertMagicStorage() (certmagic.Storage, error) {
- return &certmagic.FileStorage{Path: s.Root}, nil
-}
-
// homeDir returns the best guess of the current user's home
// directory from environment variables. If unknown, "." (the
// current directory) is returned instead.
@@ -80,6 +59,3 @@ func dataDir() string {
}
return filepath.Join(baseDir, "caddy")
}
-
-// Interface guard
-var _ StorageConverter = fileStorage{}