Documentation ¶
Index ¶
- Constants
- Variables
- func CustomShortURL(key string) string
- func GenerateJWT(userId, email string) (string, error)
- func Hash(p string) (string, error)
- func IsValidURL(u string) bool
- func JwtAuthMiddleware() gin.HandlerFunc
- func MakeShortURL() (string, string)
- func QueryParamMiddleware(param string) gin.HandlerFunc
- func RateLimitMiddleware(rdb *redis.Client, db *gorm.DB, limit, burst int) gin.HandlerFunc
- func RemoveExpiredUrls(db *gorm.DB)
- func SendVerify(email string) (string, error)
- func VerifyHash(hash string, plain string) (bool, error)
Constants ¶
View Source
const CHARSET string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
Variables ¶
View Source
var CurrentTime = func() time.Time { return time.Now() }
Functions ¶
func CustomShortURL ¶ added in v1.3.2
func GenerateJWT ¶
func IsValidURL ¶
func JwtAuthMiddleware ¶ added in v1.5.3
func JwtAuthMiddleware() gin.HandlerFunc
func MakeShortURL ¶
func QueryParamMiddleware ¶ added in v1.5.3
func QueryParamMiddleware(param string) gin.HandlerFunc
func RateLimitMiddleware ¶ added in v1.5.3
func RateLimitMiddleware(rdb *redis.Client, db *gorm.DB, limit, burst int) gin.HandlerFunc
func RemoveExpiredUrls ¶ added in v1.1.2
func SendVerify ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.