Documentation ¶
Index ¶
Constants ¶
View Source
const (
AuthorizationHeader = "Authorization"
)
Variables ¶
This section is empty.
Functions ¶
func NewHTTPServer ¶
func NewHTTPServer(lc fx.Lifecycle, cfg *config.Configuration, handler http.Handler, log *zap.SugaredLogger) *http.Server
func NewServerRoute ¶
func NewServerRoute(routes []routes.Route, logger *zap.SugaredLogger, loggerRaw *zap.Logger, config *config.Configuration, tokenService *services.TokenService, tf *TrafficMiddleware) http.Handler
Types ¶
type HttpHandler ¶
func (*HttpHandler) HandleAuthorization ¶
func (h *HttpHandler) HandleAuthorization(w http.ResponseWriter, r *http.Request) (*models.Claims, error)
func (*HttpHandler) ServeHTTP ¶
func (h *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TrafficMiddleware ¶
type TrafficMiddleware struct {
// contains filtered or unexported fields
}
func NewTrafficMiddleware ¶
func NewTrafficMiddleware(trafficMetrics *metrics.TrafficMetrics) (*TrafficMiddleware, error)
func (*TrafficMiddleware) CalculateTraffic ¶
func (tm *TrafficMiddleware) CalculateTraffic(next http.Handler) http.Handler
Click to show internal directories.
Click to hide internal directories.