db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ctx

func Ctx(ctx context.Context) *gorm.DB

func Database

func Database(ctx context.Context, config *configs.Config) error

Database gorm数据库封装

func Default

func Default() *gorm.DB

func RecordNotFound

func RecordNotFound(err error) bool

Types

type Config

type Config struct {
	Dsn    string `yaml:"dsn"`
	Prefix string `yaml:"prefix"`
}

Jump to

Keyboard shortcuts

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