goweb

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 8 Imported by: 0

README

goweb

Go library for simplifying web development.

Documentation

Index

Constants

View Source
const (
	HeaderContentLength string = "Content-Length"
	HeaderContentType   string = "Content-Type"
	HeaderETag          string = "ETag"
	HeaderIfNoneMatch   string = "If-None-Match"
)
View Source
const (
	ContentTypeJSON string = "application/json"
	ContentTypeText string = "text/plain"
)

Variables

This section is empty.

Functions

func CorrID

func CorrID(r *http.Request) string

func DefaultResponse

func DefaultResponse(w http.ResponseWriter, r *http.Request, status int)

Types

type ErrorHandler

type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error)

type Web

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

func New

func New(errHandler ErrorHandler) *Web

func (*Web) Mux

func (w *Web) Mux() *http.ServeMux

func (*Web) ServeHTTP

func (i *Web) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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