httputil

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveSpacePointer

func RemoveSpacePointer(s *string) *string

RemoveSpacePointer remove all spaces from a pointer string

func ReqID

func ReqID(c echo.Context) (int, error)

ReqID returns id url parameter.

func ReqIDint64

func ReqIDint64(c echo.Context) (int64, error)

ReqIDint64 returns id url parameter. Support int64

func ReqListQuery

func ReqListQuery(c echo.Context) (*dbutil.ListQueryCondition, error)

ReqListQuery parses url query string for listing request

func TrimSpacePointer

func TrimSpacePointer(s *string) *string

TrimSpacePointer trims leading and trailing spaces from a pointer string

Types

type ListRequest

type ListRequest struct {
	// Number of records per page
	Limit int `json:"l,omitempty" query:"l" default:"25"`
	// Current page number
	Page int `json:"p,omitempty" query:"p" default:"1"`
	// Field name for sorting
	Sort string `json:"s,omitempty" query:"s"`
	// Sort direction order must be one of ASC, DESC
	Order string `json:"o,omitempty" query:"o" enums:"ASC,DESC" default:"ASC"`
	// JSON string of filter. E.g: {"field_name":"value"}
	Filter string `json:"f,omitempty" query:"f"`

} // @name ListRequest

ListRequest holds data of listing request from react-admin Note: To add these parameters to swagger:operation, check the file /internal/util/swagger

Jump to

Keyboard shortcuts

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