mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-28 20:21:44 +00:00
feat: add cachefly deployer
This commit is contained in:
19
internal/pkg/vendors/cachefly-sdk/api.go
vendored
Normal file
19
internal/pkg/vendors/cachefly-sdk/api.go
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package cacheflysdk
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func (c *Client) CreateCertificate(req *CreateCertificateRequest) (*CreateCertificateResponse, error) {
|
||||
params := make(map[string]any)
|
||||
jsonData, _ := json.Marshal(req)
|
||||
json.Unmarshal(jsonData, ¶ms)
|
||||
|
||||
result := CreateCertificateResponse{}
|
||||
err := c.sendRequestWithResult(http.MethodPost, "/certificates", params, &result)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &result, nil
|
||||
}
|
Reference in New Issue
Block a user