Go scaffold and pkg/godaddy/ DNS client #3

Closed
opened 2026-06-13 15:33:54 +00:00 by ldraney · 2 comments
Owner

Type

Feature

Lineage

Depends on #1 (docs foundation, merged). First code ticket for project-godaddy-tofu.

Repo

ldraney/godaddy-tofu

User Story

As a provider developer
I want a scaffolded Go module with a working GoDaddy API client
So that the DNS client methods are proven against the live API before provider wiring

Context

Go module with Terraform Plugin Framework dependency. The pkg/godaddy/ client package wraps the GoDaddy REST API directly using net/http and sso-key auth. DNS endpoints are P0 — the client must cover all 6 DNS record endpoints from docs/dns-endpoints.md.

The provider skeleton (main.go, provider.go) should compile and register with Tofu but doesn't need working resources yet — that's a follow-up issue.

Reference: docs/swagger_domains.json for endpoint contracts, docs/auth.md for auth format.

File Targets

  • go.mod / go.sum — Go module with hashicorp/terraform-plugin-framework dependency
  • main.go — provider entry point (plugin serving)
  • provider.go — provider struct with api_key and api_secret config, resource/data source registration (stubs)
  • pkg/godaddy/client.goClient struct, NewClient(apiKey, apiSecret string, opts ...Option), sso-key auth header, base URL config, WithBaseURL option
  • pkg/godaddy/dns.goDNSRecord struct, all 6 DNS methods:
    • GetRecords(domain, recordType, name string) ([]DNSRecord, error)
    • ReplaceRecords(domain, recordType, name string, records []DNSRecord) error
    • DeleteRecords(domain, recordType, name string) error
    • ReplaceAllRecords(domain string, records []DNSRecord) error
    • ReplaceRecordsByType(domain, recordType string, records []DNSRecord) error
    • AddRecords(domain string, records []DNSRecord) error
  • pkg/godaddy/domains.goDomain struct, read-only domain methods:
    • ListDomains() ([]Domain, error)
    • GetDomain(domain string) (*Domain, error)

Feature Flag

None.

Acceptance Criteria

  • go build . compiles without errors
  • go vet ./... passes
  • pkg/godaddy.NewClient("key", "secret") instantiates without error
  • All 6 DNS client methods exist and have correct signatures
  • ListDomains() and GetDomain() exist with correct signatures
  • Provider skeleton registers with terraform-plugin-framework (compiles, tofu init doesn't error)

Test Expectations

  • go build ./... succeeds
  • go vet ./... clean

Constraints

  • Follow Go conventions (no getters, error returns, context.Context on all methods if appropriate)
  • net/http for HTTP client (no external HTTP library)
  • JSON marshaling with encoding/json struct tags
  • Provider skeleton is stubs only — no working CRUD yet

Checklist

  • go.mod with terraform-plugin-framework
  • main.go + provider.go skeleton
  • pkg/godaddy/client.go with auth
  • pkg/godaddy/dns.go with all 6 methods
  • pkg/godaddy/domains.go with read-only methods
  • Compiles clean
  • Closes #1 deliverable chain
  • project-godaddy-tofu
  • docs/dns-endpoints.md — endpoint contract
  • docs/auth.md — auth format
### Type Feature ### Lineage Depends on #1 (docs foundation, merged). First code ticket for `project-godaddy-tofu`. ### Repo `ldraney/godaddy-tofu` ### User Story As a provider developer I want a scaffolded Go module with a working GoDaddy API client So that the DNS client methods are proven against the live API before provider wiring ### Context Go module with Terraform Plugin Framework dependency. The `pkg/godaddy/` client package wraps the GoDaddy REST API directly using `net/http` and `sso-key` auth. DNS endpoints are P0 — the client must cover all 6 DNS record endpoints from `docs/dns-endpoints.md`. The provider skeleton (`main.go`, `provider.go`) should compile and register with Tofu but doesn't need working resources yet — that's a follow-up issue. Reference: `docs/swagger_domains.json` for endpoint contracts, `docs/auth.md` for auth format. ### File Targets - `go.mod` / `go.sum` — Go module with `hashicorp/terraform-plugin-framework` dependency - `main.go` — provider entry point (plugin serving) - `provider.go` — provider struct with `api_key` and `api_secret` config, resource/data source registration (stubs) - `pkg/godaddy/client.go` — `Client` struct, `NewClient(apiKey, apiSecret string, opts ...Option)`, `sso-key` auth header, base URL config, `WithBaseURL` option - `pkg/godaddy/dns.go` — `DNSRecord` struct, all 6 DNS methods: - `GetRecords(domain, recordType, name string) ([]DNSRecord, error)` - `ReplaceRecords(domain, recordType, name string, records []DNSRecord) error` - `DeleteRecords(domain, recordType, name string) error` - `ReplaceAllRecords(domain string, records []DNSRecord) error` - `ReplaceRecordsByType(domain, recordType string, records []DNSRecord) error` - `AddRecords(domain string, records []DNSRecord) error` - `pkg/godaddy/domains.go` — `Domain` struct, read-only domain methods: - `ListDomains() ([]Domain, error)` - `GetDomain(domain string) (*Domain, error)` ### Feature Flag None. ### Acceptance Criteria - [ ] `go build .` compiles without errors - [ ] `go vet ./...` passes - [ ] `pkg/godaddy.NewClient("key", "secret")` instantiates without error - [ ] All 6 DNS client methods exist and have correct signatures - [ ] `ListDomains()` and `GetDomain()` exist with correct signatures - [ ] Provider skeleton registers with `terraform-plugin-framework` (compiles, `tofu init` doesn't error) ### Test Expectations - [ ] `go build ./...` succeeds - [ ] `go vet ./...` clean ### Constraints - Follow Go conventions (no getters, error returns, context.Context on all methods if appropriate) - `net/http` for HTTP client (no external HTTP library) - JSON marshaling with `encoding/json` struct tags - Provider skeleton is stubs only — no working CRUD yet ### Checklist - [ ] go.mod with terraform-plugin-framework - [ ] main.go + provider.go skeleton - [ ] pkg/godaddy/client.go with auth - [ ] pkg/godaddy/dns.go with all 6 methods - [ ] pkg/godaddy/domains.go with read-only methods - [ ] Compiles clean ### Related - Closes #1 deliverable chain - `project-godaddy-tofu` - `docs/dns-endpoints.md` — endpoint contract - `docs/auth.md` — auth format
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-1424-2026-06-13

Issue body is fully complete against the feature template -- all 12 sections present, file targets verified against existing docs, acceptance criteria are agent-testable. Two traceability gaps remain:

  • [SCOPE] Story note story-godaddy-tofu-dns-iac does not exist in pal-e-docs (user-stories table references it but the note is missing)
  • [SCOPE] Architecture note arch-godaddy-tofu does not exist in pal-e-docs (board item carries arch:godaddy-tofu label but no backing note)
## Scope Review: NEEDS_REFINEMENT Review note: `review-1424-2026-06-13` Issue body is fully complete against the feature template -- all 12 sections present, file targets verified against existing docs, acceptance criteria are agent-testable. Two traceability gaps remain: - **[SCOPE]** Story note `story-godaddy-tofu-dns-iac` does not exist in pal-e-docs (user-stories table references it but the note is missing) - **[SCOPE]** Architecture note `arch-godaddy-tofu` does not exist in pal-e-docs (board item carries `arch:godaddy-tofu` label but no backing note)
Author
Owner

Scope Review: READY

Review note: review-1424-2026-06-13-r2

Re-review after previous NEEDS_REFINEMENT. Both scope items resolved: story note story-godaddy-tofu-dns-iac and all three architecture notes (arch-domain-godaddy-tofu, arch-dataflow-godaddy-tofu, arch-deployment-godaddy-tofu) now exist in pal-e-docs. Template complete, traceability triangle satisfied, file targets verified against greenfield repo. Ready to move to next_up.

## Scope Review: READY Review note: `review-1424-2026-06-13-r2` Re-review after previous NEEDS_REFINEMENT. Both scope items resolved: story note `story-godaddy-tofu-dns-iac` and all three architecture notes (`arch-domain-godaddy-tofu`, `arch-dataflow-godaddy-tofu`, `arch-deployment-godaddy-tofu`) now exist in pal-e-docs. Template complete, traceability triangle satisfied, file targets verified against greenfield repo. Ready to move to next_up.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/godaddy-tofu#3
No description provided.