siteinfotest

package
v0.1.69 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailingProvider

type FailingProvider struct{}

FailingProvider always fails.

func (FailingProvider) Get

func (prov FailingProvider) Get(string) (*http.Response, error)

type FailingReadCloser

type FailingReadCloser struct{}

FailingReadCloser is ReadCloser that fails.

func (FailingReadCloser) Close

func (FailingReadCloser) Close() error

func (FailingReadCloser) Read

func (FailingReadCloser) Read(p []byte) (n int, err error)

type FailingReadProvider

type FailingReadProvider struct{}

FailingReadProvider returns a Body whose Read() method always fails.

func (FailingReadProvider) Get

type FileReaderProvider

type FileReaderProvider struct {
	Path           string
	MustFailToRead bool
}

FileReaderProvider implements an HTTPProvider but the response's content comes from a configurable file.

func (FileReaderProvider) Get

type StringProvider

type StringProvider struct {
	Response string
}

StringProvider implements an HTTPProvider but the response's content is a fixed string.

func (StringProvider) Get

func (prov StringProvider) Get(string) (*http.Response, error)

Jump to

Keyboard shortcuts

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