MCPcopy Index your code
hub / github.com/aptly-dev/aptly / apiReposShow

Function apiReposShow

api/repos.go:295–306  ·  view source on GitHub ↗

GET /api/repos/:name @Summary Get Repository Info @Description Returns basic information about local repository. @Tags Repos @Param name path string true "Repository name" @Produce json @Success 200 {object} deb.LocalRepo @Failure 404 {object} Error "Repository not found" @Router /api/repos/{name}

(c *gin.Context)

Source from the content-addressed store, hash-verified

293// @Failure 404 {object} Error "Repository not found"
294// @Router /api/repos/{name} [get]
295func apiReposShow(c *gin.Context) {
296 collectionFactory := context.NewCollectionFactory()
297 collection := collectionFactory.LocalRepoCollection()
298
299 repo, err := collection.ByName(c.Params.ByName("name"))
300 if err != nil {
301 AbortWithJSONError(c, 404, err)
302 return
303 }
304
305 c.JSON(200, repo)
306}
307
308// @Summary Delete Repository
309// @Description Drop/delete a repo

Callers

nothing calls this directly

Calls 4

LocalRepoCollectionMethod · 0.95
AbortWithJSONErrorFunction · 0.85
NewCollectionFactoryMethod · 0.80
ByNameMethod · 0.45

Tested by

no test coverage detected