jupyter.api 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. IngressClass string `json:"ingress_class" default:""`
  22. }
  23. DeleteJupyterInfo {
  24. ReleaseName string `json:"release_name"`
  25. Namespace string `json:"namespace"`
  26. }
  27. ReleaseInfo {
  28. Namespace string `json:"namespace"`
  29. Filter string `json:"filter"`
  30. }
  31. ReleaseStatus {
  32. Namespace string `json:"namespace"`
  33. Name string `json:"name"`
  34. Revision string `json:"revision"`
  35. Updated string `json:"updated"`
  36. Status string `json:"status"`
  37. Chart string `json:"chart"`
  38. ChartVersion string `json:"chart_version"`
  39. AppVersion string `json:"app_version"`
  40. }
  41. )
  42. service jupyter-api {
  43. @handler GreetHandler
  44. get /helm/ping returns (Response)
  45. }
  46. service jupyter-api {
  47. @handler PasswordHandler
  48. get /helm/password (PasswordRequest) returns (Response)
  49. }
  50. service jupyter-api {
  51. @doc(
  52. summary: 启动/创建jupyterlab服务
  53. )
  54. @handler StartOpHandler
  55. post /helm/ops/start (CreateJupyterInfo) returns (Response)
  56. @doc(
  57. summary: 停止jupyterlab服务
  58. )
  59. @handler StopOpHandler
  60. post /helm/ops/stop (DeleteJupyterInfo) returns (Response)
  61. @doc(
  62. summary: 更新jupyterlab服务
  63. )
  64. @handler UpgradeOpHandler
  65. post /helm/ops/upgrade (CreateJupyterInfo) returns (Response)
  66. @doc(
  67. summary: 查看release状态
  68. )
  69. @handler StatusOpHandler
  70. post /helm/ops/status (ReleaseInfo) returns (Response)
  71. }