httpserver

package
v2.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContentEncodingNotSupported = errors.New("Content-Encoding not supported")
)

Errors returned by DecompressedReader

Functions

func CompressBuffer

func CompressBuffer(payload []byte) *bytes.Buffer

CompressBuffer GZip-compresses the payload into a buffer, and returns it.

func DecompressedReader

func DecompressedReader(request *http.Request) (io.ReadCloser, error)

DecompressedReader returns a reader that decompresses the body. The compression scheme is determined by the Content-Encoding header. Closing the returned reader is the caller's responsibility.

func RegisterTestRoutes

func RegisterTestRoutes(r *mux.Router, auther jwtauth.Authenticator)

RegisterTestRoutes registers some routes that should only be used for testing.

func RootPath

func RootPath(fileToFind string) string

RootPath returns the filename prefix to find bundled files. Files are searched for relative to the current working directory as well as relative to the currently running executable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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