mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-07 21:19:51 +00:00
36 lines
591 B
Go
36 lines
591 B
Go
package ratpanelsdk
|
|
|
|
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
|
|
}
|