12345678910111213141516171819202122 |
- package route
- import (
- "github.com/gin-gonic/gin"
- "kpt-event/http/api"
- "kpt-event/http/debug"
- )
- func DebugAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
- return func(s *gin.Engine) {
- for _, opt := range opts {
- opt(s)
- }
- // Not Found
- s.NoRoute(api.Handle404)
- debugRoute := authRouteGroup(s, "/api/v1/kpt/debug/")
- // kpt debug api
- debugRoute.GET("hello", debug.HelloOk)
- }
- }
|