common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(c *gin.Context, msg string, code int, data interface{})

api失败响应

func GenUUID

func GenUUID() string

生成UUID

func GenUniqid

func GenUniqid(str string) string

类似php的uniqid()

func MD5

func MD5(str string) string

获取md5哈希

func Random

func Random(c *gin.Context, method string, length int) string

生成唯一识别

func SendLineBot

func SendLineBot(text string) int

发送line bot通知

func SendMail

func SendMail(to string, subject string, body string, is_html bool) int

发送邮件 TODO tls待优化

func SendTelegramBot

func SendTelegramBot(text string, chat_id int64) int

发送telegram bot通知

func Success

func Success(c *gin.Context, data interface{}, msg string)

api成功响应

Types

This section is empty.

Jump to

Keyboard shortcuts

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