Documentation
¶
Index ¶
Constants ¶
View Source
const (
MigrationDir = "migrations"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresDBConnector ¶
type PostgresDBConnector struct {
DSN string
TLSConfig *_tls.TLSConfig
// contains filtered or unexported fields
}
func NewPostgresDBConnector ¶
func NewPostgresDBConnector( dsn string, tlsConfig *_tls.TLSConfig, ) *PostgresDBConnector
func (*PostgresDBConnector) BuildDSNWithTLS ¶
func (c *PostgresDBConnector) BuildDSNWithTLS() (string, error)
BuildDSNWithTLS builds a PostgreSQL DSN with SSL/TLS parameters based on the TLS configuration
func (*PostgresDBConnector) DB ¶
func (c *PostgresDBConnector) DB() *gorm.DB
func (*PostgresDBConnector) WithMaxRetries ¶
func (c *PostgresDBConnector) WithMaxRetries(maxRetries int) *PostgresDBConnector
type PostgresMigrator ¶
type PostgresMigrator struct {
// contains filtered or unexported fields
}
func NewPostgresMigrator ¶
func NewPostgresMigrator(db *gorm.DB) (*PostgresMigrator, error)
func (*PostgresMigrator) Down ¶
func (m *PostgresMigrator) Down(steps *int) error
func (*PostgresMigrator) Migrate ¶
func (m *PostgresMigrator) Migrate() error
func (*PostgresMigrator) Up ¶
func (m *PostgresMigrator) Up(steps *int) error
Click to show internal directories.
Click to hide internal directories.