altera soa-edit-api para INCEPTION-INCREMENT

This commit is contained in:
2026-09-15 10:12:17 -03:00
parent 2408be5e25
commit 653744867c
4 changed files with 41 additions and 9 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ import (
"time"
)
const soaEditAPIIncrease = "INCREASE"
const soaEditAPIInceptionIncrement = "INCEPTION-INCREMENT"
type HTTPClient interface {
Do(*http.Request) (*http.Response, error)
@@ -97,7 +97,7 @@ func (c *Client) ListZones(ctx context.Context) ([]Zone, error) {
}
func (c *Client) CreateZone(ctx context.Context, zone Zone) (Zone, error) {
zone.SOAEditAPI = soaEditAPIIncrease
zone.SOAEditAPI = soaEditAPIInceptionIncrement
var created Zone
if err := c.do(ctx, http.MethodPost, c.path("/zones"), zone, &created); err != nil {
return Zone{}, err
@@ -139,7 +139,7 @@ func (c *Client) EnsureAllZonesSOAEditAPI(ctx context.Context) error {
}
func (c *Client) SetZoneSOAEditAPI(ctx context.Context, zoneID string) error {
body := Zone{SOAEditAPI: soaEditAPIIncrease}
body := Zone{SOAEditAPI: soaEditAPIInceptionIncrement}
return c.do(ctx, http.MethodPut, c.path("/zones/"+url.PathEscape(zoneID)), body, nil)
}