mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-19 10:12:54 +02:00
Migrate gitea-sdk to v0.12.0 (#133)
Migrate Update code.gitea.io/sdk/gitea to v0.12.0. Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/133 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
19
vendor/code.gitea.io/sdk/gitea/user_gpgkey.go
generated
vendored
19
vendor/code.gitea.io/sdk/gitea/user_gpgkey.go
generated
vendored
@ -33,16 +33,23 @@ type GPGKeyEmail struct {
|
||||
Verified bool `json:"verified"`
|
||||
}
|
||||
|
||||
// ListGPGKeysOptions options for listing a user's GPGKeys
|
||||
type ListGPGKeysOptions struct {
|
||||
ListOptions
|
||||
}
|
||||
|
||||
// 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)
|
||||
func (c *Client) ListGPGKeys(user string, opt ListGPGKeysOptions) ([]*GPGKey, error) {
|
||||
opt.setDefaults()
|
||||
keys := make([]*GPGKey, 0, opt.PageSize)
|
||||
return keys, c.getParsedResponse("GET", fmt.Sprintf("/users/%s/gpg_keys?%s", user, opt.getURLQuery().Encode()), nil, nil, &keys)
|
||||
}
|
||||
|
||||
// ListMyGPGKeys list all the GPG keys of current user
|
||||
func (c *Client) ListMyGPGKeys() ([]*GPGKey, error) {
|
||||
keys := make([]*GPGKey, 0, 10)
|
||||
return keys, c.getParsedResponse("GET", "/user/gpg_keys", nil, nil, &keys)
|
||||
func (c *Client) ListMyGPGKeys(opt *ListGPGKeysOptions) ([]*GPGKey, error) {
|
||||
opt.setDefaults()
|
||||
keys := make([]*GPGKey, 0, opt.PageSize)
|
||||
return keys, c.getParsedResponse("GET", fmt.Sprintf("/user/gpg_keys?%s", opt.getURLQuery().Encode()), nil, nil, &keys)
|
||||
}
|
||||
|
||||
// GetGPGKey get current user's GPG key by key id
|
||||
|
Reference in New Issue
Block a user