Documentation
¶
Index ¶
- type Config
- type Migration
- type Pool
- type Psql
- func (p *Psql) GetDatabaseName() string
- func (p *Psql) GetDatabaseURL(options ...string) string
- func (p *Psql) GetMigrationAttempts() (int, time.Duration)
- func (p *Psql) GetMigrationSource() string
- func (p *Psql) GetPool() *pgxpool.Pool
- func (p *Psql) GetQueryBuilder() *squirrel.StatementBuilderType
- func (p *Psql) IsMigrationEnabled() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
URLEnvKey string `yaml:"url_env_key" default:"PG_URL"`
DBNameEnvKey string `yaml:"db_name_env_key" default:"PG_DATABASE"`
URLParametersEnvKey string `yaml:"url_parameters_env_key" default:"PG_URL_PARAMETERS"`
Migration Migration `yaml:"migration"`
Pool Pool `yaml:"pool"`
Host string `yaml:"host"`
Port string `yaml:"port"`
SSLMode string `yaml:"sslmode"`
}
Config - Postgresql config
type Pool ¶
type Pool struct {
MaxPoolSize int `yaml:"max_pool_size"`
MinPoolSize int `yaml:"min_pool_size"`
ConnectionAttempts int `yaml:"connection_attempts"`
ConnectionTimeout int `yaml:"connection_timeout"`
}
Pool - Pool config
type Psql ¶
type Psql struct {
// contains filtered or unexported fields
}
func (*Psql) GetDatabaseName ¶
func (*Psql) GetDatabaseURL ¶
func (*Psql) GetMigrationSource ¶
func (*Psql) GetQueryBuilder ¶
func (p *Psql) GetQueryBuilder() *squirrel.StatementBuilderType
func (*Psql) IsMigrationEnabled ¶
Click to show internal directories.
Click to hide internal directories.