Help us shape the future of Go! Take the 2026 Go Developer Survey

query

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxNestedMapDepth = 100

MaxNestedMapDepth is the maximum depth of nesting of single map key in query params.

Variables

This section is empty.

Functions

func GetMap

func GetMap(query map[string][]string, filteredKey string) (map[string]interface{}, error)

GetMap returns a map, which satisfies conditions.

func ParseSearchParams

func ParseSearchParams[T any](c *gin.Context) (*filter.SearchParams[T], error)

ParseSearchParams parses search params from the query string into a SearchParams struct with conditions of a given type.

func ShouldGetQueryNestedMap

func ShouldGetQueryNestedMap(c *gin.Context) (dict map[string]any, err error)

ShouldGetQueryNestedMap returns a map from query params. In contrast to QueryMap it handles nesting in query maps like key[foo][bar]=value.

func ShouldGetQueryNestedMapForKey

func ShouldGetQueryNestedMapForKey(c *gin.Context, key string) (dict map[string]any, err error)

ShouldGetQueryNestedMapForKey returns a map from query params for a given query key. In contrast to QueryMap it handles nesting in query maps like key[foo][bar]=value. Similar to ShouldGetQueryNestedMap but it returns only the map for the given key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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