add gpg token function
This commit is contained in:
parent
64b6c07029
commit
dfbe9d3ad1
1 changed files with 8 additions and 1 deletions
|
@ -68,11 +68,18 @@ func (c *Client) GetGPGKey(keyID int64) (*GPGKey, *Response, error) {
|
||||||
return key, resp, err
|
return key, resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGPGToken get a gpg token for verification
|
||||||
|
func (c *Client) GetGPGToken() (string, *Response, error) {
|
||||||
|
body, resp, err := c.getResponse("GET", "/user/gpg_key_token", nil, nil)
|
||||||
|
return string(body), resp, err
|
||||||
|
}
|
||||||
|
|
||||||
// CreateGPGKeyOption options create user GPG key
|
// CreateGPGKeyOption options create user GPG key
|
||||||
type CreateGPGKeyOption struct {
|
type CreateGPGKeyOption struct {
|
||||||
// An armored GPG key to add
|
// An armored GPG key to add
|
||||||
//
|
//
|
||||||
ArmoredKey string `json:"armored_public_key"`
|
ArmoredKey string `json:"armored_public_key"`
|
||||||
|
ArmoredSignature string `json:"armored_signature"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateGPGKey create GPG key with options
|
// CreateGPGKey create GPG key with options
|
||||||
|
|
Loading…
Reference in a new issue