Documentation ¶
Index ¶
- func QuoteString(str string) string
- type PgConf
- type Repo
- func (db *Repo) ConnectDB(ctx context.Context, tlsConfig *tls.Config) (*pgxpool.Pool, error)
- func (db *Repo) GetConfig() (*pgxpool.Config, error)
- func (db *Repo) GetPgxConfig() (*pgxpool.Config, error)
- func (db *Repo) GetPgxPoolConnString() string
- func (db *Repo) GetPgxPoolString() string
- func (db *Repo) GracefulShutdown(ctx context.Context)
- func (db *Repo) PoolFromString(ctx context.Context, connString string) (*pgxpool.Pool, error)
- func (db *Repo) SanitizeString(str string) string
- type SSL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuoteString ¶
according to https://github.com/jackc/pgx/blob/master/conn.go#L84 have to watch changes, to prevent internal issues
Types ¶
type PgConf ¶
type PgConf struct { ConnString string `json:"conn_string" yaml:"conn_string"` ServiceName string `json:"service" yaml:"service"` ActualSchemaPath string `json:"actual_schema_path" yaml:"schema_path"` DataDir string `json:"data_dir" yaml:"data_dir"` Host string `json:"host" yaml:"host"` Port string `json:"port" yaml:"port"` Name string `json:"name" yaml:"name"` User string `json:"user" yaml:"user"` Password string `json:"password" yaml:"password"` SslMode string `json:"ssl_mode" yaml:"ssl_mode"` SslPath string `json:"ssl_path" yaml:"ssl_path"` TLS SSL `json:"tls" yaml:"tls"` TLSConfig *tls.Config `json:"-" yaml:"-"` }
type Repo ¶
type Repo struct { ServiceName string `json:"service" yaml:"service"` Pool *pgxpool.Pool Config *PgConf // contains filtered or unexported fields }
func NewSecurePool ¶
func (*Repo) GetPgxPoolConnString ¶
func (*Repo) GetPgxPoolString ¶
func (*Repo) GracefulShutdown ¶
func (*Repo) PoolFromString ¶
func (*Repo) SanitizeString ¶
Click to show internal directories.
Click to hide internal directories.