Skip to content

Releases: tigusigalpa/goldsky-go

v1.1.3

Choose a tag to compare

@tigusigalpa tigusigalpa released this 08 Sep 17:43

v1.1.3

v1.1.2

Choose a tag to compare

@tigusigalpa tigusigalpa released this 08 Sep 12:12

Goldsky Go SDK v1.1.0

This release focuses on reliability, safer request handling, and clearer real-world examples.

Highlights

  • Fixed pagers restarting from the first page after reaching the end.
  • Added validation for page sizes, client options, base URLs, timeouts, retry policies, chain IDs, and JSON-RPC methods.
  • Made HTTP response status authoritative when decoding RFC 9457 problem details.
  • Added support for pipeline names inside definition.name.
  • Improved GraphQL URL escaping and handling of non-JSON HTTP errors.
  • Added concurrency-safe Edge API key rotation with SetEdgeAPIKey.
  • Improved JSON-RPC response ID validation and duplicate batch response detection.

Request safety

  • Streaming subgraph deployments are no longer retried automatically because arbitrary readers cannot be replayed safely.
  • Multipart filenames and header values are protected against CR/LF injection.
  • Custom http.Client instances are copied before timeout overrides are applied.
  • Retry calculations now use the configured clock and safely handle large backoff values.
  • Successful responses containing trailing JSON values are rejected as malformed.

Examples and documentation

  • Expanded and humanized the main README with:
    • a quick-start guide;
    • service coverage overview;
    • pagination and deployment guidance;
    • GraphQL and JSON-RPC examples;
    • batch RPC usage;
    • error handling and retry recommendations;
    • clearer credential and security guidance.
  • Updated pipeline examples to match the Goldsky OpenAPI contract.
  • Fixed hexadecimal Ethereum block-number parsing in the Edge RPC example.
  • Added safer HTTP server timeouts to the webhook example.
  • Added a new 08-handle-errors example demonstrating API problem details, rate limits, missing resources, and transport failures.
  • Added Bash and PowerShell environment setup instructions.
  • Removed broken documentation links.

Public API improvements

  • Added public Clock and Sleeper interfaces for deterministic testing.
  • Added PipelineDefinition.Name.
  • SetEdgeAPIKey is now safe to call concurrently.
  • Exported enum groups now include Go lint-compatible documentation.

Compatibility

This release is backward compatible with v1.0.0. No existing public methods were removed.

Verification

The release passes:

  • go test -race ./...
  • go test ./...
  • go vet ./...
  • go build ./...
  • golint ./...
  • gofmt
  • module and Markdown-link validation

v1.0.0

Choose a tag to compare

@tigusigalpa tigusigalpa released this 08 Sep 10:49

Goldsky Go SDK — v1.0.0

Initial stable release — a Go client for the Goldsky control-plane REST API, plus Subgraph GraphQL and Edge RPC data-plane clients.

Highlights

  • Full REST control-plane coverage — 40 operations across Pipelines, Subgraphs, Webhooks, Edge, and Catalogs, built against Goldsky REST API v1.2.0.
  • GraphQL data-plane client — query public and private Subgraph endpoints.
  • Edge HTTPS JSON-RPC 2.0 client — single and batched RPC calls.
  • Streaming subgraph deploymentmultipart/form-data upload without buffering the whole bundle in memory.
  • Cancellation-aware pagers for pipelines, subgraphs, and Edge endpoints.
  • Webhook secret verification via constant-time comparison.
  • RFC 9457 application/problem+json error parsing with stable type predicates (IsNotFound, IsRateLimited, etc.).
  • Configurable retries — safe reads retried by default with Retry-After support; opt-in mutation retry.
  • Zero third-party runtime dependencies.

Installation

Requires Go 1.22 or later.

go get github.com/tigusigalpa/goldsky-go

Quick start

client, err := goldsky.NewClient(
    os.Getenv("GOLDSKY_API_KEY"),
    goldsky.WithEdgeAPIKey(os.Getenv("GOLDSKY_EDGE_API_KEY")),
)
if err != nil {
    log.Fatal(err)
}

ctx := context.Background()
page, err := client.Pipelines.List(ctx, goldsky.ListPipelinesOptions{PageSize: 50})

Assets

  • Source code (zip/tar.gz) is generated automatically by GitHub.
  • go get github.com/tigusigalpa/goldsky-go@v1.0.0