database

package
v0.0.0-...-08dd883 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConnectionToDBFailed   = errors.New("failed to open connection to the postgres database")
	ErrClientNotConnectedToDB = errors.New("there is no existing open connection to the database")
)

Functions

func ConnectToDB

func ConnectToDB() (*ent.Client, error)

func GetClient

func GetClient() (*ent.Client, error)

Not useful since the variable itself is global but it helps to tell what is actually happening in the code also returns an error if database connection isn't open

Types

This section is empty.

Jump to

Keyboard shortcuts

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