resttest

package
v0.0.0-...-7c10f35 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2015 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*httptest.Server
	// contains filtered or unexported fields
}

Server is a light utility wrapper around httptest.Server which provides a useful RootedURL function.

func NewRootedServer

func NewRootedServer(root string, routes ...*rest.Route) *Server

NewRootedServer creates an httptest.Server that uses the given route as the REST handler rooted at the given path.

func NewRootedService

func NewRootedService(root string, service ...rest.Routable) *Server

NewRootedService creates an httptest.Server that uses the given service as the REST handler rooted at the given path.

func NewServer

func NewServer(routes ...*rest.Route) *Server

NewServer creates an httptest.Server that uses the given route as the REST handler.

func NewService

func NewService(service ...rest.Routable) *Server

NewService creates an httptest.Server that uses the given service as the REST handler.

func (*Server) RootedURL

func (server *Server) RootedURL() string

RootedURL returns the URL of the server plus the Root of the underlying rest.Mux.

Jump to

Keyboard shortcuts

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