redshift

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

func RedshiftResourceExistsFunc

func RedshiftResourceExistsFunc(fn func(*DBConnection, *schema.ResourceData) (bool, error)) func(*schema.ResourceData, interface{}) (bool, error)

func RedshiftResourceFunc

func RedshiftResourceFunc(fn func(*DBConnection, *schema.ResourceData) error) func(*schema.ResourceData, interface{}) error

func RedshiftResourceRetryOnPQErrors

func RedshiftResourceRetryOnPQErrors(fn func(*DBConnection, *schema.ResourceData) error) func(*DBConnection, *schema.ResourceData) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client struct holding connection string

func (*Client) Close added in v0.2.0

func (c *Client) Close()

func (*Client) Connect

func (c *Client) Connect() (*DBConnection, error)

Connect returns a copy to an sql.Open()'ed database connection wrapped in a DBConnection struct. Callers must return their database resources. Use of QueryRow() or Exec() is encouraged. Query() must have their rows.Close()'ed.

type Config

type Config struct {
	Host     string
	Username string
	Password string
	Port     int
	Database string
	SSLMode  string
	MaxConns int
}

Config - provider config

func (*Config) Client

func (c *Config) Client() (*Client, error)

New redshift client

func (*Config) NewClient

func (c *Config) NewClient(database string) *Client

NewClient returns client config for the specified database.

type DBConnection

type DBConnection struct {
	*sql.DB
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL