httpreq

package
v0.0.0-...-a7ad5ca Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package httpreq parses and validates Echo request inputs for HTTP adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindAndValidate

func BindAndValidate(c *echo.Context, req any) error

BindAndValidate binds a JSON request body and runs the server validator.

func BindIDs

func BindIDs(c *echo.Context) ([]int64, error)

BindIDs binds and validates a batch-operation request body carrying IDs: at least one ID and every ID positive.

func Pagination

func Pagination(c *echo.Context) (int, int, error)

Pagination parses standard page and page_size query parameters, applying the platform default page size when page_size is omitted.

func PathID

func PathID(c *echo.Context, name, label string) (int64, error)

PathID parses a positive int64 path parameter.

func QueryBool

func QueryBool(c *echo.Context, name string, fallback bool) (bool, error)

QueryBool parses an optional bool query parameter.

func QueryInt

func QueryInt(c *echo.Context, name string, fallback int) (int, error)

QueryInt parses an optional int query parameter.

func QueryInt64

func QueryInt64(c *echo.Context, name string, fallback int64) (int64, error)

QueryInt64 parses an optional int64 query parameter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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