routes.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Code generated by goctl. DO NOT EDIT.
  2. package handler
  3. import (
  4. "net/http"
  5. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  6. "git.i2edu.net/i2/go-zero/rest"
  7. )
  8. func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
  9. engine.AddRoutes(
  10. []rest.Route{
  11. {
  12. Method: http.MethodGet,
  13. Path: "/api/hello",
  14. Handler: HelloHandler(serverCtx),
  15. },
  16. {
  17. Method: http.MethodPost,
  18. Path: "/api/auth/loginByWeixin",
  19. Handler: LoginByWeixinHandler(serverCtx),
  20. },
  21. },
  22. )
  23. engine.AddRoutes(
  24. []rest.Route{
  25. {
  26. Method: http.MethodGet,
  27. Path: "/api/user/share/jzQrcode",
  28. Handler: JzQrCodeHandler(serverCtx),
  29. },
  30. {
  31. Method: http.MethodPost,
  32. Path: "/api/user/bindMobile",
  33. Handler: BindMobileHandler(serverCtx),
  34. },
  35. {
  36. Method: http.MethodGet,
  37. Path: "/api/user/info",
  38. Handler: GetUserHandler(serverCtx),
  39. },
  40. {
  41. Method: http.MethodPost,
  42. Path: "/api/v1/part_time_user/add",
  43. Handler: PartTimeUserAddHandler(serverCtx),
  44. },
  45. {
  46. Method: http.MethodPost,
  47. Path: "/api/v1/part_time_user/update",
  48. Handler: PartTimeUserUpdateHandler(serverCtx),
  49. },
  50. },
  51. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  52. )
  53. }