Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultAddr = "localhost:5432" DefaultDatabase = "postgres" DefaultUser = "postgres" DefaultPassword = "postgres" DefaultMaxRetries = 0 DefaultDialTimeout = 5 * time.Second DefaultReadTimeout = 30 * time.Second )
default values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string Database string User string Password string MaxRetries int DialTimeout time.Duration ReadTimeout time.Duration }
Config contains database connection options.
type DB ¶
type DB interface { // GetTableColumns returns column names for the given table GetTableColumns(table string) ([]string, error) // GetTableDependencies returns dependent tables for the given table GetTableDependencies(table string) ([]string, error) // CopyTo copy data from a table to io.Writer CopyTo(w io.Writer, table string) error }
DB wrapper interface for the postgres database.
Click to show internal directories.
Click to hide internal directories.