Documentation ¶
Index ¶
- Variables
- func EncodePassword(password []byte, salt []byte) ([]byte, error)
- func GenerateJWT(username string) string
- func GetIntQueryValue(c *gin.Context, key string, defaults int) int
- func GetRequestHistoryKey(linkId string) string
- func GetShortLinkKey(id string) string
- func GetShortLinksKey() string
- func GetUserKey() string
- func GetUserShortLinksKey(username string) string
- func RandStringRunes(n int) string
- func RandomSalt(size int) ([]byte, error)
- func TrimShortLinkId(s string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var SecretKey = os.Getenv("SECRET_KEY")
Functions ¶
func GenerateJWT ¶
func GetIntQueryValue ¶
获取指定 URL Query 参数的值(整数类型)
func GetRequestHistoryKey ¶
func GetShortLinkKey ¶
func GetShortLinksKey ¶
func GetShortLinksKey() string
func GetUserKey ¶
func GetUserKey() string
func GetUserShortLinksKey ¶
func RandStringRunes ¶
func TrimShortLinkId ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.