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
- func (cfg *RedshiftConfig) Validate() error
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 { Host string `mapstructure:"host,omitempty" json:"host,omitempty" yaml:"host,omitempty"` Port int `mapstructure:"port,omitempty" json:"port,omitempty" yaml:"port,omitempty"` Db string `mapstructure:"database,omitempty" json:"database,omitempty" yaml:"database,omitempty"` Schema string `mapstructure:"defaultSchema,omitempty" json:"defaultSchema,omitempty" yaml:"defaultSchema,omitempty"` Username string `mapstructure:"username,omitempty" json:"username,omitempty" yaml:"username,omitempty"` Password string `mapstructure:"password,omitempty" json:"password,omitempty" yaml:"password,omitempty"` Parameters map[string]string `mapstructure:"parameters,omitempty" json:"parameters,omitempty" yaml:"parameters,omitempty"` Serverless bool `mapstructure:"serverless,omitempty" json:"serverless,omitempty" yaml:"serverless,omitempty"` AuthenticationMethod string `mapstructure:"authenticationMethod,omitempty" json:"authenticationMethod,omitempty" yaml:"authenticationMethod,omitempty"` ClusterIdentifier string `mapstructure:"clusterIdentifier" json:"clusterIdentifier" yaml:"clusterIdentifier"` WorkgroupName string `mapstructure:"workgroupName" json:"workgroupName" yaml:"workgroupName"` SecretsARN string `json:"secretsARN"` SessionToken string `json:"sessionToken"` RoleARN string `mapstructure:"roleARN" json:"roleARN" yaml:"roleARN"` RoleARNExpiry time.Duration `json:"roleARNExpiry"` // default: 15m ExternalID string `mapstructure:"externalID" json:"externalID" yaml:"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 // S3Config AccessKeyID string `mapstructure:"accessKeyId,omitempty" json:"accessKeyId,omitempty" yaml:"accessKeyId,omitempty"` SecretAccessKey string `mapstructure:"secretAccessKey,omitempty" json:"secretAccessKey,omitempty" yaml:"secretAccessKey,omitempty"` Bucket string `mapstructure:"bucket,omitempty" json:"bucket,omitempty" yaml:"bucket,omitempty"` Region string `mapstructure:"region,omitempty" json:"region,omitempty" yaml:"region,omitempty"` Folder string `mapstructure:"folder,omitempty" json:"folder,omitempty" yaml:"folder,omitempty"` 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 ¶
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 ¶
func (cfg *RedshiftConfig) Sanitize()
func (*RedshiftConfig) String ¶
func (cfg *RedshiftConfig) String() string
func (*RedshiftConfig) Validate ¶
func (cfg *RedshiftConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.