jupyter.api 2.1 KB

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