routing.go 400 B

123456789101112131415161718
  1. package httpserver
  2. import (
  3. "github.com/gin-gonic/gin"
  4. )
  5. /*
  6. Registers the exposed route to utilize the handler function
  7. :param e: pointer to a gin.Engine struct
  8. :param cfg: pointer to an HttpServerConfig struct
  9. */
  10. func RegisterRoutes(e *gin.Engine, cfg *HttpServerConfig, rmaps map[string]*RouteMapping) {
  11. c := NewController(cfg, rmaps)
  12. web := e.Group("")
  13. web.Any("/*ProxiedPath", c.Get)
  14. }