Documentation
¶
Index ¶
- type AuthFactory
- type AuthMethod
- func NewApiKeyAuthenticator(apiKey, headerName string) AuthMethod
- func NewNullAuthenticator() AuthMethod
- func NewPlainAuthenticator(authValue string) AuthMethod
- func NewSnowflakeAuthenticator(connections snowflake.Connections, connectionName string) (AuthMethod, error)
- func NewTokenAuthenticator(token, privateKey string) (AuthMethod, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthFactory ¶ added in v1.16.0
type AuthFactory struct {
// contains filtered or unexported fields
}
func NewAuthFactory ¶ added in v1.16.0
func NewAuthFactory() AuthFactory
func (AuthFactory) NewClientAuth ¶ added in v1.16.0
func (af AuthFactory) NewClientAuth(acct *accounts.Account) (AuthMethod, error)
type AuthMethod ¶
func NewApiKeyAuthenticator ¶
func NewApiKeyAuthenticator(apiKey, headerName string) AuthMethod
NewApiKeyAuthenticator creates an AuthMethod that adds an Authorization header containing the provided API key. If headerName is non-empty, it will be used instead of "Authorization". Connect accepts both "Authorization" and "X-Rsc-Authorization" to support certain proxy configurations upstream of Connect.
func NewNullAuthenticator ¶
func NewNullAuthenticator() AuthMethod
func NewPlainAuthenticator ¶ added in v1.18.1
func NewPlainAuthenticator(authValue string) AuthMethod
func NewSnowflakeAuthenticator ¶ added in v1.16.0
func NewSnowflakeAuthenticator( connections snowflake.Connections, connectionName string, ) (AuthMethod, error)
NewSnowflakeAuthenticator loads the Snowflake connection with the given name from the system Snowflake configuration and returns an authenticator that will add auth headers to requests.
Only supports keypair authentication.
Errs if the named connection cannot be found, or if the connection does not include a valid private key.
func NewTokenAuthenticator ¶ added in v1.19.0
func NewTokenAuthenticator(token, privateKey string) (AuthMethod, error)
NewTokenAuthenticator creates an AuthMethod that adds token-based authentication headers