database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	*gorm.DB
}

Database wraps the gorm.DB connection

func New

func New(cfg *config.DatabaseConfig) (*Database, error)

New creates a new database connection

func (*Database) AutoMigrate

func (db *Database) AutoMigrate() error

AutoMigrate runs automatic migration for all models

func (*Database) Close

func (db *Database) Close() error

Close closes the database connection

func (*Database) Ping

func (db *Database) Ping() error

Ping verifies the database connection is alive

Jump to

Keyboard shortcuts

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