database

package
v0.0.0-...-182b85e Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 7 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 {
	Database *gorm.DB
	// contains filtered or unexported fields
}

Database handles database access

func New

func New(
	config *config.Config,
	logger *logrus.Logger,
) *Database

New create a new database instance

func (*Database) Connect

func (db *Database) Connect()

Connect connect to the database and populate the structs Database field

func (*Database) Migrate

func (db *Database) Migrate()

Migrate migrate the database

Jump to

Keyboard shortcuts

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