routes.go 461 B

12345678910111213141516171819202122232425
  1. // Code generated by goctl. DO NOT EDIT.
  2. package handler
  3. import (
  4. "net/http"
  5. "shorturl/api/internal/svc"
  6. "github.com/tal-tech/go-zero/rest"
  7. )
  8. func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
  9. engine.AddRoutes([]rest.Route{
  10. {
  11. Method: http.MethodGet,
  12. Path: "/shorten",
  13. Handler: shortenHandler(serverCtx),
  14. },
  15. {
  16. Method: http.MethodGet,
  17. Path: "/expand",
  18. Handler: expandHandler(serverCtx),
  19. },
  20. })
  21. }