Skip to content

Releases: joeig/go-powerdns

v3.14.0

21 Sep 14:56
Compare
Choose a tag to compare

New

  • Rename Client.TSIGKey to Client.TSIGKeys (#88) to be consistent with other service names.

Deprecate

  • Client.TSIGKey is now deprecated and will be removed with the next major release (#88). Please replace Client.TSIGKey with Client.TSIGKeys. Client.TSIGKey internally uses Client.TSIGKeys.

v3.13.1

21 Sep 14:37
Compare
Choose a tag to compare

Fixes

  • Documentation of New and NewClient (#95)

v3.13.0

21 Sep 14:25
Compare
Choose a tag to compare

New

  • New with functional options (#93).

Deprecate

  • NewClient is now deprecated and will be removed with the next major release (#93). Please see the migration path below. NewClient internally uses New.

How do I migrate NewClient to New?

The functionality of NewClient and New is identical, but their signature is not. This is the function signature of NewClient:

// Deprecated!
func NewClient(baseURL string, vHost string, headers map[string]string, httpClient *http.Client) *Client

New replaces the headers and httpClient parameters with options:

func New(baseURL string, vHost string, options ...NewOption) *Client

Possible options:

func WithHeaders(headers map[string]string) NewOption // Corresponds to the `headers` parameter
func WithHTTPClient(httpClient *http.Client) NewOption // Corresponds to the `httpClient` parameter
func WithAPIKey(key string) NewOption // Corresponds to the `headers` parameter with `map[string]string{"X-API-Key": key}`

I need neither an API key, custom headers, nor a custom http.Client.

Omit the options completely.

- client := powerdns.NewClient("http://localhost:80", "localhost", nil, nil)
+ client := powerdns.New("http://localhost:80", "localhost")

I only need the X-API-Key header.

Use the WithAPIKey option.

- client := powerdns.NewClient("http://localhost:80", "localhost", map[string]string{"X-API-Key": "apipw"}, nil)
+ client := powerdns.New("http://localhost:80", "localhost", powerdns.WithAPIKey("apipw"))

I need custom headers and a custom http.Client.

Use the WithHeaders and WithHTTPClient options.

- client := powerdns.NewClient("http://localhost:80", "localhost", map[string]string{"X-Custom": "foo"}, &http.Client{})
+ client := powerdns.New("http://localhost:80", "localhost", powerdns.WithHeaders(map[string]string{"X-Custom": "foo"}), powerdns.WithHTTPClient(&http.Client{}))

v3.12.0

14 Aug 06:42
Compare
Choose a tag to compare

New

  • Support Go 1.23 (#90)

Deprecate

v3.11.0

26 Jul 13:11
Compare
Choose a tag to compare

New

  • Support PowerDNS Authoritative Server 4.9 (#87)

Deprecate

  • Deactivate automated tests for PowerDNS Authoritative Server 4.6, which is end-of-life (#87)

v3.10.0

09 Feb 08:20
Compare
Choose a tag to compare

New

  • Support Go 1.22 (#76)

Deprecate

  • Deprecate Go 1.20 in accordance with Go's version support policy (#76)
    Note that the minimum Go version that is required to compile this module is unaffected and remains 1.16.

v3.9.0

09 Feb 07:59
Compare
Choose a tag to compare

New

v3.8.0

30 Dec 18:27
Compare
Choose a tag to compare

New

v3.7.0

08 Oct 07:41
Compare
Choose a tag to compare

New

  • Support Go 1.21 (#64)
  • Support PowerDNS Authoritative Server 4.8 (#65)

Deprecate

  • Deprecate Go 1.18 in accordance with Go's version support policy (#64)
    Note that the minimum Go version that is required to compile this module is unaffected and remains 1.16.
  • Deprecate support for PowerDNS Authoritative Server 4.5 (#65)

v3.6.0

13 Sep 12:49
Compare
Choose a tag to compare

New