Documentation
¶
Index ¶
- Variables
- func GET(url string) (body string, err error)
- func GetPage(c *gin.Context) (int, error)
- func GetPageSize(c *gin.Context) (int, error)
- func GetParamFromURI(c *gin.Context, key string) (int, error)
- func GetQueryNumber(c *gin.Context, key string, defaultValue int) int
- func GetUrlParam(sourceUrl, paramName string) string
- func IsLocalIp(ip string) (bool, error)
- func NewRequestForward(c *gin.Context, url string) (*http.Response, error)
- func OpenUri(uri string) error
- func POST(url string, data string) (body string, err error)
- func PostFile(url, filename, fileTag string, params map[string]string) (int, map[string][]string, string, error)
- func QueryEncode(value string) string
- func RespFAIL(c *gin.Context, code int, msg string)
- func RespSUCESS(c *gin.Context, data interface{})
- func Response(c *gin.Context, httpCode int, code int, msg string, data interface{})
- func ScanRequestBody(c *gin.Context, params interface{}) error
- func ToQueryString(values map[string]interface{}, args ...bool) string
- func UrlDecode(sourceUrl string) string
- func UrlEncode(sourceUrl string) string
- type Gin
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "0.1.0"
Functions ¶
func NewRequestForward ¶
转发请求
func PostFile ¶ added in v0.0.9
func PostFile(url, filename, fileTag string, params map[string]string) (int, map[string][]string, string, error)
* 上传文件 *
func ScanRequestBody ¶
func ToQueryString ¶
* 字典转URL查询字符串 *
Types ¶
Click to show internal directories.
Click to hide internal directories.