691 lines
17 KiB
Go
691 lines
17 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
ai "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/ai"
|
|
apps "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/apps"
|
|
cloud "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/cloud"
|
|
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"
|
|
storelink "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/storelink"
|
|
vm "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/handler/vm"
|
|
"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.MethodGet,
|
|
Path: "/core/participantList",
|
|
Handler: core.ParticipantListHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/core/scheduleTaskByYaml",
|
|
Handler: core.ScheduleTaskByYamlHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/core/commitTask",
|
|
Handler: core.CommitTaskHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/core/commitHpcTask",
|
|
Handler: core.CommitHpcTaskHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/core/deleteTask/:id",
|
|
Handler: core.DeleteTaskHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/core/taskList",
|
|
Handler: core.TaskListHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/core/taskDetail/:taskId",
|
|
Handler: core.TaskDetailHandler(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),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/core/getComputilityStatistics",
|
|
Handler: core.GetComputilityStatisticsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/core/assets",
|
|
Handler: core.NodeAssetsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/core/saveHashcat",
|
|
Handler: core.SaveHashcatHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/core/getHashcat/:crackTaskId",
|
|
Handler: core.GetHashcatHandler(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),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/queue/assets",
|
|
Handler: hpc.QueueAssetsHandler(serverCtx),
|
|
},
|
|
},
|
|
rest.WithPrefix("/pcm/v1"),
|
|
)
|
|
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/task/list",
|
|
Handler: cloud.CloudListHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/cloud/DeleteYaml",
|
|
Handler: cloud.DeleteYamlHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/cloud/controller/Metrics",
|
|
Handler: cloud.ControllerMetricsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/cloud/registerCluster",
|
|
Handler: cloud.RegisterClusterHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/cloud/deleteCluster",
|
|
Handler: cloud.DeleteClusterHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/cloud/noticeTenant",
|
|
Handler: cloud.NoticeTenantHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/cloud/updateTenant",
|
|
Handler: cloud.UpdateTenantHandler(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"),
|
|
)
|
|
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/getComputeLimits",
|
|
Handler: vm.GetComputeLimitsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/getVolumeLimits",
|
|
Handler: vm.GetVolumeLimitsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listServer",
|
|
Handler: vm.ListServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listServersDetailed",
|
|
Handler: vm.ListServersDetailedHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/vm/deleteServer",
|
|
Handler: vm.DeleteServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/createServer",
|
|
Handler: vm.CreateServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/getServersDetailedById",
|
|
Handler: vm.GetServersDetailedByIdHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/vm/updateServer",
|
|
Handler: vm.UpdateServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/startServer",
|
|
Handler: vm.StartServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/stopServer",
|
|
Handler: vm.StopServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/rebootServer",
|
|
Handler: vm.RebootServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/pauseServer",
|
|
Handler: vm.PauseServerHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listImages",
|
|
Handler: vm.ListImagesHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/vm/deleteImage",
|
|
Handler: vm.DeleteImageHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/createImage",
|
|
Handler: vm.CreateImageHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/vm/uploadImage",
|
|
Handler: vm.UploadImageHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listNetworks",
|
|
Handler: vm.ListNetworksHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/vm/deleteNetwork",
|
|
Handler: vm.DeleteNetworkHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/createNetwork",
|
|
Handler: vm.CreateNetworkHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/createSubnet",
|
|
Handler: vm.CreateSubnetHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/showNetworkDetails",
|
|
Handler: vm.ShowNetworkDetailsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/vm/updateNetwork",
|
|
Handler: vm.UpdateNetworkHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/bulkCreateNetworks",
|
|
Handler: vm.BulkCreateNetworksHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listVolumesDetail",
|
|
Handler: vm.ListVolumesDetailHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/vm/deleteVolume",
|
|
Handler: vm.DeleteVolumeHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/createVolume",
|
|
Handler: vm.CreateVolumeHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listFlavorsDetail",
|
|
Handler: vm.ListFlavorsDetailHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listVolumeTypes",
|
|
Handler: vm.ListVolumeTypesHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/vm/updateVolume",
|
|
Handler: vm.UpdateVolumeHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/createVolumeTypes",
|
|
Handler: vm.CreateVolumeTypesHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/vm/deleteVolumeType",
|
|
Handler: vm.DeleteVolumeTypeHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listVolumes",
|
|
Handler: vm.ListVolumesHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/getVolumeDetailedById",
|
|
Handler: vm.GetVolumeDetailedByIdHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/listNodes",
|
|
Handler: vm.ListNodesHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/vm/createNode",
|
|
Handler: vm.CreateNodeHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/vm/deleteNode",
|
|
Handler: vm.DeleteNodeHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/vm/showNodeDetails",
|
|
Handler: vm.ShowNodeDetailsHandler(serverCtx),
|
|
},
|
|
},
|
|
rest.WithPrefix("/pcm/v1"),
|
|
)
|
|
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/storelink/uploadImage",
|
|
Handler: storelink.UploadLinkImageHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/storelink/getImageList",
|
|
Handler: storelink.GetLinkImageListHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/storelink/deleteImage",
|
|
Handler: storelink.DeleteLinkImageHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/storelink/submitTask",
|
|
Handler: storelink.SubmitLinkTaskHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/storelink/getTask",
|
|
Handler: storelink.GetLinkTaskHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/storelink/deleteTask",
|
|
Handler: storelink.DeleteLinkTaskHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/storelink/getParticipants",
|
|
Handler: storelink.GetParticipantsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/storelink/getResourceSpecs",
|
|
Handler: storelink.GetAISpecsHandler(serverCtx),
|
|
},
|
|
},
|
|
rest.WithPrefix("/pcm/v1"),
|
|
)
|
|
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/apps/list",
|
|
Handler: apps.AppListHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/apps/distribute/:appName",
|
|
Handler: apps.AppDetailHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/apps/pods/:appName",
|
|
Handler: apps.AppPodsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/apps/getAppByAppName/:appName",
|
|
Handler: apps.GetAppByAppNameHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodDelete,
|
|
Path: "/apps/deleteApp",
|
|
Handler: apps.DeleteAppByAppNameHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/apps/updateApp",
|
|
Handler: apps.UpdateAppByAppNameHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/apps/restartApp",
|
|
Handler: apps.RestartAppByAppNameHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/apps/pauseApp",
|
|
Handler: apps.PauseAppByAppNameHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPut,
|
|
Path: "/apps/startApp",
|
|
Handler: apps.StartAppByAppNameHandler(serverCtx),
|
|
},
|
|
},
|
|
rest.WithPrefix("/pcm/v1"),
|
|
)
|
|
}
|