@@ -23,25 +23,25 @@ var (
2323 filenameRegex = regexp .MustCompile (`\A[-_+=:;.()\[\]{}~!@#$%^& \w]+\z` )
2424)
2525
26- // GenericPackageFileInfo represents information about an existing package file
26+ // PackageFileInfo represents information about an existing package file
2727// swagger:model
28- type GenericPackageFileInfo struct {
28+ type PackageFileInfo struct {
2929 // Name of package file
3030 Name string `json:"name"`
3131 // swagger:strfmt date-time
3232 // Date when package file was created/uploaded
3333 CreatedUnix timeutil.TimeStamp `json:"created"`
3434}
3535
36- // GenericPackageInfo represents information about an existing package file
36+ // PackageInfo represents information about an existing package file
3737// swagger:model
38- type GenericPackageInfo struct {
38+ type PackageInfo struct {
3939 /// Version linked to package information
4040 Version string `json:"version"`
4141 /// Download count for files within version
4242 DownloadCount int64 `json:"downloads"`
4343 /// Files uploaded for package version
44- Files []GenericPackageFileInfo `json:"files"`
44+ Files []PackageFileInfo `json:"files"`
4545}
4646
4747func apiError (ctx * context.Context , status int , obj any ) {
@@ -61,23 +61,23 @@ func EnumeratePackageVersions(ctx *context.Context) {
6161 return
6262 }
6363
64- var info []GenericPackageInfo
64+ var info []PackageInfo
6565 for _ , pv := range pvs {
6666 packageFiles , err := packages_model .GetFilesByVersionID (ctx , pv .ID )
6767 if err != nil {
6868 apiError (ctx , http .StatusInternalServerError , err )
6969 return
7070 }
7171
72- var files []GenericPackageFileInfo
72+ var files []PackageFileInfo
7373 for _ , file := range packageFiles {
74- files = append (files , GenericPackageFileInfo {
74+ files = append (files , PackageFileInfo {
7575 Name : file .Name ,
7676 CreatedUnix : file .CreatedUnix ,
7777 })
7878 }
7979
80- info = append (info , GenericPackageInfo {
80+ info = append (info , PackageInfo {
8181 Version : pv .Version ,
8282 DownloadCount : pv .DownloadCount ,
8383 Files : files ,
0 commit comments