package
0.2.2
Repository: https://github.com/benbjohnson/wtf.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

Error prints & optionally logs an error message.
ErrorStatusCode returns the associated HTTP status code for a WTF error code.
FromErrorStatusCode returns the associated WTF code for an HTTP status code.
ListenAndServeDebug runs an HTTP server with /debug endpoints (e.g.
ListenAndServeTLSRedirect runs an HTTP server on port 80 to redirect users to the TLS-enabled port 443 server.
LogError logs an error with the HTTP route information.
NewClient returns a new instance of Client.
NewDialService returns a new instance of DialService.
NewServer returns a new instance of Server.
SetFlash sets the flash cookie for the next request to read.

# Constants

SessionCookieName is the name of the cookie used to store the session.
ShutdownTimeout is the time given for outstanding requests to finish before shutdown.

# Structs

Client represents an HTTP client.
DialService implements the wtf.DialService over the HTTP protocol.
ErrorResponse represents a JSON structure for error output.
Server represents an HTTP server.
Session represents session data stored in a secure cookie.