middlewares

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler struct{}

func (*ErrorHandler) Wrap

func (e *ErrorHandler) Wrap(handler func(w http.ResponseWriter, r *http.Request) error) http.HandlerFunc

type ValidationResult

type ValidationResult struct {
	Result bool     `json:"result"`
	Error  []string `json:"error"`
}

ValidationResult holds the result of the gojsonschema validator

func JSONSchemaValidator

func JSONSchemaValidator(schema string, data interface{}) (ValidationResult, error)

type Validator

type Validator struct{}

func (*Validator) ValidateRequest

func (f *Validator) ValidateRequest(schemas map[string]string, next http.HandlerFunc) http.HandlerFunc

Jump to

Keyboard shortcuts

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