http

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// QueryDefaultOffset default query offset
	QueryDefaultOffset = 0
	// QueryDefaultLimit default query limit
	QueryDefaultLimit = 100
	// QueryMaxLimit default query max
	QueryMaxLimit = 100
	// MaxBatchSize max batch size
	MaxBatchSize = 100
	// MaxQuerySize max query size
	MaxQuerySize = 100
)

Variables

This section is empty.

Functions

func ParseOffsetAndLimit

func ParseOffsetAndLimit(query map[string]string) (uint32, uint32, error)

ParseOffsetAndLimit 统一格式化处理Offset和limit参数

func ParseQueryLimit

func ParseQueryLimit(limit string) (uint32, error)

ParseQueryLimit 格式化处理limit参数

func ParseQueryOffset

func ParseQueryOffset(offset string) (uint32, error)

ParseQueryOffset 格式化处理offset参数

func ParseQueryParams

func ParseQueryParams(req *http.Request) map[string]string

ParseQueryParams 解析并获取HTTP的query params

func ParseWildName

func ParseWildName(name string) (string, bool)

ParseWildName 判断是否为格式化查询条件并且返回真正的查询信息

Types

This section is empty.

Jump to

Keyboard shortcuts

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