|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- // Code generated by goctl. DO NOT EDIT.
- package handler
-
- import (
- "net/http"
-
- ai "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/ai"
- core "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/core"
- hpc "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/hpc"
- image "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/image"
- storage "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/storage"
- "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
-
- "github.com/zeromicro/go-zero/rest"
- )
-
- func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/core/scheduleTaskByYaml",
- Handler: core.ScheduleTaskByYamlHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/core/scheduleTask",
- Handler: core.ScheduleTaskHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/taskList",
- Handler: core.TaskListHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/jobTotal",
- Handler: core.JobTotalHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/listCenter",
- Handler: core.ListCenterHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/listCluster/:centerId",
- Handler: core.ListClusterHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/core/submitJob",
- Handler: core.SubmitJobHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/getRegion",
- Handler: core.GetRegionHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/listRegion",
- Handler: core.ListRegionHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/getComputingPower",
- Handler: core.GetComputingPowerHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/getGeneralInfo",
- Handler: core.GetGeneralInfoHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/listDomainResource",
- Handler: core.ListDomainResourceHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/core/getResourcePanelConfigHandler",
- Handler: core.GetResourcePanelConfigHandler(serverCtx),
- },
- {
- Method: http.MethodPut,
- Path: "/core/resourcePanelConfigHandler",
- Handler: core.PutResourcePanelConfigHandler(serverCtx),
- },
- },
- rest.WithPrefix("/pcm/v1"),
- )
-
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodGet,
- Path: "/hpc/listJob",
- Handler: hpc.ListJobHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/hpc/listHistoryJob",
- Handler: hpc.ListHistoryJobHandler(serverCtx),
- },
- },
- rest.WithPrefix("/pcm/v1"),
- )
-
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodGet,
- Path: "/ai/listDataSet/:projectId",
- Handler: ai.ListDataSetHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/createDataSet/:projectId",
- Handler: ai.CreateDataSetHandler(serverCtx),
- },
- {
- Method: http.MethodDelete,
- Path: "/ai/deleteDataSet/:projectId/:datasetId",
- Handler: ai.DeleteDataSetHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/CreateTask/:projectId/:datasetId",
- Handler: ai.CreateTaskHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/ListImport/:projectId/:datasetId",
- Handler: ai.ListImportHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/GetListTrainingJobs/:projectId",
- Handler: ai.GetListTrainingJobsHandler(serverCtx),
- },
- {
- Method: http.MethodDelete,
- Path: "/ai/DeleteTrainingJob/:projectId/:trainingJobId",
- Handler: ai.DeleteTrainingJobHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/CreateAlgorithm/:projectId",
- Handler: ai.CreateAlgorithmHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/ListAlgorithms/:projectId",
- Handler: ai.ListAlgorithmsHandler(serverCtx),
- },
- {
- Method: http.MethodDelete,
- Path: "/ai/DeleteAlgorithm/:projectId/:algorithmId",
- Handler: ai.DeleteAlgorithmHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/CreateTrainingJob/:projectId",
- Handler: ai.CreateTrainingJobHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/ShowAlgorithmByUuid/:projectId/:algorithmId",
- Handler: ai.ShowAlgorithmByUuidHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/CreateExportTask/:projectId/:datasetId",
- Handler: ai.CreateExportTaskHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/GetExportTasksOfDataset/:projectId/:datasetId",
- Handler: ai.GetExportTasksOfDatasetHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/GetExportTaskStatusOfDataset/:projectId/:resourceId/:taskId",
- Handler: ai.GetExportTaskStatusOfDatasetHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/CreateProcessorTask",
- Handler: ai.CreateProcessorTaskHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/CreateService/:projectId",
- Handler: ai.CreateServiceHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/ListServices/:projectId",
- Handler: ai.ListServicesHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/ShowService/:projectId/:serviceId",
- Handler: ai.ShowServiceHandler(serverCtx),
- },
- {
- Method: http.MethodDelete,
- Path: "/ai/DeleteService/:projectId/:serviceId",
- Handler: ai.DeleteServiceHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/ListClusters",
- Handler: ai.ListClustersHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/listNotebook",
- Handler: ai.ListNotebookHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/createNotebook",
- Handler: ai.CreateNotebookHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/startNotebook",
- Handler: ai.StartNotebookHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/stopNotebook",
- Handler: ai.StopNotebookHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/getNotebookStorage",
- Handler: ai.GetNotebookStorageHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/mountNotebookStorage",
- Handler: ai.MountNotebookStorageHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/ai/getVisualizationJob",
- Handler: ai.GetVisualizationJobHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/ai/CreateVisualizationJob",
- Handler: ai.CreateVisualizationJobHandler(serverCtx),
- },
- },
- rest.WithPrefix("/pcm/v1"),
- )
-
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodGet,
- Path: "/storage/screenStorage",
- Handler: storage.ScreenStorageHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/storage/dailyPowerScreen",
- Handler: storage.DailyPowerScreenHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/storage/perCenterComputerPowers",
- Handler: storage.PerCenterComputerPowersHandler(serverCtx),
- },
- },
- rest.WithPrefix("/pcm/v1"),
- )
-
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/upload",
- Handler: image.UploadHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/chunk",
- Handler: image.ChunkHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/image/list",
- Handler: image.ImageListHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/dataSet/check/:fileMd5",
- Handler: image.DataSetCheckHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/dataSet/upload",
- Handler: image.UploadDataSetHandler(serverCtx),
- },
- },
- rest.WithPrefix("/pcm/v1"),
- )
- }
|