add support for gcs

This commit is contained in:
Pierig Le Saux
2026-03-27 19:57:25 -04:00
committed by André Roth
parent 9bb8de68d0
commit ed4af9a0f6
10 changed files with 694 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
package api
import (
"github.com/gin-gonic/gin"
)
// @Summary GCS buckets
// @Description **Get list of GCS buckets**
// @Description
// @Description List configured GCS buckets.
// @Tags Status
// @Produce json
// @Success 200 {array} string "List of GCS buckets"
// @Router /api/gcs [get]
func apiGCSList(c *gin.Context) {
keys := []string{}
for k := range context.Config().GCSPublishRoots {
keys = append(keys, k)
}
c.JSON(200, keys)
}
+1
View File
@@ -177,6 +177,7 @@ func Router(c *ctx.AptlyContext) http.Handler {
{
api.GET("/s3", apiS3List)
api.GET("/gcs", apiGCSList)
}
{