Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 `required:"true" default:"UTC" mapstructure:"timezone" yaml:"timezone" json:"timezone"` DBName string `required:"true" mapstructure:"dbname" yaml:"dbname" json:"dbname"` Schema string `required:"true" default:"public" mapstructure:"schema" yaml:"schema" json:"schema"` Host string `required:"true" default:"localhost" mapstructure:"host" yaml:"host" json:"host"` SslMode string `required:"true" default:"disable" mapstructure:"ssl_mode" yaml:"ssl_mode" json:"ssl_mode"` Password string `required:"true" yaml:"password" mapstructure:"password" json:"password"` Username string `required:"true" yaml:"username" mapstructure:"username" json:"username"` MaxIdleConnection int `required:"true" mapstructure:"max_idle_connections" yaml:"max_idle_connections" json:"max_idle_connections"` ConnectionTimeout time.Duration `required:"true" default:"5s" mapstructure:"connection_timeout" yaml:"connection_timeout" json:"connection_timeout"` 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 `required:"true" default:"5432" mapstructure:"port" yaml:"port" json:"port"` }
func (*PostgresConfig) ConnectionString ¶
func (p *PostgresConfig) ConnectionString() string
func (*PostgresConfig) MigrationConnectionString ¶
func (p *PostgresConfig) MigrationConnectionString() string
Click to show internal directories.
Click to hide internal directories.