Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add func GetZoneDelegatedByRef #172

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions object_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,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 @@ -236,6 +237,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