server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a mock conduit server.

func New

func New() *Server

New creates a new empty conduit server.

func (*Server) Close

func (s *Server) Close()

Close shuts down the server. This should be called at the end of every test or by using defer.

func (*Server) GetURL

func (s *Server) GetURL() string

GetURL returns the URL of the root of the server.

func (*Server) RegisterCapabilities

func (s *Server) RegisterCapabilities()

RegisterCapabilities adds a default handler for the `conduit.getcapabilities` API endpoint.

func (*Server) RegisterMethod

func (s *Server) RegisterMethod(
	method string,
	httpCode int,
	response map[string]interface{},
)

RegisterMethod adds a handler for a specific conduit API method.

Jump to

Keyboard shortcuts

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