Skip to content

fivetran/go-fivetran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fivetran SDK for Go

Go Reference

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.

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:

REST API Endpoint REST API Version SDK Service
List all Users v1 UsersListService
Retrieve user details v1 UserDetailsService
Invite a user v1 UserInviteService
Modify a user v1 UserModifyService
Delete a user v1 UserDeleteService
List all connector memberships v1 UserConnectorMembershipsListService
Retrieve connector membership v1 UserConnectorMembershipDetailsService
Add connector membership v1 UserConnectorMembershipCreateService
Update connector membership v1 UserConnectorMembershipModifyService
Delete connector membership v1 UserConnectorMembershipDeleteService
List all group memberships v1 UserGroupMembershipsListService
Retrieve group membership v1 UserGroupMembershipDetailsService
Add group membership v1 UserGroupMembershipCreateService
Update group membership v1 UserGroupMembershipModifyService
Delete group membership v1 UserGroupMembershipDeleteService
REST API Endpoint REST API Version SDK Service
Create a group v1 GroupCreateService
List all groups v1 GroupsListService
Retrieve group details v1 GroupDetailsService
Modify a group v1 GroupModifyService
List all connectors within a group v1 GroupListConnectorsService
List all users within a group v1 GroupListUsersService
Add a user to a group v1 GroupAddUserService
Remove a user from a group v1 GroupRemoveUserService
Delete a group v1 GroupDeleteService
Retrieve Group Public SSH Key v1 GroupSshKeyService
Retrieve Group Service Account v1 GroupServiceAccountService
REST API Endpoint REST API Version SDK Service/Config
Create a destination v1 DestinationCreateService
Retrieve destination details v1 DestinationDetailsService
Modify a destination v1 DestinationModifyService
Run destination setup tests v1 DestinationSetupTestsService
Delete a destination v1 DestinationDeleteService
Destination Config v1 DestinationConfig
REST API Endpoint REST API Version SDK Service/Config/Auth
Retrieve source metadata v1 ConnectorsSourceMetadataService
Create a connector v2 ConnectorCreateService
Retrieve connector details v2 ConnectorDetailsService
Modify a connector v2 ConnectorModifyService
Sync connector data v1 ConnectorSyncService
Re-sync connector table data v1 ConnectorReSyncTableService
Run connector setup tests v2 ConnectorSetupTestsService
Delete a connector v1 ConnectorDeleteService
Retrieve a connector schema config v1 ConnectorSchemaDetailsService
Retrieve source table columns config v1 ConnectorColumnConfigListService
Reload a connector schema config v1 ConnectorSchemaReloadService
Create a Connector Schema Config v1 ConnectorSchemaConfigCreateService
Modify a connector schema config v1 ConnectorSchemaConfigUpdateService
Modify a connector database schema config v1 ConnectorDatabaseSchemaConfigModifyService
Modify a connector table config v1 ConnectorTableConfigModifyService
Modify a connector column config v1 ConnectorColumnConfigModifyService
Connector Config v1 ConnectorConfig
ConnectorConfigReports
ConnectorConfigProjectCredentials
ConnectorConfigCustomTables
Connector Auth v1 ConnectorAuth
ConnectorAuthClientAccess
Connect Card v1 ConnectCardService
REST API Endpoint REST API Version SDK Service
Create dbt Project v1 DbtProjectCreateService
Retrieve dbt Project Details v1 DbtProjectDetailsService
Retrieve dbt Projects List v1 DbtProjectsListService
Retrieve dbt Model Details v1 DbtModelDetailsService
Retrieve dbt Models List v1 DbtModelsListService
Update dbt Project v1 DbtProjectModifyService
Delete dbt Project v1 DbtProjectDeleteService
Create dbt Transformation v1 DbtTransformationCreateService
Retrieve dbt Transformation Details v1 DbtTransformationDetailsService
Update dbt Transformation v1 DbtTransformationModifyService
Delete dbt Transformation v1 DbtTransformationDeleteService
Test dbt Project v1 DbtProjectTestService
REST API Endpoint REST API Version SDK Service
Approve a connector certificate v1 ConnectorCertificateApproveService
Approve a connector fingerprint v1 ConnectorFingerprintApproveService
List all approved certificates for connector v1 ConnectorCertificatesListService
List all approved fingerprints for connector v1 ConnectorFingerprintsListService
Retrieve a connector certificate details v1 ConnectorCertificateDetailsService
Retrieve a connector fingerprint details v1 ConnectorFingerprintDetailsService
Revoke a connector certificate v1 ConnectorCertificateRevokeService
Revoke a connector fingerprint v1 ConnectorFingerprintRevokeService
Approve a destination certificate v1 DestinationCertificateApproveService
Approve a destination fingerprint v1 DestinationFingerprintApproveService
List all approved certificates for destination v1 DestinationCertificatesListService
List all approved fingerprints for destination v1 DestinationFingerprintsListService
Retrieve a destination certificate details v1 DestinationCertificateDetailsService
Retrieve a destination fingerprint details v1 DestinationFingerprintDetailsService
Revoke a destination certificate v1 DestinationCertificateRevokeService
Revoke a destination fingerprint v1 DestinationFingerprintRevokeService
REST API Endpoint REST API Version SDK Service/Config
Create a Log Service v1 ExternalLoggingCreateService
Retrieve Log Service Details v1 ExternalLoggingDetailsService
Update a Log Service v1 ExternalLoggingModifyService
Delete a Log Service v1 ExternalLoggingDeleteService
Run Log Service Setup Tests v1 ExternalLoggingSetupTestsService
REST API Endpoint REST API Version SDK Service/Config
Retrieve schema metadata v1 MetadataSchemaListService
Retrieve table metadata v1 MetadataTablesListService
Retrieve column metadata v1 MetadataColumnListService
REST API Endpoint REST API Version SDK Service/Config
Create account webhook v1 WebhookAccountCreateService
Create group webhook v1 WebhookGroupCreateService
Retrieve webhook details v1 WebhookDetailsService
Update webhook v1 WebhookModifyService
Delete webhook v1 WebhookDeleteService
Retrieve the list of webhooks v1 WebhookListService
Test webhook v1 WebhookTestService
REST API Endpoint REST API Version SDK Service/Config
List all roles v1 RolesListService
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
REST API Endpoint REST API Version SDK Service/Config
List all user memberships v1 TeamUserMembershipsListService
Retrieve user membership v1 TeamUserMembershipDetailsService
Add a user to a team v1 TeamUserMembershipCreateService
Modify a user membership v1 TeamUserMembershipModifyService
Delete a user from a team v1 TeamUserMembershipDeleteService
REST API Endpoint REST API Version SDK Service/Config
List all connector memberships v1 TeamConnectorMembershipsListService
Retrieve connector membership v1 TeamConnectorMembershipDetailsService
Add connector membership v1 TeamConnectorMembershipCreateService
Update connector membership v1 TeamConnectorMembershipModifyService
Delete connector membership v1 TeamConnectorMembershipDeleteService
REST API Endpoint REST API Version SDK Service/Config
List all group memberships v1 TeamGroupMembershipsService
Retrieve group membership v1 TeamGroupMembershipDetailsService
Add group membership v1 TeamGroupMembershipCreateService
Update group membership v1 TeamGroupMembershipModifyService
Delete group membership v1 TeamGroupMembershipDeleteService
REST API Endpoint REST API Version SDK Service/Config
Create a Private Link v1 PrivateLinksCreateService
List all Private Links within Account v1 PrivateLinkListService
Retrieve Private Link Details v1 PrivateLinksDetailsService
Update a Private Link v1 PrivateLinksModifyService
Delete a Private Link v1 PrivateLinksDeleteService
REST API Endpoint REST API Version SDK Service/Config
Create a Proxy Agent v1 ProxyCreateService
List all Proxy Agents v1 ProxyListService
Retrieve Proxy Agent Details v1 ProxyDetailsService
Delete a Proxy Agent v1 ProxyDeleteService
Return all connections attached to the proxy agent v1 ProxyConnectionMembershipsListService
REST API Endpoint REST API Version SDK Service/Config
Create a Hybrid Deployment Agent v1 HybridDeploymentAgentCreateService
List Hybrid Deployment Agents v1 HybridDeploymentAgentListService
Retrieve Hybrid Deployment Agent Details v1 HybridDeploymentAgentDetailsService
Delete a Hybrid Deployment Agent v1 HybridDeploymentAgentDeleteService
Regenerate authentication keys for a Hybrid Deployment Agent v1 HybridDeploymentAgentReAuthService

Support

Please get in touch with us through our Support Portal if you have any comments, suggestions, support requests, or bug reports.