mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 21:49:52 +00:00
19 lines
423 B
Go
19 lines
423 B
Go
package safelinesdk
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
func (c *Client) UpdateCertificate(req *UpdateCertificateRequest) (*UpdateCertificateResponse, error) {
|
|
params := make(map[string]any)
|
|
jsonData, _ := json.Marshal(req)
|
|
json.Unmarshal(jsonData, ¶ms)
|
|
|
|
result := UpdateCertificateResponse{}
|
|
err := c.sendRequestWithResult("/api/open/cert", params, &result)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &result, nil
|
|
}
|