Documentation ¶
Index ¶
- type Helper
- func (h *Helper) LoadFile(f string) []byte
- func (h *Helper) NewAPIServer(handler http.HandlerFunc) *httptest.Server
- func (h *Helper) NewClient(host net.Addr) *api.Client
- func (h *Helper) NewHTTPNotFoundHandler(content []byte, path string) http.HandlerFunc
- func (h *Helper) NewHTTPTestHandler(content []byte, path string) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func (*Helper) NewAPIServer ¶
func (h *Helper) NewAPIServer(handler http.HandlerFunc) *httptest.Server
func (*Helper) NewHTTPNotFoundHandler ¶
func (h *Helper) NewHTTPNotFoundHandler(content []byte, path string) http.HandlerFunc
Creates a http handler which explicit returns a 404 json error response for the given path with given content.
func (*Helper) NewHTTPTestHandler ¶
func (h *Helper) NewHTTPTestHandler(content []byte, path string) http.HandlerFunc
Creates a http handler which returns a response with the given content on the given path path. Otherwise return 404 - not found.
Click to show internal directories.
Click to hide internal directories.