@Summary List Repo Packages @Description **Return a list of packages present in the repo** @Description @Description If `q` query parameter is missing, return all packages, otherwise return packages that match q @Description @Description **Example:** @Description ``` @Description $ curl http://local
(c *gin.Context)
| 387 | // @Failure 404 {object} Error "Internal Server Error" |
| 388 | // @Router /api/repos/{name}/packages [get] |
| 389 | func apiReposPackagesShow(c *gin.Context) { |
| 390 | collectionFactory := context.NewCollectionFactory() |
| 391 | collection := collectionFactory.LocalRepoCollection() |
| 392 | |
| 393 | repo, err := collection.ByName(c.Params.ByName("name")) |
| 394 | if err != nil { |
| 395 | AbortWithJSONError(c, 404, err) |
| 396 | return |
| 397 | } |
| 398 | |
| 399 | err = collection.LoadComplete(repo) |
| 400 | if err != nil { |
| 401 | AbortWithJSONError(c, 500, err) |
| 402 | return |
| 403 | } |
| 404 | |
| 405 | showPackages(c, repo.RefList(), collectionFactory) |
| 406 | } |
| 407 | |
| 408 | type reposPackagesAddDeleteParams struct { |
| 409 | // Package Refs |
nothing calls this directly
no test coverage detected