package
0.0.0-20241025030232-2154053700bb
Repository: https://github.com/cipherblock-chat/chat.git
Documentation: pkg.go.dev
# Functions
MakeAuthAPI turns a util.JSONRequestHandler function into an http.Handler which authenticates the request.
MakeExternalAPI turns a util.JSONRequestHandler function into an http.Handler.
MakeHTMLAPI adds Span metrics to the HTML Handler function This is used to serve HTML alongside JSON error messages.
MakeInternalAPI turns a util.JSONRequestHandler function into an http.Handler.
MakeLocalAPI localhost,localhost.
No description provided by the author
PostJSON performs a POST request with JSON on an internal HTTP API.
URLDecodeMapValues is a function that iterates through each of the items in a map, URL decodes the value, and returns a new map with the decoded values under the same key names.
WrapHandlerInBasicAuth adds basic auth to a handler.
WrapHandlerInCORS adds CORS headers to all responses, including all error responses.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
BasicAuth is used for authorization on /metrics handlers.
No description provided by the author