mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-26 09:04:18 -04:00
Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418)
This commit is contained in:
@@ -9,28 +9,43 @@ import (
|
||||
|
||||
// GPGKey a user GPG key to sign commit and tag in repository
|
||||
type GPGKey struct {
|
||||
ID int64 `json:"id"`
|
||||
PrimaryKeyID string `json:"primary_key_id"`
|
||||
KeyID string `json:"key_id"`
|
||||
PublicKey string `json:"public_key"`
|
||||
Emails []*GPGKeyEmail `json:"emails"`
|
||||
SubsKey []*GPGKey `json:"subkeys"`
|
||||
CanSign bool `json:"can_sign"`
|
||||
CanEncryptComms bool `json:"can_encrypt_comms"`
|
||||
CanEncryptStorage bool `json:"can_encrypt_storage"`
|
||||
CanCertify bool `json:"can_certify"`
|
||||
Verified bool `json:"verified"`
|
||||
// The unique identifier of the GPG key
|
||||
ID int64 `json:"id"`
|
||||
// The primary key ID of the GPG key
|
||||
PrimaryKeyID string `json:"primary_key_id"`
|
||||
// The key ID of the GPG key
|
||||
KeyID string `json:"key_id"`
|
||||
// The public key content in armored format
|
||||
PublicKey string `json:"public_key"`
|
||||
// List of email addresses associated with this GPG key
|
||||
Emails []*GPGKeyEmail `json:"emails"`
|
||||
// List of subkeys of this GPG key
|
||||
SubsKey []*GPGKey `json:"subkeys"`
|
||||
// Whether the key can be used for signing
|
||||
CanSign bool `json:"can_sign"`
|
||||
// Whether the key can be used for encrypting communications
|
||||
CanEncryptComms bool `json:"can_encrypt_comms"`
|
||||
// Whether the key can be used for encrypting storage
|
||||
CanEncryptStorage bool `json:"can_encrypt_storage"`
|
||||
// Whether the key can be used for certification
|
||||
CanCertify bool `json:"can_certify"`
|
||||
// Whether the GPG key has been verified
|
||||
Verified bool `json:"verified"`
|
||||
// swagger:strfmt date-time
|
||||
// The date and time when the GPG key was created
|
||||
Created time.Time `json:"created_at"`
|
||||
// swagger:strfmt date-time
|
||||
// The date and time when the GPG key expires
|
||||
Expires time.Time `json:"expires_at"`
|
||||
}
|
||||
|
||||
// GPGKeyEmail an email attached to a GPGKey
|
||||
// swagger:model GPGKeyEmail
|
||||
type GPGKeyEmail struct {
|
||||
Email string `json:"email"`
|
||||
Verified bool `json:"verified"`
|
||||
// The email address associated with the GPG key
|
||||
Email string `json:"email"`
|
||||
// Whether the email address has been verified
|
||||
Verified bool `json:"verified"`
|
||||
}
|
||||
|
||||
// CreateGPGKeyOption options create user GPG key
|
||||
@@ -40,7 +55,8 @@ type CreateGPGKeyOption struct {
|
||||
// required: true
|
||||
// unique: true
|
||||
ArmoredKey string `json:"armored_public_key" binding:"Required"`
|
||||
Signature string `json:"armored_signature,omitempty"`
|
||||
// An optional armored signature for the GPG key
|
||||
Signature string `json:"armored_signature,omitempty"`
|
||||
}
|
||||
|
||||
// VerifyGPGKeyOption options verifies user GPG key
|
||||
@@ -48,6 +64,8 @@ type VerifyGPGKeyOption struct {
|
||||
// An Signature for a GPG key token
|
||||
//
|
||||
// required: true
|
||||
KeyID string `json:"key_id" binding:"Required"`
|
||||
// The key ID of the GPG key to verify
|
||||
KeyID string `json:"key_id" binding:"Required"`
|
||||
// The armored signature to verify the GPG key
|
||||
Signature string `json:"armored_signature" binding:"Required"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user