db

package
v0.0.0-...-72a9452 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func Close

func Close() error

Close closes the database connection

func GetDB

func GetDB() *gorm.DB

GetDB returns the database instance

func Init

func Init() error

Init initializes the database connection

func IsConnected

func IsConnected() bool

IsConnected returns true if database is connected

func Migrate

func Migrate() error

Migrate runs all schema and data migrations using golang-migrate. SQL migration files are embedded per dialect (sqlite3/postgres). It must be called after Init().

Types

type Stats

type Stats struct {
	SenryuCount       int64
	MutedChannelCount int64
	OptOutCount       int64
	IsConnected       bool
}

Stats returns database statistics

func GetStats

func GetStats() Stats

GetStats returns database statistics

Jump to

Keyboard shortcuts

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