Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Answer ¶
type Answer struct {
// contains filtered or unexported fields
}
func JSONDocument ¶
func JSONDocument(x interface{}) *Answer
func RedirectTo ¶
type DetailedResponseWriter ¶
type DetailedResponseWriter struct {
// contains filtered or unexported fields
}
statusResponseWriter implements the http.ResponseWriter by wrapping another implementation, but in addition provides access to the status code and size of the response.
func NewDetailedResponseWriter ¶
func NewDetailedResponseWriter(w http.ResponseWriter) *DetailedResponseWriter
func (*DetailedResponseWriter) Header ¶
func (w *DetailedResponseWriter) Header() http.Header
func (*DetailedResponseWriter) Size ¶
func (w *DetailedResponseWriter) Size() int
func (*DetailedResponseWriter) Status ¶
func (w *DetailedResponseWriter) Status() int
func (*DetailedResponseWriter) Write ¶
func (w *DetailedResponseWriter) Write(bytes []byte) (size int, err error)
func (*DetailedResponseWriter) WriteHeader ¶
func (w *DetailedResponseWriter) WriteHeader(statusCode int)
type LoggingFileServer ¶
type LoggingFileServer struct {
// contains filtered or unexported fields
}
func NewLoggingFileServer ¶
func NewLoggingFileServer(root http.FileSystem) *LoggingFileServer
func (*LoggingFileServer) ServeHTTP ¶
func (s *LoggingFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) BodyAsJSON ¶
type SimpleLogger ¶
type SimpleLogger struct{}
func (*SimpleLogger) Log ¶
func (l *SimpleLogger) Log(t time.Duration, w *DetailedResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.