Skip to content

Repository files navigation

platform-core-go

Shared platform Go library (AWS/Cloudflare/Kubernetes/Vault utilities + core helpers).

Conventional Commits Go AWS Cloudflare Vault

Note

This README follows the same onboarding style as platform-core to keep cross-language adoption simple.

Table of Contents

What this is

platform-core-go is the Go counterpart to platform-core (Python), focused on reusable, minimal, dependency-light platform helpers:

  • AWS helpers (SDK client factory, common STS patterns)
  • Cloudflare helpers (HTTP client, retries, pagination)
  • Vault helpers (KV v2 read/write with timeouts)
  • Optional Kubernetes helpers (client initialization wrappers)
  • Core utilities (logging, retry primitives, HTTP helpers)

Scope and non-goals

  • In scope
    • Small, explicit package APIs
    • Safe defaults for timeouts, retries, and error handling
    • Reusable code for internal platform services and tooling
  • Non-goals
    • Product/business logic
    • Infrastructure-as-code generation/deployment logic
    • Wrapping entire provider SDK surfaces

Repository packages

  • Implemented now
    • internal/httpx: Shared retry/backoff and HTTP client helpers
    • cloudflare: API client with bounded retries and ZoneIDByName
    • vault: KV v2 client helpers (ReadKVv2, WriteKVv2)
    • awsx: AWS config factory with region validation and STS helpers
  • Planned next
    • kubernetes (optional): Thin wrapper for kubeconfig/in-cluster client setup

Behavior contract

Cross-language behavior alignment (Python <-> Go) is tracked in:

  • docs/behavior-contract.md

This document is the source of truth for:

  • timeout defaults
  • retry/backoff policy
  • env var precedence
  • error handling conventions
  • pagination behavior

Development

Local setup

go version
go mod tidy

Common commands

go test ./...
go test -race ./...
gofmt -s -w .
go vet ./...
staticcheck ./...
govulncheck ./...

If golangci-lint is configured in this repo:

golangci-lint run

Contributing

See .github/CONTRIBUTING.md.

Security

  • Do not commit secrets (tokens, keys, credentials)
  • Prefer least privilege IAM and API token scopes
  • Keep retries bounded and avoid logging sensitive payloads

License

See LICENSE.md.

About

Shared platform Go library (AWS/Cloudflare/Kubernetes/Vault utilities + core helpers)

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages