mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 13:39:53 +00:00
39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
package cachefly
|
|
|
|
type BaseResponse interface {
|
|
GetMessage() string
|
|
}
|
|
|
|
type baseResponse struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
|
|
func (r *baseResponse) GetMessage() string {
|
|
if r.Message != nil {
|
|
return *r.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateCertificateRequest struct {
|
|
Certificate string `json:"certificate"`
|
|
CertificateKey string `json:"certificateKey"`
|
|
Password *string `json:"password"`
|
|
}
|
|
|
|
type CreateCertificateResponse struct {
|
|
baseResponse
|
|
Id string `json:"_id"`
|
|
SubjectCommonName string `json:"subjectCommonName"`
|
|
SubjectNames []string `json:"subjectNames"`
|
|
Expired bool `json:"expired"`
|
|
Expiring bool `json:"expiring"`
|
|
InUse bool `json:"inUse"`
|
|
Managed bool `json:"managed"`
|
|
Services []string `json:"services"`
|
|
Domains []string `json:"domains"`
|
|
NotBefore string `json:"notBefore"`
|
|
NotAfter string `json:"notAfter"`
|
|
CreatedAt string `json:"createdAt"`
|
|
}
|