feat(ssl): Add API interfaces for managing SSL certificates#139
Conversation
|
Hi @eust-w. Thanks for your PR. I'm waiting for a qiniu member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
PTAL @bachue |
|
I didn't add tests with mocks because I didn't see any. If you have any good suggestions, please let me know. |
- Add CertListReq and CertListResp for retrieving SSL certificate lists - Add CertDetailResp and RealCertDetailResp for retrieving SSL certificate details - Implement GetCertList and GetCertDetail methods for fetching SSL certificate lists and details - Add UploadCertReq and UploadCertResp for uploading SSL certificates - Implement UploadCert method for uploading SSL certificates - Implement DeleteCert method for deleting SSL certificates Refs qiniu#136
| } | ||
| req.Header.Add("Authorization", "QBox "+accessToken) | ||
| req.Header.Add("Content-Type", "application/json") | ||
| resp, respErr := http.DefaultClient.Do(req) |
There was a problem hiding this comment.
每个接口都调用go标准包的接口,拿到结果后做unmarshal,建议封装一下,参考一下上面的postRequest
| defer resp.Body.Close() | ||
| if resp.StatusCode != http.StatusOK { | ||
| err = fmt.Errorf("unexpected status code: %d", resp.StatusCode) | ||
| return |
Refs #136