database

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMigrationFailed = errors.New("migration failed")

Functions

func NewGormDB

func NewGormDB(logger *slog.Logger, cfg *config.Database, cfgApp *config.Log) (*gorm.DB, error)

Types

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func NewMigrator

func NewMigrator(db *gorm.DB, logger *slog.Logger, models []interface{}) *Migrator

func (*Migrator) Migrate

func (m *Migrator) Migrate(ctx context.Context) error

type SQLiteOptions

type SQLiteOptions struct {
	Path   string
	Params map[string]string
	Pragma map[string]string
}

func (SQLiteOptions) DSN

func (o SQLiteOptions) DSN() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL