httpServer

package
v0.0.0-...-526cc90 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

our custom http server goes here (with logging middleware is here)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLogging

func WithLogging(h http.Handler) http.Handler

return http handler with logging capabilities

Types

type LoggingResponseWriter

type LoggingResponseWriter struct {
	http.ResponseWriter
	ResponseData *ResponseData
}

custom response writer with compatibility for original one

func (*LoggingResponseWriter) Write

func (r *LoggingResponseWriter) Write(b []byte) (int, error)

func (*LoggingResponseWriter) WriteHeader

func (r *LoggingResponseWriter) WriteHeader(statusCode int)

type ResponseData

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

simply for holding some data

Jump to

Keyboard shortcuts

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