http_server

package
v0.0.0-...-ff3b7a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 26 Imported by: 0

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

type HttpHandler struct {
	http.Handler
	// contains filtered or unexported fields
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL