chore: move '/internal/pkg' to '/pkg'
This commit is contained in:
27
pkg/sdk3rd/dcloud/unicloud/api_create_domain_with_cert.go
Normal file
27
pkg/sdk3rd/dcloud/unicloud/api_create_domain_with_cert.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package unicloud
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type CreateDomainWithCertRequest struct {
|
||||
Provider string `json:"provider"`
|
||||
SpaceId string `json:"spaceId"`
|
||||
Domain string `json:"domain"`
|
||||
Cert string `json:"cert"`
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
type CreateDomainWithCertResponse struct {
|
||||
apiResponseBase
|
||||
}
|
||||
|
||||
func (c *Client) CreateDomainWithCert(req *CreateDomainWithCertRequest) (*CreateDomainWithCertResponse, error) {
|
||||
if err := c.ensureApiUserTokenExists(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp := &CreateDomainWithCertResponse{}
|
||||
err := c.sendRequestWithResult(http.MethodPost, "/host/create-domain-with-cert", req, resp)
|
||||
return resp, err
|
||||
}
|
||||
Reference in New Issue
Block a user