Export types and fields necessary to build configs (for config adapters)

Also flag most fields with 'omitempty' for JSON marshaling
This commit is contained in:
Matthew Holt
2019-05-22 12:32:36 -06:00
parent be9b6e7b57
commit bc00d840e8
11 changed files with 133 additions and 131 deletions

View File

@ -136,10 +136,10 @@ type App interface {
// Config represents a Caddy configuration.
type Config struct {
StorageRaw json.RawMessage `json:"storage"`
StorageRaw json.RawMessage `json:"storage,omitempty"`
storage certmagic.Storage
AppsRaw map[string]json.RawMessage `json:"apps"`
AppsRaw map[string]json.RawMessage `json:"apps,omitempty"`
// apps stores the decoded Apps values,
// keyed by module name.