Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresMigrations ¶ added in v3.0.1
func NewPostgresMigrations(fs fs.FS, cfg PostgresConfig, migrations, migrationsTable string) (*migrate.Migrate, error)
func PostgresModule ¶
func PostgresModule(cfg PostgresConfig) fx.Option
Types ¶
type PostgresConfig ¶
type PostgresConfig struct {
ApplicationName string `required:"true" mapstructure:"application_name" yaml:"application_name" json:"application_name"`
Timezone string `` /* 133-byte string literal not displayed */
DBName string `required:"true" mapstructure:"dbname" yaml:"dbname" json:"dbname"`
Schema string `` /* 136-byte string literal not displayed */
Host string `` /* 139-byte string literal not displayed */
SslMode string `` /* 137-byte string literal not displayed */
Password string `required:"true" mapstructure:"password" yaml:"password" json:"password"`
Username string `required:"true" mapstructure:"username" yaml:"username" json:"username"`
MaxIdleConnection int `required:"true" mapstructure:"max_idle_connections" yaml:"max_idle_connections" json:"max_idle_connections"`
ConnectionTimeout time.Duration `` /* 132-byte string literal not displayed */
MaxOpenConnections int `required:"true" mapstructure:"max_open_connections" yaml:"max_open_connections" json:"max_open_connections"`
MaxConnectionLifetime time.Duration `required:"true" mapstructure:"max_connection_lifetime" yaml:"max_connection_lifetime" json:"max_connection_lifetime"`
MaxConnectionIdleTime time.Duration `required:"true" mapstructure:"max_connection_idle_time" yaml:"max_connection_idle_time" json:"max_connection_idle_time"`
Port uint16 `` /* 134-byte string literal not displayed */
}
func (*PostgresConfig) ConnectionString ¶
func (p *PostgresConfig) ConnectionString() string
Click to show internal directories.
Click to hide internal directories.