internal

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowedPunctuationInFilenames = nonWindowsPunct

Functions

func CompleteTheLogging added in v0.6.0

func CompleteTheLogging(res *http.Response, err error, item *logging.LogItem, log ILogger, level logging.Level) (*http.Response, error)

func FileExtension added in v0.7.0

func FileExtension(mimeType string) string

func FilenameTimestamp added in v0.6.0

func FilenameTimestamp(t time.Time) string

func Hostname added in v0.8.0

func Hostname(hdrs http.Header) string

func IsTextual added in v0.6.0

func IsTextual(contentType string) bool

IsTextual tests a media type (a.k.a. content type) to determine whether it describes text or binary content.

func PrepareTheLogItem

func PrepareTheLogItem(req *http.Request, level logging.Level) *logging.LogItem

func PrettyPrinterFactory added in v0.7.0

func PrettyPrinterFactory(extension string) transcoder

func PrintPart added in v0.6.0

func PrintPart(out io.Writer, fs afero.Fs, hdrs http.Header, isRequest bool, file string, body []byte, longBodyThreshold int)

func UrlToFilename added in v0.6.0

func UrlToFilename(path string) string

func WriteBodyToFile added in v0.7.0

func WriteBodyToFile(out io.Writer, fs afero.Fs, name, extn string, body []byte)

Types

type ILogger added in v0.6.0

type ILogger func(item *logging.LogItem)

Jump to

Keyboard shortcuts

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