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.

issue_label.go 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Copyright 2016 The Gogs Authors. All rights reserved.
  2. // Copyright 2019 The Gitea Authors. All rights reserved.
  3. // SPDX-License-Identifier: MIT
  4. package structs
  5. // Label a label to an issue or a pr
  6. // swagger:model
  7. type Label struct {
  8. ID int64 `json:"id"`
  9. Name string `json:"name"`
  10. // example: false
  11. Exclusive bool `json:"exclusive"`
  12. // example: false
  13. IsArchived bool `json:"is_archived"`
  14. // example: 00aabb
  15. Color string `json:"color"`
  16. Description string `json:"description"`
  17. URL string `json:"url"`
  18. }
  19. // CreateLabelOption options for creating a label
  20. type CreateLabelOption struct {
  21. // required:true
  22. Name string `json:"name" binding:"Required"`
  23. // example: false
  24. Exclusive bool `json:"exclusive"`
  25. // required:true
  26. // example: #00aabb
  27. Color string `json:"color" binding:"Required"`
  28. Description string `json:"description"`
  29. // example: false
  30. IsArchived bool `json:"is_archived"`
  31. }
  32. // EditLabelOption options for editing a label
  33. type EditLabelOption struct {
  34. Name *string `json:"name"`
  35. // example: false
  36. Exclusive *bool `json:"exclusive"`
  37. // example: #00aabb
  38. Color *string `json:"color"`
  39. Description *string `json:"description"`
  40. // example: false
  41. IsArchived *bool `json:"is_archived"`
  42. }
  43. // IssueLabelsOption a collection of labels
  44. type IssueLabelsOption struct {
  45. // list of label IDs
  46. Labels []int64 `json:"labels"`
  47. }
  48. // LabelTemplate info of a Label template
  49. type LabelTemplate struct {
  50. Name string `json:"name"`
  51. // example: false
  52. Exclusive bool `json:"exclusive"`
  53. // example: 00aabb
  54. Color string `json:"color"`
  55. Description string `json:"description"`
  56. }