# Packages
# README
Fivetran SDK for Go
go-fivetran
is the official Fivetran SDK for the Go programming language.
Checkout our CHANGELOG for information about the latest bug fixes, updates, and features added to the SDK.
Make sure you read the Fivetran REST API documentation before using the SDK.
NOTE: go-fivetran
is still in ALPHA development stage. Future versions may introduce breaking changes.
Installation
go get github.com/fivetran/go-fivetran
Importing
import (
"github.com/fivetran/go-fivetran"
)
Getting started
Initialize a new Fivetran client:
// get apiKey and apiSecret from environment variables
apiKey := os.Getenv("FIVETRAN_APIKEY")
apiSecret := os.Getenv("FIVETRAN_APISECRET")
// initialize a new client
client := fivetran.New(apiKey, apiSecret)
Each REST API endpoint has a service. Initialize a new Service:
// initialize a new UsersList service
svc := client.NewUsersList()
Call the API:
// call the REST API
resp, err := svc.Do(context.Background())
if err != nil {
...
}
Or you can simply call API in chain style. Call Do()
at the end to send an HTTP request to the REST API:
resp, err := client.NewUsersList().
Limit(3).
Do(context.Background())
Examples
You can find examples for all services in the examples directory.
API List
The following Fivetran REST API endpoints are implemented by the Fivetran SDK for Go:
User Management API
Group Management API
Destination Management API
Connector Management API
Transformations Management API
Certificate Management API
Log Service Management
Metadata API
REST API Endpoint | REST API Version | SDK Service/Config |
---|---|---|
Retrieve schema metadata | v1 | MetadataSchemaListService |
Retrieve table metadata | v1 | MetadataTablesListService |
Retrieve column metadata | v1 | MetadataColumnListService |
Webhook Management
Role Management
REST API Endpoint | REST API Version | SDK Service/Config |
---|---|---|
List all roles | v1 | RolesListService |
Team Management
REST API Endpoint | REST API Version | SDK Service/Config |
---|---|---|
List all teams | v1 | TeamsListService |
Retrieve team details | v1 | TeamsDetailsService |
Create a team | v1 | TeamsCreateService |
Modify a team | v1 | TeamsModifyService |
Delete a team role in the account | v1 | TeamsDeleteRoleInAccountService |
Delete a team | v1 | TeamsDeleteService |
Team Management User memberships
Team Management Connector memberships
Team Management Group memberships
Private Links Management
Proxy Agents Management
Local Processing Agent Management
Support
Please get in touch with us through our Support Portal if you have any comments, suggestions, support requests, or bug reports.