6
internal/pkg/vendors/1panel-sdk/api.go
vendored
6
internal/pkg/vendors/1panel-sdk/api.go
vendored
@@ -17,6 +17,12 @@ func (c *Client) SearchWebsiteSSL(req *SearchWebsiteSSLRequest) (*SearchWebsiteS
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *Client) GetWebsiteSSL(req *GetWebsiteSSLRequest) (*GetWebsiteSSLResponse, error) {
|
||||
resp := &GetWebsiteSSLResponse{}
|
||||
err := c.sendRequestWithResult(http.MethodGet, fmt.Sprintf("/websites/ssl/%d", req.SSLID), req, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *Client) UploadWebsiteSSL(req *UploadWebsiteSSLRequest) (*UploadWebsiteSSLResponse, error) {
|
||||
resp := &UploadWebsiteSSLResponse{}
|
||||
err := c.sendRequestWithResult(http.MethodPost, "/websites/ssl/upload", req, resp)
|
||||
|
||||
22
internal/pkg/vendors/1panel-sdk/models.go
vendored
22
internal/pkg/vendors/1panel-sdk/models.go
vendored
@@ -59,6 +59,28 @@ type SearchWebsiteSSLResponse struct {
|
||||
} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type GetWebsiteSSLRequest struct {
|
||||
SSLID int64 `json:"-"`
|
||||
}
|
||||
|
||||
type GetWebsiteSSLResponse struct {
|
||||
baseResponse
|
||||
Data *struct {
|
||||
ID int64 `json:"id"`
|
||||
Provider string `json:"provider"`
|
||||
Description string `json:"description"`
|
||||
PrimaryDomain string `json:"primaryDomain"`
|
||||
Domains string `json:"domains"`
|
||||
Type string `json:"type"`
|
||||
Organization string `json:"organization"`
|
||||
Status string `json:"status"`
|
||||
StartDate string `json:"startDate"`
|
||||
ExpireDate string `json:"expireDate"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type UploadWebsiteSSLRequest struct {
|
||||
Type string `json:"type"`
|
||||
SSLID int64 `json:"sslID"`
|
||||
|
||||
Reference in New Issue
Block a user