diff --git a/apis/cache/flush.go b/apis/cache/flush.go index e10576a..c26413d 100644 --- a/apis/cache/flush.go +++ b/apis/cache/flush.go @@ -8,8 +8,8 @@ import ( "github.com/mittwald/go-powerdns/pdnshttp" ) -func (c *client) Flush(ctx context.Context, serverID string, name string) (*CacheFlushResult, error) { - cfr := CacheFlushResult{} +func (c *client) Flush(ctx context.Context, serverID string, name string) (*FlushResult, error) { + cfr := FlushResult{} path := fmt.Sprintf("/api/v1/servers/%s/cache/flush", url.PathEscape(serverID)) err := c.httpClient.Put(ctx, path, &cfr, pdnshttp.WithQueryValue("domain", name)) diff --git a/apis/cache/types.go b/apis/cache/types.go index 42c485d..92a780f 100644 --- a/apis/cache/types.go +++ b/apis/cache/types.go @@ -1,7 +1,7 @@ package cache -// CacheFlushResult represent the result of a cache-flush. -type CacheFlushResult struct { +// FlushResult represent the result of a cache-flush. +type FlushResult struct { Count int `json:"count"` Result string `json:"result"` }