Documentation
¶
Index ¶
- Variables
- func New() (interface{}, error)
- type PATInfo
- type SnowflakeSQL
- func (c SnowflakeSQL) Close() error
- func (c SnowflakeSQL) Connection(ctx context.Context) (interface{}, error)
- func (s *SnowflakeSQL) DeleteUser(ctx context.Context, req dbplugin.DeleteUserRequest) (dbplugin.DeleteUserResponse, error)
- func (c SnowflakeSQL) Init(ctx context.Context, initConfig map[string]interface{}, verifyConnection bool) (saveConfig map[string]interface{}, err error)
- func (s *SnowflakeSQL) Initialize(ctx context.Context, req dbplugin.InitializeRequest) (dbplugin.InitializeResponse, error)
- func (s *SnowflakeSQL) NewUser(ctx context.Context, req dbplugin.NewUserRequest) (dbplugin.NewUserResponse, error)
- func (s *SnowflakeSQL) Type() (string, error)
- func (s *SnowflakeSQL) UpdateUser(ctx context.Context, req dbplugin.UpdateUserRequest) (dbplugin.UpdateUserResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSnowflakeURL = fmt.Errorf("invalid connection URL format, expect <account_name>.snowflakecomputing.com/<db_name>") ErrInvalidPrivateKey = fmt.Errorf("failed to read provided private_key") ErrWIFMutuallyExclusive = fmt.Errorf("workload_identity_provider cannot be combined with password or private_key authentication") ErrWIFTokenRequired = fmt.Errorf("workload_identity_token is required when using the OIDC workload identity provider") ErrWIFUsernameRequired = fmt.Errorf("username is required for workload identity federation") ErrWIFInvalidProvider = fmt.Errorf("workload_identity_provider must be one of: AWS, GCP, AZURE, OIDC") ErrOAuthMutuallyExclusive = fmt.Errorf("oauth_client_id cannot be combined with password, private_key, or workload_identity_provider authentication") ErrOAuthMissingFields = fmt.Errorf("oauth_client_id, oauth_client_secret, and oauth_token_endpoint are all required for OAuth client credentials") ErrOAuthUsernameRequired = fmt.Errorf("username is required for OAuth client credentials authentication") )
Functions ¶
Types ¶
type PATInfo ¶ added in v0.17.0
type PATInfo struct {
// TokenName is the human-readable name of the token.
TokenName string
// RoleRestriction is the Snowflake role associated with the token.
RoleRestriction string
// ExpiresAt is when the token will expire (UTC).
ExpiresAt time.Time
// Comment is the optional comment set at creation time.
Comment string
}
PATInfo represents a single Programmatic Access Token as returned by SHOW PROGRAMMATIC ACCESS TOKENS FOR USER.
type SnowflakeSQL ¶
type SnowflakeSQL struct {
// contains filtered or unexported fields
}
func (SnowflakeSQL) Close ¶
func (c SnowflakeSQL) Close() error
Close terminates the database connection with locking
func (SnowflakeSQL) Connection ¶
func (*SnowflakeSQL) DeleteUser ¶
func (s *SnowflakeSQL) DeleteUser(ctx context.Context, req dbplugin.DeleteUserRequest) (dbplugin.DeleteUserResponse, error)
func (*SnowflakeSQL) Initialize ¶
func (s *SnowflakeSQL) Initialize(ctx context.Context, req dbplugin.InitializeRequest) (dbplugin.InitializeResponse, error)
func (*SnowflakeSQL) NewUser ¶
func (s *SnowflakeSQL) NewUser(ctx context.Context, req dbplugin.NewUserRequest) (dbplugin.NewUserResponse, error)
func (*SnowflakeSQL) Type ¶
func (s *SnowflakeSQL) Type() (string, error)
func (*SnowflakeSQL) UpdateUser ¶
func (s *SnowflakeSQL) UpdateUser(ctx context.Context, req dbplugin.UpdateUserRequest) (dbplugin.UpdateUserResponse, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.