querytool

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryParamError

type QueryParamError struct {
	Param   string `json:"param"`
	Message string `json:"message"`
}

QueryParamError 定義參數驗證錯誤的結構

type QueryParamResult

type QueryParamResult struct {
	Params map[string]string `json:"params"`
	Errors []QueryParamError `json:"errors"`
}

QueryParamResult 定義返回的結構

func ParseAndValidateDynamicQueryParams

func ParseAndValidateDynamicQueryParams(c *fiber.Ctx, rules map[string]string, customValidator ...Validator) (*QueryParamResult, error)

ParseAndValidateDynamicQueryParams 解析並驗證動態 Query Parameters

type Validator

type Validator interface {
	Var(field interface{}, tag string) error
}

Validator 定義驗證器接口,允許自定義驗證器

var DefaultValidator Validator = validator.New()

DefaultValidator 預設的驗證器實例

Jump to

Keyboard shortcuts

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