code.gitea.io/gitea@v1.19.3/modules/structs/issue_label.go (about) 1 // Copyright 2016 The Gogs Authors. All rights reserved. 2 // Copyright 2019 The Gitea Authors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 5 package structs 6 7 // Label a label to an issue or a pr 8 // swagger:model 9 type Label struct { 10 ID int64 `json:"id"` 11 Name string `json:"name"` 12 // example: false 13 Exclusive bool `json:"exclusive"` 14 // example: 00aabb 15 Color string `json:"color"` 16 Description string `json:"description"` 17 URL string `json:"url"` 18 } 19 20 // CreateLabelOption options for creating a label 21 type CreateLabelOption struct { 22 // required:true 23 Name string `json:"name" binding:"Required"` 24 // example: false 25 Exclusive bool `json:"exclusive"` 26 // required:true 27 // example: #00aabb 28 Color string `json:"color" binding:"Required"` 29 Description string `json:"description"` 30 } 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 } 41 42 // IssueLabelsOption a collection of labels 43 type IssueLabelsOption struct { 44 // list of label IDs 45 Labels []int64 `json:"labels"` 46 }