db

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(driver string, dsn []string, debug bool) (*gorm.DB, error)

New initializes a GORM database connection based on the driver and DSN.

Types

type Contact

type Contact struct {
	Slug      string `gorm:"primaryKey"`
	URL       string `gorm:"column:url;not null"`
	Name      string
	CreatedAt time.Time `gorm:"autoCreateTime"`
}

Contact represents the contacts table for contact sharing.

type Quota

type Quota struct {
	Username     string `gorm:"primaryKey"`
	MaxStorage   int64
	CreatedAt    int64
	FirstLoginAt int64
}

Quota represents the quotas table.

type TableEntry

type TableEntry struct {
	Key   string `gorm:"primaryKey"`
	Value string `gorm:"not null"`
}

TableEntry represents a generic key-value entry for sql_table module.

Jump to

Keyboard shortcuts

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