model

package
v0.0.0-...-e725833 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDao

func InitDao(cfg *config.Config, loggerInstance logger.Logger)

Types

type DBProvider

type DBProvider interface {
	Db() *gorm.DB
}

type Dao

type Dao struct {
	RawDB *sql.DB
	// contains filtered or unexported fields
}

func GetDao

func GetDao() *Dao

func (*Dao) AdminGetAllCache

func (d *Dao) AdminGetAllCache()

func (*Dao) Begin

func (d *Dao) Begin() *TxDao

func (*Dao) Db

func (d *Dao) Db() *gorm.DB

func (*Dao) GetCache

func (d *Dao) GetCache(key string) (any, bool)

func (*Dao) WriteCache

func (d *Dao) WriteCache(key string, value any, seconds int64)

type Model

type Model struct {
	*gorm.Model
}

type TxDao

type TxDao struct {
	*Dao
	// contains filtered or unexported fields
}

func (*TxDao) Commit

func (tx *TxDao) Commit() error

func (*TxDao) Db

func (tx *TxDao) Db() *gorm.DB

func (*TxDao) Rollback

func (tx *TxDao) Rollback() error

Jump to

Keyboard shortcuts

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