summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/routes.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-05-22 12:32:36 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-05-22 12:32:36 -0600
commitbc00d840e845d42145954839b88f1e836cd51bfd (patch)
tree0cd9f1103f3056fbadede6fd7de12ec605f50c02 /modules/caddyhttp/routes.go
parentbe9b6e7b57d5bbf13d26b1620d34efc4e12284f7 (diff)
Export types and fields necessary to build configs (for config adapters)
Also flag most fields with 'omitempty' for JSON marshaling
Diffstat (limited to 'modules/caddyhttp/routes.go')
-rw-r--r--modules/caddyhttp/routes.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go
index 92aa3e8..07e0566 100644
--- a/modules/caddyhttp/routes.go
+++ b/modules/caddyhttp/routes.go
@@ -12,12 +12,12 @@ import (
// middlewares, and a responder for handling HTTP
// requests.
type ServerRoute struct {
- Group string `json:"group"`
- Matchers map[string]json.RawMessage `json:"match"`
- Apply []json.RawMessage `json:"apply"`
- Respond json.RawMessage `json:"respond"`
+ Group string `json:"group,omitempty"`
+ Matchers map[string]json.RawMessage `json:"match,omitempty"`
+ Apply []json.RawMessage `json:"apply,omitempty"`
+ Respond json.RawMessage `json:"respond,omitempty"`
- Terminal bool `json:"terminal"`
+ Terminal bool `json:"terminal,omitempty"`
// decoded values
matchers []RequestMatcher