Documentation ¶
Index ¶
- func Empty(val interface{}) bool
- func GenerateCaptcha() (id, bs64 string, err error)
- func GetCpuPercent() float64
- func GetDiskPercent() float64
- func GetMemPercent() float64
- func GetTime() (retTime string)
- func IsEnv(eType string) bool
- func IsGet(c *gin.Context) bool
- func IsProd() bool
- func Md5(str string) string
- func NowTime() interface{}
- func OSSUploadFile(c *gin.Context) (bool, string)
- func OssUpload(key string, file io.Reader) (string, error)
- func RandomString(length int) string
- func ReadImgData(url string) []byte
- func RepImages(htmls string) string
- func Upload(url string) string
- func Uploads(str []interface{}) []interface{}
- func Verify(id, value string) bool
- type Captcha
- type Merge
- type Pagination
- type PongoHTML
- type PongoRender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCpuPercent ¶
func GetCpuPercent() float64
func GetDiskPercent ¶
func GetDiskPercent() float64
func GetMemPercent ¶
func GetMemPercent() float64
func RepImages ¶
RepImages 上传给定内容中非本站的图片,并替换为上传的图片链接 https://zhuanlan.zhihu.com/p/74047342
Types ¶
type Merge ¶
func (*Merge) Interface2Type ¶
func (m *Merge) Interface2Type(inter interface{})
Interface2Type 实现传任意多个任意类型的参数 https://github.com/JLynnLee/learnGrammar/blob/1e0f16e5af8ea2ac44e7b5ca93b6af3f0d41ceb1/main.go
type Pagination ¶
Pagination 分页器
func NewPagination ¶
func NewPagination(req *http.Request, total int, pernum int) *Pagination
NewPagination 新建分页器
type PongoHTML ¶
func (*PongoHTML) WriteContentType ¶
func (p *PongoHTML) WriteContentType(w http.ResponseWriter)
type PongoRender ¶
type PongoRender struct {
TmplDir string
}
func NewRender ¶
func NewRender(tmplDir string) *PongoRender
Click to show internal directories.
Click to hide internal directories.