httpserver

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentTypeJSONMiddleware

func ContentTypeJSONMiddleware(next http.Handler) http.Handler

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

func New

func New(r *mux.Router, conf *config.Config, opts *cors.Options) *http.Server

Types

type HttpMsg

type HttpMsg struct {
	Msg  string `json:"msg"`
	Code int    `json:"code"`
}
var ErroHttpMsgMethodNotAllowed HttpMsg = HttpMsg{
	Msg:  "Erro Method Not Allowed",
	Code: http.StatusMethodNotAllowed,
}
var ErroHttpMsgPageNotFound HttpMsg = HttpMsg{
	Msg:  "Erro Page Not Found",
	Code: http.StatusNotFound,
}

func (*HttpMsg) Write

func (m *HttpMsg) Write(w http.ResponseWriter)

Jump to

Keyboard shortcuts

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