http

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AuthorizationHeader = "Authorization"
	RangeHeader         = "Range"
	ContentRangeHeader  = "Content-Range"
	AcceptRangeHeader   = "Accept-Ranges"
	ContentTypeHeader   = "Content-Type"
	ContentLengthHeader = "Content-Length"

	BearerToken = "Bearer"
	BytesRange  = "bytes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request) error

type Middleware

type Middleware func(next HandlerFunc) HandlerFunc

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(logger log.Logger, opts ...ServerOption) *Server

nolint:mnd

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(address string) error

func (*Server) Serve

func (s *Server) Serve(listener net.Listener) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Upgrade

func (s *Server) Upgrade(handler http.Handler)

type ServerOption

type ServerOption func(*Server)

func WithServer

func WithServer(server *http.Server) ServerOption

Directories

Path Synopsis
nolint
nolint
Package endpoint provides abstractions and utilities for building composable HTTP endpoints, including parameter mappers, request binding, response mapping, and middleware chaining.
Package endpoint provides abstractions and utilities for building composable HTTP endpoints, including parameter mappers, request binding, response mapping, and middleware chaining.
binder
nolint:wrapcheck
nolint:wrapcheck
hlog
Package hlog provides HTTP middleware for structured logging of requests and responses.
Package hlog provides HTTP middleware for structured logging of requests and responses.

Jump to

Keyboard shortcuts

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