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)
| 293 | // @Failure 404 {object} Error "Repository not found" |
| 294 | // @Router /api/repos/{name} [get] |
| 295 | func 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 |
nothing calls this directly
no test coverage detected