Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.1.3
type Client struct { Timeout time.Duration `envconfig:"CLIENT_TIMEOUT" default:"5s"` Tracer tracing.Tracer HTTPClient }
Client holds configuration for http clients
type Config ¶
type Config struct { Listen string `envconfig:"HTTP_PORT" default:":8080"` LogLevel string `envconfig:"LOG_LEVEL" default:"debug"` OriginHost string `envconfig:"ORIGIN_HOST"` Hostname string `envconfig:"HOSTNAME" default:"localhost"` OriginKey string `encovnfig:"ORIGIN_KEY" default:"x-bakery-origin-token"` OriginToken string `envconfig:"ORIGIN_TOKEN"` AuthEnabled bool `envconfig:"ENABLE_AUTH" default:"false"` Logger zerolog.Logger Tracer Client Propeller }
Config holds all the configuration for this service
func LoadConfig ¶
LoadConfig loads the configuration with environment variables injected
func (Config) IsLocalHost ¶
IsLocalHost returns true if env is localhost
func (Config) SetupMiddleware ¶ added in v0.1.5
SetupMiddleware appends request logging context to use in your handler
func (Config) ValidateAuthHeader ¶ added in v0.1.5
ValidateAuthHeader returns error if not set
type HTTPClient ¶
HTTPClient hold interface declaration of our http clients
Click to show internal directories.
Click to hide internal directories.