feat: new deployment provider: ctcccloud cms
This commit is contained in:
@@ -15,7 +15,7 @@ type CreateCertResponse struct {
|
||||
baseResult
|
||||
|
||||
ReturnObj *struct {
|
||||
Id int32 `json:"id"`
|
||||
Id int64 `json:"id"`
|
||||
} `json:"returnObj,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type QueryCertDetailRequest struct {
|
||||
Id *int32 `json:"id,omitempty"`
|
||||
Id *int64 `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
UsageMode *int32 `json:"usage_mode,omitempty"`
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package icdn
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/go-resty/resty/v2"
|
||||
@@ -36,5 +37,13 @@ func (c *Client) doRequest(request *resty.Request) (*resty.Response, error) {
|
||||
}
|
||||
|
||||
func (c *Client) doRequestWithResult(request *resty.Request, result baseResultInterface) (*resty.Response, error) {
|
||||
return c.client.DoRequestWithResult(request, result)
|
||||
response, err := c.client.DoRequestWithResult(request, result)
|
||||
if err == nil {
|
||||
statusCode := result.GetStatusCode()
|
||||
if statusCode != "" && statusCode != "100000" {
|
||||
return response, fmt.Errorf("sdkerr: api error, code='%s', message='%s', errorCode='%s', errorMessage='%s'", statusCode, result.GetMessage(), result.GetMessage(), result.GetErrorMessage())
|
||||
}
|
||||
}
|
||||
|
||||
return response, err
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (r *baseResult) GetErrorMessage() string {
|
||||
var _ baseResultInterface = (*baseResult)(nil)
|
||||
|
||||
type CertRecord struct {
|
||||
Id int32 `json:"id"`
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
CN string `json:"cn"`
|
||||
SANs []string `json:"sans"`
|
||||
|
||||
Reference in New Issue
Block a user