helper

package
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanHeadersForRaven added in v0.8.3

func CleanHeadersForRaven(r *http.Request)

func CleanUpProcessGroup added in v0.6.1

func CleanUpProcessGroup(cmd *exec.Cmd)

func ExitStatus added in v0.6.1

func ExitStatus(err error) (int, bool)

func Fail500

func Fail500(w http.ResponseWriter, r *http.Request, err error)

func HTTPError

func HTTPError(w http.ResponseWriter, r *http.Request, error string, code int)

func HeaderClone added in v0.6.3

func HeaderClone(h http.Header) http.Header

func LogError

func LogError(r *http.Request, err error)

func OpenFile

func OpenFile(path string) (file *os.File, fi os.FileInfo, err error)

func ServiceUnavailable added in v0.8.3

func ServiceUnavailable(w http.ResponseWriter, r *http.Request, err error)

func SetNoCacheHeaders

func SetNoCacheHeaders(header http.Header)

func TooManyRequests added in v0.8.3

func TooManyRequests(w http.ResponseWriter, r *http.Request, err error)

func URLMustParse

func URLMustParse(s string) *url.URL

Types

type LoggingResponseWriter

type LoggingResponseWriter struct {
	// contains filtered or unexported fields
}

func NewLoggingResponseWriter

func NewLoggingResponseWriter(rw http.ResponseWriter) LoggingResponseWriter

func (*LoggingResponseWriter) Header

func (l *LoggingResponseWriter) Header() http.Header

func (*LoggingResponseWriter) Log

func (l *LoggingResponseWriter) Log(r *http.Request)

func (*LoggingResponseWriter) Write

func (l *LoggingResponseWriter) Write(data []byte) (n int, err error)

func (*LoggingResponseWriter) WriteHeader

func (l *LoggingResponseWriter) WriteHeader(status int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL