jupyter.api 2.0 KB

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