jupyter.api 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. type (
  2. Response {
  3. Data interface{} `json:"data"`
  4. Code int `json:"code"`
  5. }
  6. PasswordRequest {
  7. Password string `json:"password"`
  8. }
  9. CreateJupyterInfo {
  10. Password string `json:"password"`
  11. Workspace string `json:"workspace"`
  12. Image string `json:"image"`
  13. Tag string `json:"tag"`
  14. BaseUrl string `json:"base_url"`
  15. Host string `json:"host"`
  16. Path string `json:"path"`
  17. PathType string `json:"path_type"`
  18. ReleaseName string `json:"release_name"`
  19. Namespace string `json:"namespace"`
  20. Chart string `json:"chart"`
  21. }
  22. DeleteJupyterInfo {
  23. ReleaseName string `json:"release_name"`
  24. Namespace string `json:"namespace"`
  25. }
  26. ReleaseInfo {
  27. Namespace string `json:"namespace"`
  28. Filter string `json:"filter"`
  29. }
  30. ReleaseStatus {
  31. Namespace string `json:"namespace"`
  32. Name string `json:"name"`
  33. Revision string `json:"revision"`
  34. Updated string `json:"updated"`
  35. Status string `json:"status"`
  36. Chart string `json:"chart"`
  37. ChartVersion string `json:"chart_version"`
  38. AppVersion string `json:"app_version"`
  39. }
  40. )
  41. service jupyter-api {
  42. @handler GreetHandler
  43. get /helm/ping returns (Response)
  44. }
  45. service jupyter-api {
  46. @handler PasswordHandler
  47. get /helm/password (PasswordRequest) returns (Response)
  48. }
  49. service jupyter-api {
  50. @doc(
  51. summary: 启动/创建jupyterlab服务
  52. )
  53. @handler StartOpHandler
  54. post /helm/ops/start (CreateJupyterInfo) returns (Response)
  55. @doc(
  56. summary: 停止jupyterlab服务
  57. )
  58. @handler StopOpHandler
  59. post /helm/ops/stop (DeleteJupyterInfo) returns (Response)
  60. @doc(
  61. summary: 更新jupyterlab服务
  62. )
  63. @handler UpgradeOpHandler
  64. post /helm/ops/upgrade (CreateJupyterInfo) returns (Response)
  65. @doc(
  66. summary: 查看release状态
  67. )
  68. @handler StatusOpHandler
  69. post /helm/ops/status (ReleaseInfo) returns (Response)
  70. }