mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-14 21:31:45 +00:00
.github
.vscode
docker
internal
app
applicant
certificate
deployer
domain
notify
pkg
core
utils
vendors
baishan-sdk
btpanel-sdk
cachefly-sdk
api.go
client.go
models.go
cdnfly-sdk
dogecloud-sdk
edgio-sdk
gcore-sdk
gname-sdk
huaweicloud-sdk
qiniu-sdk
safeline-sdk
ucloud-sdk
volcengine-sdk
repository
rest
scheduler
statistics
workflow
migrations
ui
.dockerignore
.editorconfig
.gitignore
.goreleaser.yml
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTING_EN.md
Dockerfile
LICENSE.md
Makefile
README.md
README_EN.md
go.mod
go.sum
main.go
nixpacks.toml
usage.gif
20 lines
451 B
Go
20 lines
451 B
Go
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
|
|
}
|