feat: backend support for ratpanel

This commit is contained in:
耗子
2025-05-16 02:33:46 +08:00
parent 851ad70a6c
commit bd4aa4806f
10 changed files with 586 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package btpanelsdk
type BaseResponse interface {
GetMessage() string
}
type baseResponse struct {
Message *string `json:"msg,omitempty"`
}
func (r *baseResponse) GetMessage() string {
if r.Message != nil {
return *r.Message
}
return ""
}
type SettingCertRequest struct {
Certificate string `json:"cert"`
PrivateKey string `json:"key"`
}
type SettingCertResponse struct {
baseResponse
}
type WebsiteCertRequest struct {
SiteName string `json:"name"`
Certificate string `json:"cert"`
PrivateKey string `json:"key"`
}
type WebsiteCertResponse struct {
baseResponse
}