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.

issue_label.go 899 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2016 The Gogs 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. // 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: 00aabb
  11. Color string `json:"color"`
  12. URL string `json:"url"`
  13. }
  14. // CreateLabelOption options for creating a label
  15. type CreateLabelOption struct {
  16. // required:true
  17. Name string `json:"name" binding:"Required"`
  18. // required:true
  19. // example: #00aabb
  20. Color string `json:"color" binding:"Required;Size(7)"`
  21. }
  22. // EditLabelOption options for editing a label
  23. type EditLabelOption struct {
  24. Name *string `json:"name"`
  25. Color *string `json:"color"`
  26. }
  27. // IssueLabelsOption a collection of labels
  28. type IssueLabelsOption struct {
  29. // list of label IDs
  30. Labels []int64 `json:"labels"`
  31. }