Skip to content

chore: migrate to stackit-sdk-go v1api and update API calls#49

Open
jojomo96 wants to merge 3 commits intomainfrom
chore/migrate-dns-sdk-v1api-
Open

chore: migrate to stackit-sdk-go v1api and update API calls#49
jojomo96 wants to merge 3 commits intomainfrom
chore/migrate-dns-sdk-v1api-

Conversation

@jojomo96
Copy link
Copy Markdown
Member

@jojomo96 jojomo96 commented Apr 3, 2026

This pull request updates the Stackit DNS provider integration to use the new v1api client from the stackit-sdk-go library, and refactors the codebase to work with the updated API types and structures. The changes remove the use of pointer-based fields in favor of direct values, streamline record and zone handling, and update all relevant tests accordingly.

Key changes include:

Migration to v1api client and updated types:

  • Switched all imports from github.com/stackitcloud/stackit-sdk-go/services/dns to github.com/stackitcloud/stackit-sdk-go/services/dns/v1api across the codebase and tests to use the updated API client. [1] [2] [3] [4] [5]
  • Updated the Go module dependency to use stackit-sdk-go/services/dns v0.19.2, which includes the new v1api.

Refactoring for new API data structures:

  • Refactored all usages of DNS zone and record set fields to use direct values instead of pointers (e.g., zone.Id instead of *zone.Id, zone.DnsName instead of *zone.DnsName). [1] [2] [3] [4]
  • Updated payload construction functions and their usages to match the new API types, removing unnecessary pointer wrapping and using direct assignment for fields like Name, Type, Ttl, and Records. [1] [2]

API method usage updates:

  • Changed API method calls to use the new DefaultAPI interface provided by v1api, and adjusted parameter passing to use direct values. [1] [2] [3]
  • Updated logging and error handling to reflect the new types and method signatures. [1] [2] [3]

Test updates for new types and structures:

  • Refactored all test fixtures and assertions to use the new value-based types for zones, record sets, and their fields. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

These changes collectively modernize the Stackit DNS provider codebase, ensuring compatibility with the latest SDK version and improving code clarity and maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant