wip: oci image management
This commit is contained in:
19
api/routes.go
Normal file
19
api/routes.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"gitea.loveuer.com/loveuer/cluster/api/v1"
|
||||
"gitea.loveuer.com/loveuer/cluster/handler"
|
||||
"gitea.loveuer.com/loveuer/cluster/internal/registry/storage"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// SetupRoutes 设置所有路由
|
||||
func SetupRoutes(app *fiber.App, store storage.Storage) {
|
||||
// REST API v1
|
||||
api := app.Group("/api/v1")
|
||||
v1.SetupRoutes(api)
|
||||
|
||||
// OCI Registry API v2 - 使用通配符路由处理所有 /v2/* 路径
|
||||
app.All("/v2/*", handler.RegistryV2(store))
|
||||
}
|
||||
13
api/v1/routes.go
Normal file
13
api/v1/routes.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"gitea.loveuer.com/loveuer/cluster/handler"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// SetupRoutes 设置 v1 API 路由
|
||||
func SetupRoutes(api fiber.Router) {
|
||||
reg := api.Group("/registry")
|
||||
reg.Get("/image/list", handler.ListImages)
|
||||
}
|
||||
Reference in New Issue
Block a user