Skip to content

Commit

Permalink
Add func GetZoneDelegatedByRef (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngarratt authored May 16, 2024
1 parent 1cec31a commit b3db346
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions object_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ type IBObjectManager interface {
GetTXTRecordByRef(ref string) (*RecordTXT, error)
GetZoneAuthByRef(ref string) (*ZoneAuth, error)
GetZoneDelegated(fqdn string) (*ZoneDelegated, error)
GetZoneDelegatedByRef(ref string) (*ZoneDelegated, error)
GetCapacityReport(name string) ([]CapacityReport, error)
GetUpgradeStatus(statusType string) ([]UpgradeStatus, error)
GetAllMembers() ([]Member, error)
Expand Down Expand Up @@ -503,6 +504,17 @@ func (objMgr *ObjectManager) GetZoneAuth() ([]ZoneAuth, error) {
return res, err
}

// GetZoneDelegatedByRef returns the delegated zone by ref
func (objMgr *ObjectManager) GetZoneDelegatedByRef(ref string) (*ZoneDelegated, error) {
zoneDelegated := NewZoneDelegated(ZoneDelegated{})
err := objMgr.connector.GetObject(
zoneDelegated, ref, NewQueryParams(false, nil), &zoneDelegated)
if err != nil {
return nil, err
}
return zoneDelegated, nil
}

// GetZoneDelegated returns the delegated zone
func (objMgr *ObjectManager) GetZoneDelegated(fqdn string) (*ZoneDelegated, error) {
if len(fqdn) == 0 {
Expand Down

0 comments on commit b3db346

Please sign in to comment.