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.

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