handler

package
v0.0.0-...-059733a Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultInputBinder

func DefaultInputBinder[T any](c echo.Context) (T, error)

func NewHandler

func NewHandler[T any](inputHandler Handler[T], opts ...Option[T]) echo.HandlerFunc

func NewValidateHandler

func NewValidateHandler[T any](inputHandler Handler[T], validate *validator.Validate, opts ...Option[T]) echo.HandlerFunc

Types

type Handler

type Handler[T any] func(echo.Context, T) error

type InputBinder

type InputBinder[T any] func(echo.Context) (T, error)

type InputValidator

type InputValidator[T any] func(T) error

type Option

type Option[T any] func(*handler[T])

func WithInputBinder

func WithInputBinder[T any](inputBinder InputBinder[T]) Option[T]

func WithInputValidator

func WithInputValidator[T any](inputValidator InputValidator[T]) Option[T]

func WithValidateInputValidator

func WithValidateInputValidator[T any](validate *validator.Validate) Option[T]

Jump to

Keyboard shortcuts

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