- Move Server/Domain/DNSRecord/Bucket/StorageInstance/CDNInstance/Order/Error structs to internal/model/ - Provider interfaces now reference model.* types - Rainyun provider implementations import model package for data types - CLI commands updated to use model.DNSRecord directly Separates pure data structures from service contract interfaces, following hexagonal architecture: models (entities) live independently from ports (provider interfaces) and adapters (rainyun/* implementations).
19 lines
257 B
Go
19 lines
257 B
Go
package model
|
|
|
|
import "fmt"
|
|
|
|
type Error struct {
|
|
Code int
|
|
Message string
|
|
Detail string
|
|
Raw []byte
|
|
}
|
|
|
|
func (e *Error) Error() string {
|
|
return e.Message
|
|
}
|
|
|
|
func (e *Error) Debug() string {
|
|
return fmt.Sprintf("%s\n%s", e.Detail, string(e.Raw))
|
|
}
|