aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/packages/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/packages/api.go')
-rw-r--r--routers/api/packages/api.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/api/packages/api.go b/routers/api/packages/api.go
index 6f53bc4ae0..11e7e5d6a6 100644
--- a/routers/api/packages/api.go
+++ b/routers/api/packages/api.go
@@ -40,7 +40,9 @@ func reqPackageAccess(accessMode perm.AccessMode) func(ctx *context.Context) {
}
}
-func Routes(ctx gocontext.Context) *web.Route {
+// CommonRoutes provide endpoints for most package managers (except containers - see below)
+// These are mounted on `/api/packages` (not `/api/v1/packages`)
+func CommonRoutes(ctx gocontext.Context) *web.Route {
r := web.NewRoute()
r.Use(context.PackageContexter(ctx))
@@ -301,6 +303,9 @@ func Routes(ctx gocontext.Context) *web.Route {
return r
}
+// ContainerRoutes provides endpoints that implement the OCI API to serve containers
+// These have to be mounted on `/v2/...` to comply with the OCI spec:
+// https://github.com/opencontainers/distribution-spec/blob/main/spec.md
func ContainerRoutes(ctx gocontext.Context) *web.Route {
r := web.NewRoute()