httpx

package
v0.0.10 Latest Latest
Warning

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

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

Documentation

Overview

Package httpx provides enhanced HTTP request parsing with support for nested structs, multiple array notations, default values, and complete form data handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(c echo.Context, v any, pattern string) error

Parse handles the complete parsing of an HTTP request

func ParseForm

func ParseForm(c echo.Context, v any) error

ParseForm handles both regular form data and multipart form data

func ParseHeader

func ParseHeader(headerValue string) map[string]string

ParseHeader parses a single header value that contains key-value pairs

func ParseHeaders

func ParseHeaders(c echo.Context, v any) error

ParseHeaders extracts and parses HTTP headers

func ParseJsonBody

func ParseJsonBody(c echo.Context, v any) error

ParseJsonBody handles JSON request body parsing

func ParsePath

func ParsePath(c echo.Context, v any, pattern string) error

ParsePath handles URL path parameters

func ParseQuery

func ParseQuery(c echo.Context, v any) error

ParseQuery handles URL query parameters with support for nested structs and arrays

func SetValidator

func SetValidator(val Validator)

SetValidator configures the validator used for validating parsed data

func ValidateStruct

func ValidateStruct(v any) error

ValidateStruct validates the struct fields based on the `validate` tag.

Types

type Validator

type Validator interface {
	Validate(c echo.Context, data any) error
}

Validator defines the interface for validating parsed data

Jump to

Keyboard shortcuts

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