refactor: extract domain models from provider into internal/model
- 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).
This commit is contained in:
@@ -3,6 +3,7 @@ package domain
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.yoresee.cc/nightstar/ry/internal/model"
|
||||
"git.yoresee.cc/nightstar/ry/internal/output"
|
||||
"git.yoresee.cc/nightstar/ry/internal/provider"
|
||||
|
||||
@@ -66,7 +67,7 @@ func Cmd(prov *provider.Provider, out **output.Printer) *cobra.Command {
|
||||
value, _ := cmd.Flags().GetString("value")
|
||||
ttl, _ := cmd.Flags().GetInt("ttl")
|
||||
return svc.DNSAdd(cmd.Context(), args[0],
|
||||
provider.DNSRecord{Type: recType, Name: name, Value: value, TTL: ttl})
|
||||
model.DNSRecord{Type: recType, Name: name, Value: value, TTL: ttl})
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user