Skip to content
Get startedWebsite
Guides
Quick start

Go

Add the Rails Go module and construct a client with functional options.

Import the module (imported as rails in the README examples):

import (
"github.com/railsinfra/rails-go" // imported as rails
)

To pin a version, the README uses:

Terminal window
go get -u 'github.com/railsinfra/rails-go@v0.1.0'

Replace the version with the tag you intend to ship; go 1.22+ is required.

rails.NewClient with options from github.com/railsinfra/rails-go/option (for example option.WithAPIKey, option.WithEnvironmentProduction) matches the README’s main example.

Use the API Reference tab for endpoint shapes and examples alongside this SDK.

For Swagger UI against your gateway, follow Path A on the Quick start overview and use rails-sdk-samples/go/ (default port 8083 per the overview).