Versions in this module Expand all Collapse all v1 v1.0.0 Jun 12, 2024 Changes in this version + func NewOpenTelemetryMiddleware() mux.MiddlewareFunc + type ArrayResponse []string + type Config struct + BackendURL []string + CacheServer string + CertPath string + ConfigPath string + DataPath string + H2C bool + Host string + Hostname string + HttpClientTimeout time.Duration + HttpServerTimeout time.Duration + JWTSecret string + Port string + PortMetrics int + RandomDelay bool + RandomDelayMax int + RandomDelayMin int + RandomDelayUnit string + RandomError bool + SecurePort string + ServerShutdownTimeout time.Duration + UIColor string + UILogo string + UIMessage string + UIPath string + Unhealthy bool + Unready bool + type LoggingMiddleware struct + func NewLoggingMiddleware(logger *zap.Logger) *LoggingMiddleware + func (m *LoggingMiddleware) Handler(next http.Handler) http.Handler + type MapResponse map[string]string + type PrometheusMiddleware struct + Counter *prometheus.CounterVec + Histogram *prometheus.HistogramVec + func NewPrometheusMiddleware() *PrometheusMiddleware + func (p *PrometheusMiddleware) Handler(next http.Handler) http.Handler + type RandomDelayMiddleware struct + func NewRandomDelayMiddleware(minDelay, maxDelay int, delayUnit string) *RandomDelayMiddleware + func (m *RandomDelayMiddleware) Handler(next http.Handler) http.Handler + type RuntimeResponse struct + Color string + GOARCH string + GOOS string + Hostname string + Logo string + Message string + NumCPU string + NumGoroutine string + Revision string + Runtime string + Version string + 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, span trace.Span, error string, ...) + 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() (*http.Server, *http.Server, *int32, *int32) + type TokenResponse struct + ExpiresAt time.Time + Token string + type TokenValidationResponse struct + ExpiresAt time.Time + TokenName string