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.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2016 The Gogs Authors. All rights reserved.
  2. // Copyright 2019 The Gitea Authors. All rights reserved.
  3. // Use of this source code is governed by a MIT-style
  4. // license that can be found in the LICENSE file.
  5. package structs
  6. // Label a label to an issue or a pr
  7. // swagger:model
  8. type Label struct {
  9. ID int64 `json:"id"`
  10. Name string `json:"name"`
  11. // example: 00aabb
  12. Color string `json:"color"`
  13. Description string `json:"description"`
  14. URL string `json:"url"`
  15. }
  16. // CreateLabelOption options for creating a label
  17. type CreateLabelOption struct {
  18. // required:true
  19. Name string `json:"name" binding:"Required"`
  20. // required:true
  21. // example: #00aabb
  22. Color string `json:"color" binding:"Required"`
  23. Description string `json:"description"`
  24. }
  25. // EditLabelOption options for editing a label
  26. type EditLabelOption struct {
  27. Name *string `json:"name"`
  28. Color *string `json:"color"`
  29. Description *string `json:"description"`
  30. }
  31. // IssueLabelsOption a collection of labels
  32. type IssueLabelsOption struct {
  33. // list of label IDs
  34. Labels []int64 `json:"labels"`
  35. }