summaryrefslogtreecommitdiff
path: root/caddyconfig/httpcaddyfile/options.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-30 09:11:30 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-30 09:11:30 -0600
commit1e662262179d326586d2beb849f842b82b7324c4 (patch)
tree1b2e79e4e27e7b4812f6566104568092bc7bcd7d /caddyconfig/httpcaddyfile/options.go
parent7b4aa108c7d67416bf68574da6c5a43899715b3d (diff)
httpcaddyfile: Add acme_ca and email global options
Also add ability to access options from individual unmarshalers through the Helper values
Diffstat (limited to 'caddyconfig/httpcaddyfile/options.go')
-rw-r--r--caddyconfig/httpcaddyfile/options.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/caddyconfig/httpcaddyfile/options.go b/caddyconfig/httpcaddyfile/options.go
index dadde28..a60d060 100644
--- a/caddyconfig/httpcaddyfile/options.go
+++ b/caddyconfig/httpcaddyfile/options.go
@@ -108,3 +108,27 @@ func parseOptStorage(d *caddyfile.Dispenser) (caddy.StorageConverter, error) {
}
return storage, nil
}
+
+func parseOptACMECA(d *caddyfile.Dispenser) (string, error) {
+ d.Next() // consume parameter name
+ if !d.Next() {
+ return "", d.ArgErr()
+ }
+ val := d.Val()
+ if d.Next() {
+ return "", d.ArgErr()
+ }
+ return val, nil
+}
+
+func parseOptEmail(d *caddyfile.Dispenser) (string, error) {
+ d.Next() // consume parameter name
+ if !d.Next() {
+ return "", d.ArgErr()
+ }
+ val := d.Val()
+ if d.Next() {
+ return "", d.ArgErr()
+ }
+ return val, nil
+}