mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-05 04:05:32 +02:00
Merge remote-tracking branch 'upstream/main' into limit-repo-size
This commit is contained in:
@@ -9,6 +9,8 @@ package structs
|
||||
type Label struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
// example: false
|
||||
Exclusive bool `json:"exclusive"`
|
||||
// example: 00aabb
|
||||
Color string `json:"color"`
|
||||
Description string `json:"description"`
|
||||
@@ -19,6 +21,8 @@ type Label struct {
|
||||
type CreateLabelOption struct {
|
||||
// required:true
|
||||
Name string `json:"name" binding:"Required"`
|
||||
// example: false
|
||||
Exclusive bool `json:"exclusive"`
|
||||
// required:true
|
||||
// example: #00aabb
|
||||
Color string `json:"color" binding:"Required"`
|
||||
@@ -27,7 +31,10 @@ type CreateLabelOption struct {
|
||||
|
||||
// EditLabelOption options for editing a label
|
||||
type EditLabelOption struct {
|
||||
Name *string `json:"name"`
|
||||
Name *string `json:"name"`
|
||||
// example: false
|
||||
Exclusive *bool `json:"exclusive"`
|
||||
// example: #00aabb
|
||||
Color *string `json:"color"`
|
||||
Description *string `json:"description"`
|
||||
}
|
||||
|
||||
@@ -11,10 +11,11 @@ import (
|
||||
// AccessToken represents an API access token.
|
||||
// swagger:response AccessToken
|
||||
type AccessToken struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Token string `json:"sha1"`
|
||||
TokenLastEight string `json:"token_last_eight"`
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Token string `json:"sha1"`
|
||||
TokenLastEight string `json:"token_last_eight"`
|
||||
Scopes []string `json:"scopes"`
|
||||
}
|
||||
|
||||
// AccessTokenList represents a list of API access token.
|
||||
@@ -22,9 +23,10 @@ type AccessToken struct {
|
||||
type AccessTokenList []*AccessToken
|
||||
|
||||
// CreateAccessTokenOption options when create access token
|
||||
// swagger:parameters userCreateToken
|
||||
type CreateAccessTokenOption struct {
|
||||
Name string `json:"name" binding:"Required"`
|
||||
// required: true
|
||||
Name string `json:"name" binding:"Required"`
|
||||
Scopes []string `json:"scopes"`
|
||||
}
|
||||
|
||||
// CreateOAuth2ApplicationOptions holds options to create an oauth2 application
|
||||
|
||||
Reference in New Issue
Block a user