Skip to content

Commit ac38a7e

Browse files
Updated doc.go
Updated doc.go with new dsn parameters and connector functions. Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
1 parent 5579ce8 commit ac38a7e

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

auth/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const (
1818
AuthTypeOauthM2M
1919
)
2020

21-
var authTypeNames []string = []string{"Unknown", "Pat", "OauthU2m", "OauthM2M"}
21+
var authTypeNames []string = []string{"Unknown", "Pat", "OauthU2M", "OauthM2M"}
2222

2323
func (at AuthType) String() string {
2424
if at >= 0 && int(at) < len(authTypeNames) {

connector.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ func WithMaxDownloadThreads(numThreads int) connOption {
261261
}
262262
}
263263

264+
// Setup of Oauth M2m authentication
264265
func WithClientCredentials(clientID, clientSecret string) connOption {
265266
return func(c *config.Config) {
266267
if clientID != "" && clientSecret != "" {

doc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Supported optional connection parameters can be specified in param=value and inc
3939
- userAgentEntry: Used to identify partners. Set as a string with format <isv-name+product-name>
4040
- useCloudFetch: Used to enable cloud fetch for the query execution. Default is false
4141
- maxDownloadThreads: Sets up the max number of concurrent workers for cloud fetch. Default is 10
42+
- authType: Specifies the desired authentication type. Valid values are: Pat, OauthM2M, OauthU2M
43+
- accessToken: Personal access token. Required if authType set to Pat
44+
- clientID: Specifies the client ID to use with OauthM2M
45+
- clientSecret: Specifies the client secret to use with OauthM2M
4246
4347
Supported optional session parameters can be specified in param=value and include:
4448
@@ -83,6 +87,8 @@ Supported functional options include:
8387
- WithUserAgentEntry(<isv-name+product-name> string). Used to identify partners. Optional
8488
- WithCloudFetch (bool). Used to enable cloud fetch for the query execution. Default is false. Optional
8589
- WithMaxDownloadThreads (<num_threads> int). Sets up the max number of concurrent workers for cloud fetch. Default is 10. Optional
90+
- WithAuthenticator (<authenticator> auth.Authenticator). Sets up authentication. Required if neither access token or client credentials are provided.
91+
- WithClientCredentials(<clientID> string, <clientSecret> string). Sets up Oauth M2M authentication.
8692
8793
# Query cancellation and timeout
8894

0 commit comments

Comments
 (0)