Documentation ¶
Index ¶
- Variables
- func NewRedshiftConnector(cfg RedshiftConfig) driver.Connector
- type RedshiftClient
- type RedshiftConfig
- func (cfg *RedshiftConfig) GetMaxPolling() time.Duration
- func (cfg *RedshiftConfig) GetMinPolling() time.Duration
- func (cfg *RedshiftConfig) GetRetryMaxAttempts() int
- func (cfg *RedshiftConfig) LoadOpts(ctx context.Context) ([]func(*config.LoadOptions) error, error)
- func (cfg *RedshiftConfig) Opts() []func(*redshiftdata.Options)
- func (cfg *RedshiftConfig) Sanitize()
- func (cfg *RedshiftConfig) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotSupported = errors.New("not supported") ErrDSNEmpty = errors.New("dsn is empty") ErrConnClosed = errors.New("connection closed") ErrBeforeCommit = errors.New("transaction is not committed") ErrNotInTx = errors.New("not in transaction") ErrInTx = errors.New("already in transaction") )
Functions ¶
func NewRedshiftConnector ¶
func NewRedshiftConnector(cfg RedshiftConfig) driver.Connector
Types ¶
type RedshiftClient ¶
type RedshiftClient interface { ExecuteStatement(ctx context.Context, params *redshiftdata.ExecuteStatementInput, optFns ...func(*redshiftdata.Options)) (*redshiftdata.ExecuteStatementOutput, error) DescribeStatement(ctx context.Context, params *redshiftdata.DescribeStatementInput, optFns ...func(*redshiftdata.Options)) (*redshiftdata.DescribeStatementOutput, error) CancelStatement(ctx context.Context, params *redshiftdata.CancelStatementInput, optFns ...func(*redshiftdata.Options)) (*redshiftdata.CancelStatementOutput, error) BatchExecuteStatement(ctx context.Context, params *redshiftdata.BatchExecuteStatementInput, optFns ...func(*redshiftdata.Options)) (*redshiftdata.BatchExecuteStatementOutput, error) redshiftdata.GetStatementResultAPIClient }
type RedshiftConfig ¶
type RedshiftConfig struct { ClusterIdentifier string `json:"clusterIdentifier"` Database string `json:"database"` DbUser string `json:"user"` WorkgroupName string `json:"workgroupName"` SecretsARN string `json:"secretsARN"` Region string `json:"region"` AccessKeyID string `json:"accessKeyId"` SecretAccessKey string `json:"secretAccessKey"` SessionToken string `json:"sessionToken"` RoleARN string `json:"roleARN"` RoleARNExpiry time.Duration `json:"roleARNExpiry"` // default: 15m ExternalID string `json:"externalID"` Timeout time.Duration `json:"timeout"` // default: no timeout MinPolling time.Duration `json:"polling"` // default: 10ms MaxPolling time.Duration `json:"maxPolling"` // default: 5s RetryMaxAttempts int `json:"retryMaxAttempts"` // default: 20 Params url.Values }
func ParseDSN ¶
func ParseDSN(dsn string) (*RedshiftConfig, error)
func (*RedshiftConfig) GetMaxPolling ¶
func (cfg *RedshiftConfig) GetMaxPolling() time.Duration
func (*RedshiftConfig) GetMinPolling ¶
func (cfg *RedshiftConfig) GetMinPolling() time.Duration
func (*RedshiftConfig) GetRetryMaxAttempts ¶ added in v1.1.4
func (cfg *RedshiftConfig) GetRetryMaxAttempts() int
func (*RedshiftConfig) LoadOpts ¶
func (cfg *RedshiftConfig) LoadOpts(ctx context.Context) ([]func(*config.LoadOptions) error, error)
func (*RedshiftConfig) Opts ¶
func (cfg *RedshiftConfig) Opts() []func(*redshiftdata.Options)
func (*RedshiftConfig) Sanitize ¶ added in v1.1.4
func (cfg *RedshiftConfig) Sanitize()
func (*RedshiftConfig) String ¶
func (cfg *RedshiftConfig) String() string
Click to show internal directories.
Click to hide internal directories.