2019-05-11 05:21:34 -05:00
|
|
|
// Copyright 2016 The Gogs Authors. All rights reserved.
|
2019-06-16 07:39:52 -05:00
|
|
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
2019-05-11 05:21:34 -05: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 07:39:52 -05:00
|
|
|
Color string `json:"color"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
URL string `json:"url"`
|
2019-05-11 05:21:34 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreateLabelOption options for creating a label
|
|
|
|
type CreateLabelOption struct {
|
|
|
|
// required:true
|
|
|
|
Name string `json:"name" binding:"Required"`
|
|
|
|
// required:true
|
|
|
|
// example: #00aabb
|
2019-06-16 07:39:52 -05:00
|
|
|
Color string `json:"color" binding:"Required;Size(7)"`
|
|
|
|
Description string `json:"description"`
|
2019-05-11 05:21:34 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// EditLabelOption options for editing a label
|
|
|
|
type EditLabelOption struct {
|
2019-06-16 07:39:52 -05:00
|
|
|
Name *string `json:"name"`
|
|
|
|
Color *string `json:"color"`
|
|
|
|
Description *string `json:"description"`
|
2019-05-11 05:21:34 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// IssueLabelsOption a collection of labels
|
|
|
|
type IssueLabelsOption struct {
|
|
|
|
// list of label IDs
|
|
|
|
Labels []int64 `json:"labels"`
|
|
|
|
}
|