Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Add missing ListGPGKeys of a user #44

Merged
merged 1 commit into from
Mar 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gitea/user_gpgkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down