database

package
v0.0.0-...-2aee9c7 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateDatabase

func MigrateDatabase(database *gorm.DB) error

Migrates the database and creates our comment table

func NewDatabase

func NewDatabase(parameters ConnectionParameters) (*gorm.DB, error)

NewDatabase - returns a pointer to a new database connection

Types

type ConnectionParameters

type ConnectionParameters struct {
	Username string
	Password string
	Host     string
	Database string
	Port     string
}

Jump to

Keyboard shortcuts

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