Categorygithub.com/twharmon/goweb
modulepackage
1.0.0-alpha
Repository: https://github.com/twharmon/goweb.git
Documentation: pkg.go.dev

# README

Goweb

Light weight web framework based on net/http.

Includes

  • routing
  • middleware
  • autoTLS
  • logging

Usage

See examples.

Documentation

For full documentation see godoc.

Contribute

Create a pull request to contribute to Goweb.

# Packages

No description provided by the author

# Functions

New returns a new Engine.
NewMiddleware returns a new MiddlewareChain that can be applied to any Handler.

# Constants

LogLevelAlert as defined in the RFC 5424 specification.
LogLevelCritical as defined in the RFC 5424 specification.
LogLevelDebug as defined in the RFC 5424 specification.
LogLevelEmergency as defined in the RFC 5424 specification.
LogLevelError as defined in the RFC 5424 specification.
LogLevelInfo as defined in the RFC 5424 specification.
LogLevelNotice as defined in the RFC 5424 specification.
LogLevelWarning as defined in the RFC 5424 specification.

# Structs

Context provides helper methods to read the request, get and set values in a data store, and send a response to the client.
Engine contains routing and logging information for your app.
FileResponse implements Responder interface.
JSONResponse implements Responder interface.
Middleware contains a set of Handler functions that will be applied in the same order in which they were registerend.
PlainTextResponse implements Responder interface.
TLSConfig contains TLS configuration information.

# Interfaces

Logger is an interface that implements Log(level int, message interface{}).
Responder is the Responder interface that responds to HTTP requests.

# Type aliases

Handler handles HTTP requests.
Map is an alias for map[string]interface{}.