binder

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binder

type Binder struct {
	// contains filtered or unexported fields
}

Binder binds request data, normalizes it, applies defaults, and validates the result.

func New

func New() (*Binder, error)

New creates a request binder.

func (*Binder) Bind

func (b *Binder) Bind(c *echo.Context, target any) error

Bind implements echo.Binder.

type ValidationMessenger

type ValidationMessenger interface {
	ValidationMessage(field, rule string) string
}

ValidationMessenger optionally supplies feature-specific field messages on a request type. Field is the JSON field name and rule is the failed validator tag. Return an empty string to use the binder's shared message. Messages appear next to the field, so they should explain how to fix it without repeating its name.

Jump to

Keyboard shortcuts

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