Versions in this module Expand all Collapse all v2 v2.0.1 Feb 13, 2019 Changes in this version + const ContentType + const ContentTypeJSON + const ContentTypePlainText + func BasicAuthent(handler http.Handler, realm string, ...) http.Handler + func Chain(f http.HandlerFunc, middlewares ...Middleware) http.HandlerFunc + func ChainHandler(f http.Handler, middlewares ...Middleware) http.Handler + func DELETE(mux *http.ServeMux, path string, ...) + func GET(mux *http.ServeMux, path string, ...) + func GenerateTLSCertificate(conf CertConf) error + func IntFromURL(url *url.URL, position int) (int64, error) + func JSON(w http.ResponseWriter, res interface{}, code int) + func OPTIONS(mux *http.ServeMux, path string, ...) + func PATCH(mux *http.ServeMux, path string, ...) + func POST(mux *http.ServeMux, path string, ...) + func PUT(mux *http.ServeMux, path string, ...) + func RequestLogger(handler http.Handler, logger, errlog *log.Logger) http.Handler + func String(w http.ResponseWriter, res string, code int) + func StringFromURL(url *url.URL, position int) (string, error) + func TRACE(mux *http.ServeMux, path string, ...) + type CertConf struct + CertOut func() (io.WriteCloser, error) + HostAddrs []string + KeyOut func() (io.WriteCloser, error) + RASBits int + Random io.Reader + Subject pkix.Name + SubjectAltName SubjectAltName + ValidFor time.Duration + func NewCertConf(subject pkix.Name, hostAddrs []string) CertConf + type Middleware func(http.HandlerFunc) http.HandlerFunc + func BasicAuthentMiddleware(realm string, authorized func(user, password string) bool) Middleware + func Method(method string) Middleware + func RequestLoggerMiddleware(logger, errlog *log.Logger) Middleware + type Response struct + ResBuf *bytes.Buffer + StartTime time.Time + Status int + func NewResponse(w http.ResponseWriter) *Response + func (r *Response) Header() http.Header + func (r *Response) Write(data []byte) (int, error) + func (r *Response) WriteHeader(status int) + type SubjectAltName struct + DNSNames []string + EmailAddresses []string + IPAddresses []net.IP + URIs []*url.URL Other modules containing this package github.com/jksch/rest