Skip to content

Commit

Permalink
Add mapstructure tags to echox.Config
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Montorsi <[email protected]>
  • Loading branch information
fmontorsi-equinix committed Aug 6, 2024
1 parent 39def70 commit a43c18d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions echox/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ var (
// Config is used to configure a new ginx server
type Config struct {
// Debug enables echo's Debug option.
Debug bool
Debug bool `mapstructure:"debug"`

// Listen sets the listen address to serve the echo server on.
Listen string
Listen string `mapstructure:"listen"`

// ShutdownGracePeriod sets the grace period for in flight requests before shutting down.
ShutdownGracePeriod time.Duration
ShutdownGracePeriod time.Duration `mapstructure:"shutdown-grace-period"`

// TrustedProxies defines the allowed ip / network ranges to trust a proxy from.
TrustedProxies []string
TrustedProxies []string `mapstructure:"trusted-proxies"`

// Middleware includes the provided middleware when echo is initialized.
Middleware []echo.MiddlewareFunc
Middleware []echo.MiddlewareFunc `mapstructure:"middleware"`
}

// withDefaults returns a new config with defaults set if not already defined.
Expand Down

0 comments on commit a43c18d

Please sign in to comment.