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

release.go 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2016 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import (
  5. "time"
  6. )
  7. // Release represents a repository release
  8. type Release struct {
  9. ID int64 `json:"id"`
  10. TagName string `json:"tag_name"`
  11. Target string `json:"target_commitish"`
  12. Title string `json:"name"`
  13. Note string `json:"body"`
  14. URL string `json:"url"`
  15. HTMLURL string `json:"html_url"`
  16. TarURL string `json:"tarball_url"`
  17. ZipURL string `json:"zipball_url"`
  18. UploadURL string `json:"upload_url"`
  19. IsDraft bool `json:"draft"`
  20. IsPrerelease bool `json:"prerelease"`
  21. // swagger:strfmt date-time
  22. CreatedAt time.Time `json:"created_at"`
  23. // swagger:strfmt date-time
  24. PublishedAt time.Time `json:"published_at"`
  25. Publisher *User `json:"author"`
  26. Attachments []*Attachment `json:"assets"`
  27. }
  28. // CreateReleaseOption options when creating a release
  29. type CreateReleaseOption struct {
  30. // required: true
  31. TagName string `json:"tag_name" binding:"Required"`
  32. Target string `json:"target_commitish"`
  33. Title string `json:"name"`
  34. Note string `json:"body"`
  35. IsDraft bool `json:"draft"`
  36. IsPrerelease bool `json:"prerelease"`
  37. }
  38. // EditReleaseOption options when editing a release
  39. type EditReleaseOption struct {
  40. TagName string `json:"tag_name"`
  41. Target string `json:"target_commitish"`
  42. Title string `json:"name"`
  43. Note string `json:"body"`
  44. IsDraft *bool `json:"draft"`
  45. IsPrerelease *bool `json:"prerelease"`
  46. }