database

package
v0.0.0-...-86911bf Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Models = []interface{}{
	&table.User{},
	&table.Post{},
	&table.Comment{},
	&table.Tag{},
	&table.Group{},
	&table.UserGroup{},
	&table.Stamp{},
}

Functions

func GetCacheContext

func GetCacheContext() context.Context

func Migrate

func Migrate(db *gorm.DB) error

func NewDB

func NewDB(config *config.Config) (*gorm.DB, error)

func NewRedisSessionClient

func NewRedisSessionClient(config *config.Config) *redis.Client

func ResetTables

func ResetTables(db *gorm.DB) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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