-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ssl): Add API interfaces for managing SSL certificates #139
base: master
Are you sure you want to change the base?
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. Instructions 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
每个接口都调用go标准包的接口,拿到结果后做unmarshal,建议封装一下,参考一下上面的postRequest
defer resp.Body.Close() | ||
if resp.StatusCode != http.StatusOK { | ||
err = fmt.Errorf("unexpected status code: %d", resp.StatusCode) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另外,针对新增的接口需要补充单元测试
Refs #136