Documentation
¶
Index ¶
Constants ¶
View Source
const (
MigrationDir = "migrations"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLDBConnector ¶
type MySQLDBConnector struct {
DSN string
TLSConfig *_tls.TLSConfig
// contains filtered or unexported fields
}
func NewMySQLDBConnector ¶
func NewMySQLDBConnector( dsn string, tlsConfig *_tls.TLSConfig, ) *MySQLDBConnector
func (*MySQLDBConnector) DB ¶
func (c *MySQLDBConnector) DB() *gorm.DB
func (*MySQLDBConnector) WithMaxRetries ¶ added in v0.2.21
func (c *MySQLDBConnector) WithMaxRetries(maxRetries int) *MySQLDBConnector
type MySQLMigrator ¶
type MySQLMigrator struct {
// contains filtered or unexported fields
}
func NewMySQLMigrator ¶
func NewMySQLMigrator(db *gorm.DB) (*MySQLMigrator, error)
func (*MySQLMigrator) Down ¶
func (m *MySQLMigrator) Down(steps *int) error
func (*MySQLMigrator) Migrate ¶
func (m *MySQLMigrator) Migrate() error
func (*MySQLMigrator) Up ¶
func (m *MySQLMigrator) Up(steps *int) error
Click to show internal directories.
Click to hide internal directories.