First try to add DI
This commit is contained in:
@ -18,14 +18,22 @@ type Record struct {
|
|||||||
TTL uint16
|
TTL uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
type Response struct {
|
type Actions interface {
|
||||||
|
AddRecord(Record) response
|
||||||
|
DeleteRecord() response
|
||||||
|
UpdateRecord(Record) response
|
||||||
|
ReadRecords() (error, *[]Record)
|
||||||
|
}
|
||||||
|
|
||||||
|
type Manager interface {
|
||||||
|
New() *Actions
|
||||||
|
}
|
||||||
|
|
||||||
|
type response struct {
|
||||||
error string
|
error string
|
||||||
message string
|
message string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Actions interface {
|
func New(manager_config Manager) *Actions {
|
||||||
AddRecord(Record) Response
|
return manager_config.New()
|
||||||
DeleteRecord() Response
|
|
||||||
UpdateRecord(Record) Response
|
|
||||||
ReadRecords() (error, *[]Record)
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user