testing

package
v0.0.0-...-4eaaba6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2014 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionalTransport

type ConditionalTransport struct {
	Transport
	CondFunc func(*http.Request) bool
}

func (*ConditionalTransport) RoundTrip

func (t *ConditionalTransport) RoundTrip(req *http.Request) (*http.Response, error)

type FailingFakeGuesser

type FailingFakeGuesser struct {
	FakeGuesser
	ErrorMessage string
}

FailingFakeGuesser is a guesser that fails in the GuessName call, with the given error message.

func (*FailingFakeGuesser) GuessName

func (f *FailingFakeGuesser) GuessName(path string) (string, error)

type FakeGuesser

type FakeGuesser struct {
	Name string
	// contains filtered or unexported fields
}

FakeGuesser represents a fake implementation of the Guesser described in the cmd package.

func (*FakeGuesser) GuessName

func (f *FakeGuesser) GuessName(path string) (string, error)

func (*FakeGuesser) HasGuess

func (f *FakeGuesser) HasGuess(path string) bool

HasGuess checks whether a guess call has been recorded with the given path.

type MultiConditionalTransport

type MultiConditionalTransport struct {
	ConditionalTransports []ConditionalTransport
}

func (*MultiConditionalTransport) RoundTrip

func (m *MultiConditionalTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Transport

type Transport struct {
	Message string
	Status  int
	Headers map[string][]string
}

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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