cmdtest

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyConditionalTransport

type AnyConditionalTransport struct {
	ConditionalTransports []ConditionalTransport
}

func (*AnyConditionalTransport) RoundTrip

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

type BodyTransport

type BodyTransport struct {
	Body    io.ReadCloser
	Status  int
	Headers map[string][]string
}

func (*BodyTransport) RoundTrip

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

type ConditionalTransport

type ConditionalTransport struct {
	Transport http.RoundTripper
	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