Documentation ¶
Overview ¶
Copyright 2023 Kapeta Inc. SPDX-License-Identifier: MIT
Index ¶
- func GetBody[T any](ctx echo.Context, returnValue *T) error
- func GetHeaderParams[T any](ctx echo.Context, key string, returnValue *T) error
- func GetPathParams[T any](ctx echo.Context, key string, returnValue *T) error
- func GetQueryParam[T any](ctx echo.Context, key string, returnValue *T) error
- func GetRequestParameters[T any](req *http.Request, param *T) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBody ¶
GetBody function takes two arguments: an echo context and a pointer to the return value. It used a JSON decoder to convert the request body into the return value. If the decoding fails, the function returns an error.
func GetHeaderParams ¶
GetHeaderParams function takes three arguments: an echo context, a string key, and a pointer to the return value. It returns the value of the key from the header parameters. If the key is not found, the function returns an error.
func GetPathParams ¶
GetPathParams function takes three arguments: an echo context, a string key, and a pointer to the return value. It returns the value of the key from the path parameters. If the key is not found, the function returns an error.
func GetQueryParam ¶
GetQueryParam function takes three arguments: an echo context, a string key, and a pointer to the return value. It returns the value of the key from the query parameters like /test?key=value If the key is not found, the function returns an error.
Types ¶
This section is empty.