Documentation
¶
Index ¶
- Constants
- func GetFullURLFromGinCtx(c *gin.Context) string
- func LarkEventHandler(c *gin.Context)
- func PerformanceMonitor() gin.HandlerFunc
- func RegRouter(router *gin.Engine, db *gorm.DB, iamCli *authcli.Cli, APIGroup string, ...)
- func RegisterCallbacks(router gin.IRouter)
- func RegisterRoutes(router gin.IRouter, db *gorm.DB, iamCli *authcli.Cli)
- func SetupShortURLRoutes(router *gin.Engine)
- func SetupStaticFileServer(router gin.IRouter, staticDir string, apiGroup string)
- type Callback
- type ChallengeResp
- type Header
- type ShortURLEntry
Constants ¶
View Source
const ( ShortURLLen = 8 ShortURLTTL = 30 * 365 * 24 * time.Hour // 约30年 ShortURLRoute = "/utils/s/" )
View Source
const (
IndexFile = "index.html"
)
Variables ¶
This section is empty.
Functions ¶
func GetFullURLFromGinCtx ¶
GetFullURLFromGinCtx 从 Gin 上下文中获取完整的 URL, 处理 X-Original-URI, X-Forwarded-Proto 和 X-Forwarded-Host 头 网关代理场景下,可能进行 redirect 操作,此时可以通过设置 X-Original-URI 头来指定原始 URI
func LarkEventHandler ¶
func PerformanceMonitor ¶
func PerformanceMonitor() gin.HandlerFunc
func RegisterCallbacks ¶
func RegisterRoutes ¶
RegisterRoutes - routers all in one todo: using rpc
func SetupShortURLRoutes ¶
SetupShortURLRoutes 设置短网址相关路由
Types ¶
type ChallengeResp ¶
type ShortURLEntry ¶
Click to show internal directories.
Click to hide internal directories.