modulepackage
0.0.0-20241126215327-d36b2c976a60
Repository: https://github.com/propeldata/go-client.git
Documentation: pkg.go.dev
# README
Propel Go client
Installing
Use go get
to add it to your project's Go module dependencies.
go get github.com/propeldata/go-client
Usage
- Import the Propel go client package
import (
"github.com/propeldata/go-client"
)
- Generate an OAuth token. This step requires having a Propel account and an application. Learn more about the API authentication here.
oauthClient := client.NewOauthClient()
oauthToken, err := oauthClient.OAuthToken(ctx, "APPLICATION_ID", "APPLICATION_SECRET")
if err != nil {
return errors.New("Invalid Propel credentials")
}
- Initialize the Propel client with the retrieved token.
apiClient := client.NewApiClient(oauthToken.AccessToken)
- Perform any API request.
dataSource, err := apiClient.FetchDataSource(ctx, "dataSourceUniqueName")
if err != nil {
return err
}
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WaitForState polls a resource until it reaches the desired state.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author