Documentation ¶
Index ¶
- func CombineHandlers(handlers ...http.HandlerFunc) http.HandlerFunc
- func Respond(statusCode int, body string) http.HandlerFunc
- func RespondPtr(statusCode *int, body *string) http.HandlerFunc
- func VerifyBasicAuth(username string, password string) http.HandlerFunc
- func VerifyContentType(contentType string) http.HandlerFunc
- func VerifyHeader(header http.Header) http.HandlerFunc
- func VerifyJSON(expectedJSON string) http.HandlerFunc
- func VerifyRequest(method string, path string, rawQuery ...string) http.HandlerFunc
- type Server
- func (s *Server) Append(handlers ...http.HandlerFunc)
- func (s *Server) Close()
- func (s *Server) Get(index int) http.HandlerFunc
- func (s *Server) ReceivedRequestsCount() int
- func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (s *Server) Set(index int, handler http.HandlerFunc)
- func (s *Server) URL() string
- func (s *Server) Wrap(index int, handler http.HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineHandlers ¶
func CombineHandlers(handlers ...http.HandlerFunc) http.HandlerFunc
func RespondPtr ¶
func RespondPtr(statusCode *int, body *string) http.HandlerFunc
func VerifyBasicAuth ¶
func VerifyBasicAuth(username string, password string) http.HandlerFunc
func VerifyContentType ¶
func VerifyContentType(contentType string) http.HandlerFunc
func VerifyHeader ¶
func VerifyHeader(header http.Header) http.HandlerFunc
func VerifyJSON ¶
func VerifyJSON(expectedJSON string) http.HandlerFunc
func VerifyRequest ¶
func VerifyRequest(method string, path string, rawQuery ...string) http.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.