From 48783721773535eac2a39be6ff9b137f4d851b00 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Thu, 9 Mar 2017 02:32:59 +0100 Subject: [PATCH] Add missing ListGPGKeys of a user (#44) --- gitea/user_gpgkey.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gitea/user_gpgkey.go b/gitea/user_gpgkey.go index 911e63f..c8afe92 100644 --- a/gitea/user_gpgkey.go +++ b/gitea/user_gpgkey.go @@ -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)