mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-29 21:38:32 +00:00
GPG commit validation (#1150)
* GPG commit validation * Add translation + some little fix * Move hash calc after retrieving of potential key + missing translation * Add some little test
This commit is contained in:

committed by
Lunny Xiao

parent
9224405155
commit
14fe9010ae
6
vendor/code.gitea.io/sdk/gitea/user_gpgkey.go
generated
vendored
6
vendor/code.gitea.io/sdk/gitea/user_gpgkey.go
generated
vendored
@@ -38,6 +38,12 @@ type CreateGPGKeyOption struct {
|
||||
ArmoredKey string `json:"armored_public_key" binding:"Required"`
|
||||
}
|
||||
|
||||
// ListGPGKeys list all the GPG keys of the user
|
||||
func (c *Client) ListGPGKeys(user string) ([]*GPGKey, error) {
|
||||
keys := make([]*GPGKey, 0, 10)
|
||||
return keys, c.getParsedResponse("GET", fmt.Sprintf("/users/%s/gpg_keys", user), nil, nil, &keys)
|
||||
}
|
||||
|
||||
// ListMyGPGKeys list all the GPG keys of current user
|
||||
func (c *Client) ListMyGPGKeys() ([]*GPGKey, error) {
|
||||
keys := make([]*GPGKey, 0, 10)
|
||||
|
Reference in New Issue
Block a user