mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-23 17:51:44 +00:00
.github
.vscode
docker
internal
app
applicant
certificate
deployer
domain
notify
pkg
core
logging
sdk3rd
1panel
azure
baiducloud
baishan
btpanel
btwaf
bunny
cachefly
cdnfly
cmcc
dnsla
dogecloud
edgio
flexcdn
gcore
gname
goedge
lecdn
netlify
qiniu
rainyun
ratpanel
safeline
ucloud
upyun
volcengine
wangsu
cdn
cdnpro
certificate
api.go
client.go
models.go
openapi
utils
repository
rest
scheduler
statistics
workflow
migrations
ui
.dockerignore
.editorconfig
.gitignore
.goreleaser.yml
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTING_EN.md
Dockerfile
LICENSE.md
Makefile
README.md
README_EN.md
go.mod
go.sum
main.go
nixpacks.toml
53 lines
1.5 KiB
Go
53 lines
1.5 KiB
Go
package certificate
|
|
|
|
import (
|
|
"github.com/usual2970/certimate/internal/pkg/sdk3rd/wangsu/openapi"
|
|
)
|
|
|
|
type baseResponse struct {
|
|
RequestId *string `json:"requestId,omitempty"`
|
|
Code *string `json:"code,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
|
|
var _ openapi.Result = (*baseResponse)(nil)
|
|
|
|
func (r *baseResponse) SetRequestId(requestId string) {
|
|
r.RequestId = &requestId
|
|
}
|
|
|
|
type CreateCertificateRequest struct {
|
|
Name *string `json:"name,omitempty" required:"true"`
|
|
Certificate *string `json:"certificate,omitempty" required:"true"`
|
|
PrivateKey *string `json:"privateKey,omitempty"`
|
|
Comment *string `json:"comment,omitempty" `
|
|
}
|
|
|
|
type CreateCertificateResponse struct {
|
|
baseResponse
|
|
CertificateUrl string `json:"location,omitempty"`
|
|
}
|
|
|
|
type UpdateCertificateRequest struct {
|
|
Name *string `json:"name,omitempty" required:"true"`
|
|
Certificate *string `json:"certificate,omitempty"`
|
|
PrivateKey *string `json:"privateKey,omitempty"`
|
|
Comment *string `json:"comment,omitempty" `
|
|
}
|
|
|
|
type UpdateCertificateResponse struct {
|
|
baseResponse
|
|
}
|
|
|
|
type ListCertificatesResponse struct {
|
|
baseResponse
|
|
Certificates []*struct {
|
|
CertificateId string `json:"certificate-id"`
|
|
Name string `json:"name"`
|
|
Comment string `json:"comment"`
|
|
ValidityFrom string `json:"certificate-validity-from"`
|
|
ValidityTo string `json:"certificate-validity-to"`
|
|
Serial string `json:"certificate-serial"`
|
|
} `json:"ssl-certificates,omitempty"`
|
|
}
|