request

package
v0.0.0-...-bb36b98 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadID

func ReadID(r *http.Request) (uuid.UUID, error)

ReadID reads "{id}" path value from the URL and parses it into uuid.UUID. It works with `go-chi/chi` and standard `http` routers.

func ReadJSON

func ReadJSON[T any](r *http.Request) (*T, error)

ReadJSON decodes the JSON body into struct.

func ReadURLQuery

func ReadURLQuery[T any](r *http.Request) (*T, error)

ReadURLQuery maps URL query into struct using `schema` tags. It supports primitive types, time.Time, and uuid.UUID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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