Documentation ¶
Overview ¶
Package server contains some helper function used by http server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIKeyMiddleware ¶
APIKeyMiddleware checks for apiKey in a request and writes http.StatusForbidden if it's incorrect.
func HeadersMiddleware ¶
HeadersMiddleware sends headers required by servers
func StripTrailingSlashMiddleware ¶
StripTrailingSlashMiddleware strips trailing slash. Credit goes to https://github.com/stellar/horizon
func Write ¶
func Write(w http.ResponseWriter, response Response)
Write writes a response to the given http.ResponseWriter
Types ¶
Click to show internal directories.
Click to hide internal directories.