utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCache

func DeleteCache(key string)

func DriverDigitFunc

func DriverDigitFunc() (id, b64s string, err error)

纯数字验证码

func DriverStringFunc

func DriverStringFunc() (id, b64s string, err error)

字符串验证码 [数字+字母]

func EncodeMD5

func EncodeMD5(value string) string

func Fetch

func Fetch(url string) ([]byte, error)

get 请求

func FormatPager

func FormatPager(page, size string) (int, int)

格式化 页码和页容量

func GetCache

func GetCache(key string) (interface{}, bool)

func GetGuid

func GetGuid() string

生成一个GUID

func GetLocation

func GetLocation(ip string) string

func GetRequest

func GetRequest(url string) ([]byte, error)

get 请求

func PageHtml

func PageHtml(url string, page, size, count int) string

func PageWebHtml

func PageWebHtml(url string, page, size, count int) string

func PostRequest

func PostRequest(url, parameter string) ([]byte, error)

post 请求

func RandomInt

func RandomInt(n int) string

func RandomString

func RandomString(n int) string

func SetCache

func SetCache(key string, data interface{}, timeout int)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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