testing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidURL = `http://[fe80::1%en0]/`

InvalidURL an invalid url as in RFC 6874 Source: https://golang.org/src/net/url/url_test.go

View Source
const TransparentDataURI = `data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`

TransparentDataURI a valid data uri for (probably) the smallest transparent gif Source: http://stackoverflow.com/questions/6018611/smallest-data-uri-image-possible-for-a-transparent-image

Variables

This section is empty.

Functions

func FsCreate

func FsCreate(fs cacher.Fs, name string) (cacher.File, error)

FsCreate works similar to os.Create

func FsReadFile

func FsReadFile(fs cacher.Fs, name string) ([]byte, error)

FsReadFile works similar to os.ReadFile

func Logger

func Logger() *logrus.Logger

Logger returns an instance of logger

func NewCSSResponder

func NewCSSResponder(css string) httpmock.Responder

NewCSSResponder returns a new responder with css content type

func NewFs

func NewFs() cacher.Fs

NewFs returns an in memory file system

func NewHTMLMarkup

func NewHTMLMarkup(body string) string

NewHTMLMarkup returns html wraps around given body mark up

func NewHTMLResponder

func NewHTMLResponder(html string) httpmock.Responder

NewHTMLResponder returns a new responder with html content type

func NewRedirectResponder

func NewRedirectResponder(status int, location string) httpmock.Responder

NewRedirectResponder returns a new responder with Location header

func NewSlowResponder

func NewSlowResponder(duration time.Duration) httpmock.Responder

NewSlowResponder returns a new responder that takes its time to respond

Types

This section is empty.

Jump to

Keyboard shortcuts

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