mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
add support for gcs
This commit is contained in:
committed by
André Roth
parent
9bb8de68d0
commit
ed4af9a0f6
+21
@@ -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)
|
||||
}
|
||||
@@ -177,6 +177,7 @@ func Router(c *ctx.AptlyContext) http.Handler {
|
||||
|
||||
{
|
||||
api.GET("/s3", apiS3List)
|
||||
api.GET("/gcs", apiGCSList)
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user