database

package
v0.0.0-...-fc50bb1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(connection string) error

关闭链接

func CloseAll

func CloseAll() error

关闭所有链接

func GetDB

func GetDB(connection string) *gorm.DB

获取链接

func InitDB

func InitDB()

Types

type Database

type Database struct {
	Map map[string]*gorm.DB
}

type Model

type Model struct {
	ID        uint64 `gorm:"primary_key" json:"id"`
	CreatedAt uint64 `json:"created_at"`
}

type TracePlugin

type TracePlugin struct{}

func (*TracePlugin) Initialize

func (op *TracePlugin) Initialize(db *gorm.DB) (err error)

func (*TracePlugin) Name

func (op *TracePlugin) Name() string

Jump to

Keyboard shortcuts

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