mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-24 20:08:00 +00:00
refactor: clean code
This commit is contained in:
34
internal/pkg/sdk3rd/safeline/models.go
Normal file
34
internal/pkg/sdk3rd/safeline/models.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package safelinesdk
|
||||
|
||||
type BaseResponse interface {
|
||||
GetErrCode() *string
|
||||
GetErrMsg() *string
|
||||
}
|
||||
|
||||
type baseResponse struct {
|
||||
ErrCode *string `json:"err,omitempty"`
|
||||
ErrMsg *string `json:"msg,omitempty"`
|
||||
}
|
||||
|
||||
func (r *baseResponse) GetErrCode() *string {
|
||||
return r.ErrCode
|
||||
}
|
||||
|
||||
func (r *baseResponse) GetErrMsg() *string {
|
||||
return r.ErrMsg
|
||||
}
|
||||
|
||||
type UpdateCertificateRequest struct {
|
||||
Id int32 `json:"id"`
|
||||
Type int32 `json:"type"`
|
||||
Manual *UpdateCertificateRequestBodyManul `json:"manual"`
|
||||
}
|
||||
|
||||
type UpdateCertificateRequestBodyManul struct {
|
||||
Crt string `json:"crt"`
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
type UpdateCertificateResponse struct {
|
||||
baseResponse
|
||||
}
|
Reference in New Issue
Block a user