diff options
author | Matt Holt <mholt@users.noreply.github.com> | 2019-08-21 11:28:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-21 11:28:03 -0600 |
commit | 0544f0266a11874efb305a46db762248e64bc62d (patch) | |
tree | 3e75e6f59047bb967c52915e1e75aee6ad67c0ea /storage.go | |
parent | 42f75a4ca94ef3fb5e15a74e5dc9ef8b4f1f0b39 (diff) | |
parent | b2aa679c33f63ebec5bc1a21bca01f345dffebdd (diff) |
Merge pull request #2699 from caddyserver/cfadapter
v2: Implement config adapters and WIP Caddyfile adapter
Diffstat (limited to 'storage.go')
-rw-r--r-- | storage.go | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -23,10 +23,7 @@ import ( ) func init() { - RegisterModule(Module{ - Name: "caddy.storage.file_system", - New: func() interface{} { return new(fileStorage) }, - }) + RegisterModule(fileStorage{}) } // StorageConverter is a type that can convert itself @@ -43,6 +40,14 @@ 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 } |