db

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB() *ent.Client

func InitTestDB

func InitTestDB(path string) *ent.Client

func RunMigration

func RunMigration(path string, ctx context.Context) error

RunMigration executes database migrations from embedded migration files

Types

type DBClientManager

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

func NewDBClientManager

func NewDBClientManager(path string) *DBClientManager

func (*DBClientManager) GetClient

func (cm *DBClientManager) GetClient() (*ent.Client, error)

type MigrationFile added in v1.2.1

type MigrationFile struct {
	Version     string
	Description string
	Filename    string
	Content     string
}

MigrationFile represents a migration file with its metadata

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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