mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 12:54:53 -05:00
Add fingerprint to ssh key endpoints. (#3009)
* Add fingerprint to ssh key endpoints. * Update gitea sdk vendor
This commit is contained in:
parent
0c69b768b9
commit
6ad4990a65
5 changed files with 84 additions and 13 deletions
6
public/swagger.v1.json
vendored
6
public/swagger.v1.json
vendored
|
@ -6281,6 +6281,10 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"x-go-name": "Title"
|
"x-go-name": "Title"
|
||||||
},
|
},
|
||||||
|
"fingerprint": {
|
||||||
|
"type": "string",
|
||||||
|
"x-go-name": "Fingerprint"
|
||||||
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"x-go-name": "URL"
|
"x-go-name": "URL"
|
||||||
|
@ -7178,4 +7182,4 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,11 +77,12 @@ func ToCommit(c *git.Commit) *api.PayloadCommit {
|
||||||
// ToPublicKey convert models.PublicKey to api.PublicKey
|
// ToPublicKey convert models.PublicKey to api.PublicKey
|
||||||
func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey {
|
func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey {
|
||||||
return &api.PublicKey{
|
return &api.PublicKey{
|
||||||
ID: key.ID,
|
ID: key.ID,
|
||||||
Key: key.Content,
|
Key: key.Content,
|
||||||
URL: apiLink + com.ToStr(key.ID),
|
URL: apiLink + com.ToStr(key.ID),
|
||||||
Title: key.Name,
|
Title: key.Name,
|
||||||
Created: key.Created,
|
Fingerprint: key.Fingerprint,
|
||||||
|
Created: key.Created,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
65
vendor/code.gitea.io/sdk/gitea/lfs_lock.go
generated
vendored
Normal file
65
vendor/code.gitea.io/sdk/gitea/lfs_lock.go
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
// Copyright 2017 The 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.
|
||||||
|
|
||||||
|
package gitea
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LFSLock represent a lock
|
||||||
|
// for use with the locks API.
|
||||||
|
type LFSLock struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
Path string `json:"path"`
|
||||||
|
LockedAt time.Time `json:"locked_at"`
|
||||||
|
Owner *LFSLockOwner `json:"owner"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LFSLockOwner represent a lock owner
|
||||||
|
// for use with the locks API.
|
||||||
|
type LFSLockOwner struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LFSLockRequest contains the path of the lock to create
|
||||||
|
// https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#create-lock
|
||||||
|
type LFSLockRequest struct {
|
||||||
|
Path string `json:"path"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LFSLockResponse represent a lock created
|
||||||
|
// https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#create-lock
|
||||||
|
type LFSLockResponse struct {
|
||||||
|
Lock *LFSLock `json:"lock"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LFSLockList represent a list of lock requested
|
||||||
|
// https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#list-locks
|
||||||
|
type LFSLockList struct {
|
||||||
|
Locks []*LFSLock `json:"locks"`
|
||||||
|
Next string `json:"next_cursor,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LFSLockListVerify represent a list of lock verification requested
|
||||||
|
// https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#list-locks-for-verification
|
||||||
|
type LFSLockListVerify struct {
|
||||||
|
Ours []*LFSLock `json:"ours"`
|
||||||
|
Theirs []*LFSLock `json:"theirs"`
|
||||||
|
Next string `json:"next_cursor,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LFSLockError contains information on the error that occurs
|
||||||
|
type LFSLockError struct {
|
||||||
|
Message string `json:"message"`
|
||||||
|
Lock *LFSLock `json:"lock,omitempty"`
|
||||||
|
Documentation string `json:"documentation_url,omitempty"`
|
||||||
|
RequestID string `json:"request_id,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LFSLockDeleteRequest contains params of a delete request
|
||||||
|
// https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#delete-lock
|
||||||
|
type LFSLockDeleteRequest struct {
|
||||||
|
Force bool `json:"force"`
|
||||||
|
}
|
9
vendor/code.gitea.io/sdk/gitea/user_key.go
generated
vendored
9
vendor/code.gitea.io/sdk/gitea/user_key.go
generated
vendored
|
@ -13,10 +13,11 @@ import (
|
||||||
|
|
||||||
// PublicKey publickey is a user key to push code to repository
|
// PublicKey publickey is a user key to push code to repository
|
||||||
type PublicKey struct {
|
type PublicKey struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
URL string `json:"url,omitempty"`
|
URL string `json:"url,omitempty"`
|
||||||
Title string `json:"title,omitempty"`
|
Title string `json:"title,omitempty"`
|
||||||
|
Fingerprint string `json:"fingerprint,omitempty"`
|
||||||
// swagger:strfmt date-time
|
// swagger:strfmt date-time
|
||||||
Created time.Time `json:"created_at,omitempty"`
|
Created time.Time `json:"created_at,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
6
vendor/vendor.json
vendored
6
vendor/vendor.json
vendored
|
@ -9,10 +9,10 @@
|
||||||
"revisionTime": "2017-10-23T00:52:09Z"
|
"revisionTime": "2017-10-23T00:52:09Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "OICEgmUefW4L4l/FK/NVFnl/aOM=",
|
"checksumSHA1": "QQ7g7B9+EIzGjO14KCGEs9TNEzM=",
|
||||||
"path": "code.gitea.io/sdk/gitea",
|
"path": "code.gitea.io/sdk/gitea",
|
||||||
"revision": "1da52cf95ff3e7953227cfa0469e1c05a7d02557",
|
"revision": "ec7d3af43b598c1a3f2cb12f633b9625649d8e54",
|
||||||
"revisionTime": "2017-11-12T09:10:33Z"
|
"revisionTime": "2017-11-28T12:30:39Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "bOODD4Gbw3GfcuQPU2dI40crxxk=",
|
"checksumSHA1": "bOODD4Gbw3GfcuQPU2dI40crxxk=",
|
||||||
|
|
Loading…
Reference in a new issue