Files
EdgeAPI/internal/dnsclients/dnspod/response_base.go

19 lines
413 B
Go
Raw Normal View History

2024-05-17 18:27:26 +08:00
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
2022-10-20 18:06:27 +08:00
package dnspod
type BaseResponse struct {
Status struct {
Code string `json:"code"`
Message string `json:"message"`
} `json:"status"`
}
func (this *BaseResponse) IsOk() bool {
return this.Status.Code == "1"
}
func (this *BaseResponse) LastError() (code string, message string) {
return this.Status.Code, this.Status.Message
}