database

package
v0.0.0-...-89dfdfc Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func Get

func Get(config *config.Config) *Database

func (*Database) Connect

func (d *Database) Connect() *gorm.DB

type Driver

type Driver interface {
	Open() gorm.Dialector
}

type Migration

type Migration struct {
	// contains filtered or unexported fields
}

func NewMigrations

func NewMigrations() *Migration

func (*Migration) Add

func (m *Migration) Add(migration func(db *gorm.DB))

func (*Migration) All

func (m *Migration) All() []func(db *gorm.DB)

func (*Migration) Migrate

func (m *Migration) Migrate(db *gorm.DB)

type MySql

type MySql struct {
	// contains filtered or unexported fields
}

func (*MySql) Open

func (m *MySql) Open() gorm.Dialector

type Sqlite

type Sqlite struct {
	// contains filtered or unexported fields
}

func (*Sqlite) Open

func (s *Sqlite) Open() gorm.Dialector

Jump to

Keyboard shortcuts

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