feat: support multiple sites on deployment to baotapanel site

This commit is contained in:
Fu Diwei
2025-02-18 16:14:54 +08:00
parent 03d2f4ca32
commit c451bf5e03
12 changed files with 293 additions and 40 deletions

View File

@@ -2,20 +2,20 @@ package btpanelsdk
type BaseResponse interface {
GetStatus() *bool
GetMsg() *string
GetMessage() *string
}
type baseResponse struct {
Status *bool `json:"status,omitempty"`
Msg *string `json:"msg,omitempty"`
Status *bool `json:"status,omitempty"`
Message *string `json:"msg,omitempty"`
}
func (r *baseResponse) GetStatus() *bool {
return r.Status
}
func (r *baseResponse) GetMsg() *string {
return r.Msg
func (r *baseResponse) GetMessage() *string {
return r.Message
}
type ConfigSavePanelSSLRequest struct {
@@ -46,3 +46,30 @@ type SystemServiceAdminRequest struct {
type SystemServiceAdminResponse struct {
baseResponse
}
type SSLCertSaveCertRequest struct {
PrivateKey string `json:"key"`
Certificate string `json:"csr"`
}
type SSLCertSaveCertResponse struct {
baseResponse
SSLHash string `json:"ssl_hash"`
}
type SSLSetBatchCertToSiteRequest struct {
BatchInfo []*SSLSetBatchCertToSiteRequestBatchInfo `json:"BatchInfo"`
}
type SSLSetBatchCertToSiteRequestBatchInfo struct {
SSLHash string `json:"ssl_hash"`
SiteName string `json:"siteName"`
CertName string `json:"certName"`
}
type SSLSetBatchCertToSiteResponse struct {
baseResponse
TotalCount int32 `json:"total"`
SuccessCount int32 `json:"success"`
FailedCount int32 `json:"faild"`
}