Skip to content

Commit 4878372

Browse files
sapklunny
authored andcommitted
Add missing ListGPGKeys of a user (gogs#44)
1 parent 8807a1d commit 4878372

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gitea/user_gpgkey.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ type CreateGPGKeyOption struct {
3838
ArmoredKey string `json:"armored_public_key" binding:"Required"`
3939
}
4040

41+
// ListGPGKeys list all the GPG keys of the user
42+
func (c *Client) ListGPGKeys(user string) ([]*GPGKey, error) {
43+
keys := make([]*GPGKey, 0, 10)
44+
return keys, c.getParsedResponse("GET", fmt.Sprintf("/users/%s/gpg_keys", user), nil, nil, &keys)
45+
}
46+
4147
// ListMyGPGKeys list all the GPG keys of current user
4248
func (c *Client) ListMyGPGKeys() ([]*GPGKey, error) {
4349
keys := make([]*GPGKey, 0, 10)

0 commit comments

Comments
 (0)