db

package
v0.0.0-...-7ee29c8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	Host     string
	Database string
	Username string
	Password string
	Timeout  time.Duration

	*pgxpool.Pool
}

func (*DB) CreateEmailVerification

func (db *DB) CreateEmailVerification(v player.VerificationEmail) error

func (*DB) CreatePlayer

func (db *DB) CreatePlayer(p *player.Player) error

func (*DB) CreateVerification

func (db *DB) CreateVerification(v *player.Verification) error

func (*DB) HasVerification

func (db *DB) HasVerification(pUUID string) (bool, error)

func (*DB) LatestVerification

func (db *DB) LatestVerification(pUUID string) (player.Verification, bool, error)

func (*DB) Migrate

func (db *DB) Migrate() error

func (*DB) Open

func (db *DB) Open() error

func (*DB) PlayerByUUID

func (db *DB) PlayerByUUID(uuid string) (player.Player, error)

func (*DB) PlayerWithUUIDExists

func (db *DB) PlayerWithUUIDExists(uuid string) (bool, error)

func (*DB) VerificationEmails

func (db *DB) VerificationEmails(vID uint64) ([]player.VerificationEmail, error)

func (*DB) Verifications

func (db *DB) Verifications(pUUID string) ([]player.Verification, error)

func (*DB) VerifyVerification

func (db *DB) VerifyVerification(vID uint64, code string) (bool, error)

Jump to

Keyboard shortcuts

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