2019-05-11 03:21:34 -07:00
|
|
|
// Copyright 2016 The Gogs Authors. All rights reserved.
|
2019-06-16 05:39:52 -07:00
|
|
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
2019-05-11 03:21:34 -07:00
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package structs
|
|
|
|
|
|
|
|
// Label a label to an issue or a pr
|
|
|
|
// swagger:model
|
|
|
|
type Label struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
// example: 00aabb
|
2019-06-16 05:39:52 -07:00
|
|
|
Color string `json:"color"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
URL string `json:"url"`
|
2019-05-11 03:21:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreateLabelOption options for creating a label
|
|
|
|
type CreateLabelOption struct {
|
|
|
|
// required:true
|
|
|
|
Name string `json:"name" binding:"Required"`
|
|
|
|
// required:true
|
|
|
|
// example: #00aabb
|
2020-02-09 07:33:03 -07:00
|
|
|
Color string `json:"color" binding:"Required"`
|
2019-06-16 05:39:52 -07:00
|
|
|
Description string `json:"description"`
|
2019-05-11 03:21:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// EditLabelOption options for editing a label
|
|
|
|
type EditLabelOption struct {
|
2019-06-16 05:39:52 -07:00
|
|
|
Name *string `json:"name"`
|
|
|
|
Color *string `json:"color"`
|
|
|
|
Description *string `json:"description"`
|
2019-05-11 03:21:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// IssueLabelsOption a collection of labels
|
|
|
|
type IssueLabelsOption struct {
|
|
|
|
// list of label IDs
|
|
|
|
Labels []int64 `json:"labels"`
|
|
|
|
}
|