xdb

package
v0.0.0-...-4cf0c03 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDB

func DefaultDB() *gorm.DB

DefaultDB returns the default db.

func Init

func Init(cfg *Config) error

func New

func New(cfg *Config) (*gorm.DB, error)

func SetDefaultDB

func SetDefaultDB(db *gorm.DB)

SetDefaultDB sets the default db for package database.

Types

type Config

type Config struct {
	Dsn string `json:"dsn"`
}

Jump to

Keyboard shortcuts

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