request

package
v0.0.0-...-db6235c Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterRequest

type FilterRequest struct {
	Filter    string `form:"filter" binding:"omitempty"`
	SortBy    string `form:"sort_by" binding:"omitempty,required_with=sort_order"`
	SortOrder string `form:"sort_order" binding:"omitempty,required_with=sort_by,oneof=asc desc"`
	Page      int    `form:"page" binding:"omitempty,numeric,gte=1"`
	PerPage   int    `form:"per_page" binding:"omitempty,numeric,gte=1,lte=50"`
}

This request works as a generic struct when we have to filter a list

Jump to

Keyboard shortcuts

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