snapshot of https://github.com/go-gitea/gitea.git (main, 2026-09-15; blobs > 131072B omitted)
Some checks failed
cache-seeder / prune (push) Has been skipped
cache-seeder / frontend (push) Failing after 3s
cache-seeder / python (push) Failing after 3s
cache-seeder / gobuild (push) Failing after 4s
cache-seeder / lint (bindata, lint-backend) (push) Failing after 3s
giteabot backport / giteabot (push) Has been skipped
giteabot / giteabot (push) Has been skipped
cache-prune / prune (push) Has been skipped
release-nightly-snapcraft / build-and-publish (ubuntu-24.04) (push) Has been cancelled
release-nightly-snapcraft / build-and-publish (ubuntu-24.04-arm) (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-renovate / cron-renovate (push) Has been skipped

This commit is contained in:
upstream-mirror
2026-09-15 21:41:59 +05:00
commit 52ae0c5802
6280 changed files with 624193 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
// Copyright 2015 The Gogs Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
import (
"time"
)
type DeployKey struct {
// ID is the unique identifier for the deploy-key
ID int64 `json:"id"`
// Type tells whether the key authenticates over SSH or with a token over HTTPS
// enum: ssh,token
KeyType string `json:"key_type"`
// KeyID is the associated public key ID
KeyID int64 `json:"key_id"`
// Key contains the actual SSH key content
Key string `json:"key"`
// URL is the API URL for this deploy-key
URL string `json:"url"`
// Title is the human-readable name for the key
Title string `json:"title"`
// Fingerprint is the key's fingerprint
Fingerprint string `json:"fingerprint"`
// Token is the plaintext token of an HTTPS key, only returned when it is created
Token string `json:"token,omitempty"`
// swagger:strfmt date-time
// Created is the time when the deploy-key was added
Created time.Time `json:"created_at"`
// ReadOnly indicates if the key has read-only access
ReadOnly bool `json:"read_only"`
// Repository is the repository this deploy-key belongs to
Repository *Repository `json:"repository,omitempty"`
}
type CreateKeyOption struct {
// Title of the key to add
//
// required: true
// unique: true
Title string `json:"title" binding:"Required"`
// An armored SSH key to add
//
// required: true
// unique: true
Key string `json:"key" binding:"Required"`
// Describe if the key has only read access or read/write
ReadOnly bool `json:"read_only"`
}
type CreateDeployKeyTokenOption struct {
// Title of the token to add
//
// required: true
// unique: true
Title string `json:"title" binding:"Required;MaxSize(50)"`
// Describe if the token has only read access or read/write
ReadOnly bool `json:"read_only"`
}