psdb

package
v0.0.0-...-33d7a3f Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbManager

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

func (*DbManager) CreateTables

func (dbm *DbManager) CreateTables() error

CreateTables create the 'player' table in the db TODO, add match later

func (*DbManager) Init

func (dbm *DbManager) Init(db *PostgreDB)

func (*DbManager) InitializeDatabase

func (dbm *DbManager) InitializeDatabase(cleanDb ...bool) error

InitializeDatabase knows how to start the DB, checking the tables, making pings and doing all the operations of sanitizing the database

type PostgreDB

type PostgreDB struct {
	BunDB *bun.DB
	// contains filtered or unexported fields
}

PostgreDB structs contains the bunDB database (initialized) to interact with the DB

func (*PostgreDB) CloseDB

func (pdb *PostgreDB) CloseDB() error

CloseDB closes the postgresql database

func (*PostgreDB) InitDB

func (pdb *PostgreDB) InitDB() error

InitDB initializes the postgresql database

Jump to

Keyboard shortcuts

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