Skip to main content

Overview

The Gcore Go SDK provides convenient access to the Gcore REST API from applications written in Go. Built with Stainless, it offers type-safe client libraries for managing cloud infrastructure, CDN resources, DNS, object storage, video streaming, and more.

Quick Start

Get up and running with the Gcore Go SDK in minutes

Installation

Install the SDK and configure your environment

API Reference

Explore the complete API documentation

Examples

View code examples on GitHub

Key Features

Type-Safe Client

Fully typed Go client with compile-time safety and IDE autocomplete

Auto-Pagination

Built-in support for automatic pagination with ListAutoPaging() methods

Error Handling

Comprehensive error types with detailed request/response information

Retry Logic

Automatic retries with exponential backoff for transient failures

Middleware Support

Extensible middleware system for custom request/response handling

Request Options

Flexible configuration with per-request and client-level options

Services

The Gcore Go SDK provides access to multiple Gcore services:

Cloud

Virtual machines, bare metal servers, Kubernetes, and more

CDN

Content delivery network resources and configuration

DNS

DNS zone and record management

Storage

S3-compatible object storage

Streaming

Live and on-demand video streaming

IAM

Identity and access management

WAAP

Web application and API protection

Security

Security services and monitoring

Fastedge

Edge computing applications

Quick Example

package main

import (
	"context"
	"fmt"

	"github.com/G-Core/gcore-go"
	"github.com/G-Core/gcore-go/cloud"
	"github.com/G-Core/gcore-go/option"
)

func main() {
	client := gcore.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("GCORE_API_KEY")
	)
	
	project, err := client.Cloud.Projects.New(context.TODO(), cloud.ProjectNewParams{
		Name: "my-project",
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", project.ID)
}

Requirements

This library requires Go 1.22 or higher.

Next Steps

Authentication

Learn how to configure API keys and authenticate requests

Error Handling

Understand error types and how to handle API errors

Pagination

Work with paginated list endpoints efficiently

Request Options

Customize requests with headers, timeouts, and more

Build docs developers (and LLMs) love