2024-07-23 14:48:37 +08:00
|
|
|
package router
|
|
|
|
|
|
|
|
import (
|
2024-08-07 13:52:34 +08:00
|
|
|
v2 "github.com/1Panel-dev/1Panel/agent/app/api/v2"
|
2024-07-23 14:48:37 +08:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
type AppRouter struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *AppRouter) InitRouter(Router *gin.RouterGroup) {
|
|
|
|
appRouter := Router.Group("apps")
|
|
|
|
|
2024-08-07 13:52:34 +08:00
|
|
|
baseApi := v2.ApiGroupApp.BaseApi
|
2024-07-23 14:48:37 +08:00
|
|
|
{
|
2024-08-23 17:22:05 +08:00
|
|
|
appRouter.POST("/sync/remote", baseApi.SyncApp)
|
|
|
|
appRouter.POST("/sync/local", baseApi.SyncLocalApp)
|
2024-07-23 14:48:37 +08:00
|
|
|
appRouter.GET("/checkupdate", baseApi.GetAppListUpdate)
|
|
|
|
appRouter.POST("/search", baseApi.SearchApp)
|
|
|
|
appRouter.GET("/:key", baseApi.GetApp)
|
|
|
|
appRouter.GET("/detail/:appId/:version/:type", baseApi.GetAppDetail)
|
|
|
|
appRouter.GET("/details/:id", baseApi.GetAppDetailByID)
|
|
|
|
appRouter.POST("/install", baseApi.InstallApp)
|
|
|
|
appRouter.GET("/tags", baseApi.GetAppTags)
|
|
|
|
appRouter.POST("/installed/check", baseApi.CheckAppInstalled)
|
|
|
|
appRouter.POST("/installed/loadport", baseApi.LoadPort)
|
|
|
|
appRouter.POST("/installed/conninfo", baseApi.LoadConnInfo)
|
|
|
|
appRouter.GET("/installed/delete/check/:appInstallId", baseApi.DeleteCheck)
|
|
|
|
appRouter.POST("/installed/search", baseApi.SearchAppInstalled)
|
|
|
|
appRouter.GET("/installed/list", baseApi.ListAppInstalled)
|
|
|
|
appRouter.POST("/installed/op", baseApi.OperateInstalled)
|
|
|
|
appRouter.POST("/installed/sync", baseApi.SyncInstalled)
|
|
|
|
appRouter.POST("/installed/port/change", baseApi.ChangeAppPort)
|
|
|
|
appRouter.GET("/services/:key", baseApi.GetServices)
|
|
|
|
appRouter.POST("/installed/conf", baseApi.GetDefaultConfig)
|
|
|
|
appRouter.GET("/installed/params/:appInstallId", baseApi.GetParams)
|
|
|
|
appRouter.POST("/installed/params/update", baseApi.UpdateInstalled)
|
|
|
|
appRouter.POST("/installed/ignore", baseApi.IgnoreUpgrade)
|
|
|
|
appRouter.GET("/ignored/detail", baseApi.GetIgnoredApp)
|
|
|
|
appRouter.POST("/installed/update/versions", baseApi.GetUpdateVersions)
|
2024-08-26 15:37:13 +08:00
|
|
|
appRouter.POST("/installed/config/update", baseApi.UpdateAppConfig)
|
2024-08-26 18:34:34 +08:00
|
|
|
appRouter.POST("/store/update", baseApi.UpdateAppstoreConfig)
|
|
|
|
appRouter.GET("/store/config", baseApi.GetAppstoreConfig)
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
}
|