Versions in this module Expand all Collapse all v0 v0.2.0 Jun 21, 2020 v0.1.0 Jun 11, 2020 Changes in this version + func WriteResponse(w http.ResponseWriter, response interface{}) + type Config struct + Domain string + Port string + type HTTPError struct + PrivateMessage log.Fields + PublicMessage string + StatusCode int + func NewHTTPError(statusCode int, publicMessage string, privateMessage log.Fields) *HTTPError + type HTTPRequestInfo struct + Duration time.Duration + IPAddress string + Length int + Method string + Protocol string + Referer string + StatusCode int + URI string + UserAgent string + func (i *HTTPRequestInfo) ToFields() log.Fields + type HTTPResponse struct + Data interface{} + ErrorMessage string + type ResponseWriter struct + Length int + StatusCode int + func (w *ResponseWriter) Write(bytes []byte) (int, error) + func (w *ResponseWriter) WriteHeader(statusCode int) + type Server struct + Router *mux.Router + func NewServer(config *Config) *Server + func (s *Server) HeadersMiddleware(next http.Handler) http.Handler + func (s *Server) LoggingMiddleware(next http.Handler) http.Handler + func (s *Server) RegisterAction(path string, handler func(http.ResponseWriter, *http.Request), ...) + func (s *Server) RegisterAssetsDirectory(pathPrefix string, directory string) + func (s *Server) RegisterHeader(key, value string) + func (s *Server) RegisterMiddleware(middlewares ...mux.MiddlewareFunc) + func (s *Server) Run() + func (s *Server) SetNotFoundHandler(handler func(http.ResponseWriter, *http.Request))