You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

attachment.go 2.5 kB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package structs // import "code.gitea.io/gitea/modules/structs"
  5. import (
  6. "time"
  7. )
  8. // Attachment a generic attachment
  9. // swagger:model
  10. type Attachment struct {
  11. ID int64 `json:"id"`
  12. Name string `json:"name"`
  13. Size int64 `json:"size"`
  14. DownloadCount int64 `json:"download_count"`
  15. // swagger:strfmt date-time
  16. Created time.Time `json:"created_at"`
  17. UUID string `json:"uuid"`
  18. DownloadURL string `json:"browser_download_url"`
  19. S3DownloadURL string
  20. }
  21. // EditAttachmentOptions options for editing attachments
  22. // swagger:model
  23. type EditAttachmentOptions struct {
  24. Name string `json:"name"`
  25. }
  26. type Dataset struct {
  27. ID int64 `json:"id"`
  28. Title string `json:"title"`
  29. Status int32 `json:"status"`
  30. Category string `json:"category"`
  31. Description string `json:"description"`
  32. DownloadTimes int64 `json:"downloadTimes"`
  33. UseCount int64 `json:"useCount"`
  34. NumStars int `json:"numStars"`
  35. Recommend bool `json:"recommend"`
  36. License string `json:"license"`
  37. Task string `json:"task"`
  38. ReleaseID int64 `json:"releaseId"`
  39. UserID int64 `json:"userId"`
  40. RepoID int64 `json:"repoId"`
  41. Repo *RepositoryShow `json:"repo"`
  42. CreatedUnix int64 `json:"createdUnix"`
  43. UpdatedUnix int64 `json:"updatedUnix"`
  44. Attachments []*AttachmentShow `json:"attachments"`
  45. }
  46. type RepositoryShow struct {
  47. OwnerName string `json:"ownerName"`
  48. Name string `json:"name"`
  49. }
  50. type AttachmentShow struct {
  51. ID int64 `json:"id"`
  52. UUID string `json:"uuid"`
  53. DatasetID int64 `json:"datasetId"`
  54. ReleaseID int64 `json:"releaseId"`
  55. UploaderID int64 `json:"uploaderId"`
  56. CommentID int64 `json:"commentId"`
  57. Name string `json:"name"`
  58. Description string `json:"description"`
  59. DownloadCount int64 `json:"downloadCount"`
  60. UseNumber int64 `json:"useNumber"`
  61. Size int64 `json:"size"`
  62. IsPrivate bool `json:"isPrivate"`
  63. DecompressState int32 `json:"decompressState"`
  64. Type int `json:"type"`
  65. CreatedUnix int64 `json:"createdUnix"`
  66. }