Versions in this module Expand all Collapse all v1 v1.8.0 Aug 5, 2019 Changes in this version + type Config struct + BackendURL string + ConfigPath string + DataPath string + Hostname string + HttpClientTimeout time.Duration + HttpServerShutdownTimeout time.Duration + HttpServerTimeout time.Duration + JWTSecret string + Port string + PortMetrics int + RandomDelay bool + RandomError bool + UIColor string + UIMessage string + UIPath string + type LoggingMiddleware struct + func NewLoggingMiddleware(logger *zap.Logger) *LoggingMiddleware + func (m *LoggingMiddleware) Handler(next http.Handler) http.Handler + type PrometheusMiddleware struct + Counter *prometheus.CounterVec + Histogram *prometheus.HistogramVec + func NewPrometheusMiddleware() *PrometheusMiddleware + func (p *PrometheusMiddleware) Handler(next http.Handler) http.Handler + type Server struct + func NewMockServer() *Server + func NewServer(config *Config, logger *zap.Logger) (*Server, error) + func (s *Server) ErrorResponse(w http.ResponseWriter, r *http.Request, error string, code int) + func (s *Server) JSONResponse(w http.ResponseWriter, r *http.Request, result interface{}) + func (s *Server) JSONResponseCode(w http.ResponseWriter, r *http.Request, result interface{}, responseCode int) + func (s *Server) ListenAndServe(stopCh <-chan struct{})