add delete and push dns subcommands

This commit is contained in:
Anish Mukherjee
2022-11-22 23:08:18 +05:30
parent f8d65e2a80
commit 2e0b4726c9
3 changed files with 50 additions and 0 deletions

View File

@@ -26,3 +26,11 @@ func GetNetworkDNS(networkName string) *[]models.DNSEntry {
func CreateDNS(networkName string, payload *models.DNSEntry) *models.DNSEntry {
return request[models.DNSEntry](http.MethodPost, "/api/dns/"+networkName, payload)
}
func PushDNS() *string {
return request[string](http.MethodPost, "/api/dns/adm/pushdns", nil)
}
func DeleteDNS(networkName, domainName string) *string {
return request[string](http.MethodDelete, fmt.Sprintf("/api/dns/%s/%s", networkName, domainName), nil)
}