bilihub.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package model
  2. // SearchHubResponse Search Hub Response.
  3. type SearchHubResponse struct {
  4. Repository []*HubRepo `json:"repository"`
  5. }
  6. // HubRepo HubRepo.
  7. type HubRepo struct {
  8. ProjectID int `json:"project_id"`
  9. ProjectName string `json:"project_name"`
  10. ProjectPublic bool `json:"project_public"`
  11. RepositoryName string `json:"repository_name"`
  12. TagsCount int `json:"tags_count"`
  13. }
  14. // HubProject HubProject.
  15. type HubProject struct {
  16. ProjectID int `json:"project_id"`
  17. Name string `json:"name"`
  18. RepoCount int `json:"repo_count"`
  19. }
  20. // GetHubProjectDetailResponse GetHubProjectDetailResponse.
  21. type GetHubProjectDetailResponse struct {
  22. ProjectID int `json:"project_id"`
  23. ProjectName string `json:"name"`
  24. RepoCount int `json:"repo_count"`
  25. }
  26. // PaginateProjectRepoRecord PaginateProjectRepoRecord.
  27. type PaginateProjectRepoRecord struct {
  28. Total int `json:"total"`
  29. PageNum int `json:"page_num"`
  30. PageSize int `json:"page_size"`
  31. ProjectRepository []*ProjectRepository `json:"project_repositories"`
  32. }
  33. // ProjectRepositoryRequest ProjectRepositoryRequest.
  34. type ProjectRepositoryRequest struct {
  35. ProjectRepository []*ProjectRepository
  36. }
  37. // ProjectRepository ProjectRepository.
  38. type ProjectRepository struct {
  39. RepositoryID int `json:"id"`
  40. RepositoryName string `json:"name"`
  41. TagCount int `json:"tags_count"`
  42. CreateTime string `json:"creation_time"`
  43. UpdateTime string `json:"update_time"`
  44. }
  45. // RepositoryTagResponse Repository Tag Response.
  46. type RepositoryTagResponse struct {
  47. Digest string `json:"digest"`
  48. Name string `json:"name"`
  49. OS string `json:"os"`
  50. Size int64 `json:"size"`
  51. Created string `json:"created"`
  52. }
  53. // RepositoryTag Repository Tag.
  54. type RepositoryTag struct {
  55. RepositoryTagResponse
  56. ImageFullName string `json:"image_full_name"`
  57. }