| 381 | } |
| 382 | |
| 383 | func dbRepositoryToModel(r db.Repository) models.Repository { |
| 384 | prio := (*int)(nil) |
| 385 | if r.Priority != nil { |
| 386 | p := int(*r.Priority) |
| 387 | prio = &p |
| 388 | } |
| 389 | return models.Repository{ |
| 390 | ID: r.ID, |
| 391 | Name: r.Name, |
| 392 | URL: r.Url, |
| 393 | Distribution: r.Distribution, |
| 394 | Components: r.Components, |
| 395 | RepoType: r.RepoType, |
| 396 | IsActive: r.IsActive, |
| 397 | IsSecure: r.IsSecure, |
| 398 | Priority: prio, |
| 399 | Description: r.Description, |
| 400 | CreatedAt: pgTime(r.CreatedAt), |
| 401 | UpdatedAt: pgTime(r.UpdatedAt), |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | func dbPackageToModel(p db.Package) models.Package { |
| 406 | return models.Package{ |