mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
initial commit for JFrog support
This commit is contained in:
committed by
André Roth
parent
8ebe80f066
commit
4b8f0c42ac
@@ -51,6 +51,9 @@ func createTestConfig() *os.File {
|
||||
"GcsPublishEndpoints": map[string]map[string]string{
|
||||
"test-gcs": {
|
||||
"bucket": "bucket-gcs",
|
||||
"JFrogPublishEndpoints": gin.H{
|
||||
"test-jfrog": gin.H{
|
||||
"url": "http://jfrog.example.com",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// @Summary JFrog repositories
|
||||
// @Description **Get list of JFrog repositories**
|
||||
// @Description
|
||||
// @Description List configured JFrog publish endpoints.
|
||||
// @Tags Status
|
||||
// @Produce json
|
||||
// @Success 200 {array} string "List of JFrog publish endpoints"
|
||||
// @Router /api/jfrog [get]
|
||||
func apiJFrogList(c *gin.Context) {
|
||||
keys := []string{}
|
||||
for k := range context.Config().JFrogPublishRoots {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
c.JSON(200, keys)
|
||||
}
|
||||
@@ -178,6 +178,7 @@ func Router(c *ctx.AptlyContext) http.Handler {
|
||||
{
|
||||
api.GET("/s3", apiS3List)
|
||||
api.GET("/gcs", apiGCSList)
|
||||
api.GET("/jfrog", apiJFrogList)
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user