1
0
Fork 0
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:
Vlad Temian 2017-11-28 17:21:39 +02:00 committed by Lauris BH
parent 0c69b768b9
commit 6ad4990a65
5 changed files with 84 additions and 13 deletions

View file

@ -6281,6 +6281,10 @@
"type": "string",
"x-go-name": "Title"
},
"fingerprint": {
"type": "string",
"x-go-name": "Fingerprint"
},
"url": {
"type": "string",
"x-go-name": "URL"

View file

@ -81,6 +81,7 @@ func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey {
Key: key.Content,
URL: apiLink + com.ToStr(key.ID),
Title: key.Name,
Fingerprint: key.Fingerprint,
Created: key.Created,
}
}

65
vendor/code.gitea.io/sdk/gitea/lfs_lock.go generated vendored Normal file
View 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"`
}

View file

@ -17,6 +17,7 @@ type PublicKey struct {
Key string `json:"key"`
URL string `json:"url,omitempty"`
Title string `json:"title,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
// swagger:strfmt date-time
Created time.Time `json:"created_at,omitempty"`
}

6
vendor/vendor.json vendored
View file

@ -9,10 +9,10 @@
"revisionTime": "2017-10-23T00:52:09Z"
},
{
"checksumSHA1": "OICEgmUefW4L4l/FK/NVFnl/aOM=",
"checksumSHA1": "QQ7g7B9+EIzGjO14KCGEs9TNEzM=",
"path": "code.gitea.io/sdk/gitea",
"revision": "1da52cf95ff3e7953227cfa0469e1c05a7d02557",
"revisionTime": "2017-11-12T09:10:33Z"
"revision": "ec7d3af43b598c1a3f2cb12f633b9625649d8e54",
"revisionTime": "2017-11-28T12:30:39Z"
},
{
"checksumSHA1": "bOODD4Gbw3GfcuQPU2dI40crxxk=",