You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
8 years ago
|
// Copyright 2017 Gitea Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
6 years ago
|
package structs
|
||
8 years ago
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
// 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"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
7 years ago
|
Created time.Time `json:"created_at,omitempty"`
|
||
7 years ago
|
// swagger:strfmt date-time
|
||
7 years ago
|
Expires time.Time `json:"expires_at,omitempty"`
|
||
8 years ago
|
}
|
||
|
|
||
7 years ago
|
// GPGKeyEmail an email attached to a GPGKey
|
||
8 years ago
|
// swagger:model GPGKeyEmail
|
||
8 years ago
|
type GPGKeyEmail struct {
|
||
|
Email string `json:"email"`
|
||
|
Verified bool `json:"verified"`
|
||
|
}
|
||
|
|
||
|
// CreateGPGKeyOption options create user GPG key
|
||
|
type CreateGPGKeyOption struct {
|
||
8 years ago
|
// An armored GPG key to add
|
||
|
//
|
||
|
// required: true
|
||
|
// unique: true
|
||
8 years ago
|
ArmoredKey string `json:"armored_public_key" binding:"Required"`
|
||
|
}
|