httpserver

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentTypeJSONMiddleware added in v0.8.0

func ContentTypeJSONMiddleware(next http.Handler) http.Handler

func LoggingMiddleware added in v0.8.0

func LoggingMiddleware(next http.Handler) http.Handler

func New added in v0.1.1

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

Types

type HttpMsg added in v0.8.0

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 added in v0.8.0

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