Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisallowNonValidatedFields

func DisallowNonValidatedFields(next goyave.Handler) goyave.Handler

DisallowNonValidatedFields validates that all fields in the request are validated by the RuleSet. Returns "422 Unprocessable Entity" and an error message if the user has sent non-validated field(s). Fields ending with "_confirmation" are ignored. If the body parsing failed, this middleware immediately passes to the next handler.

func Gzip

func Gzip() goyave.Middleware

Gzip compresses HTTP responses with default compression level for clients that support it via the 'Accept-Encoding' header.

func GzipLevel

func GzipLevel(level int) goyave.Middleware

GzipLevel compresses HTTP responses with specified compression level for clients that support it via the 'Accept-Encoding' header.

The compression level should be gzip.DefaultCompression, gzip.NoCompression, or any integer value between gzip.BestSpeed and gzip.BestCompression inclusive.

func Trim

func Trim(next goyave.Handler) goyave.Handler

Trim removes all leading and trailing white space from string fields.

Types

This section is empty.

Directories

Path Synopsis