Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentType ¶ added in v1.0.0
helper function to get "content-type" from headers
func Error ¶ added in v1.0.4
func Error(w http.ResponseWriter, error string, code int)
wrapper for http.Error that additionally logs the error message to std.Output
func XAuthToken ¶ added in v1.0.0
helper function to get "x-auth-token" from headers
Types ¶
type HTTPMessage ¶ added in v1.0.0
type HTTPMessage struct { ID uuid.UUID Msg []byte IsAlreadyHashed bool Response chan HTTPResponse }
type HTTPResponse ¶ added in v1.0.0
type HTTPServer ¶
type HTTPServer struct { MessageHandler chan HTTPMessage AuthTokens map[string]string }
Click to show internal directories.
Click to hide internal directories.