database

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: GPL-3.0 Imports: 10 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 {
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config, log *zap.Logger) (*Database, error)

func (*Database) GetApplication

func (db *Database) GetApplication(
	userKey string,
	token string,
) (application.Application, error)

func (*Database) GetTargetByID

func (db *Database) GetTargetByID(targetID string) (target.Target, error)

func (*Database) GetUserFromToken

func (db *Database) GetUserFromToken(token string) (user.User, error)

func (*Database) Query

func (db *Database) Query(q string, args ...any) (pgx.Rows, error)

func (*Database) QueryOne

func (db *Database) QueryOne(q string, args ...any) pgx.Row

func (*Database) Shutdown

func (db *Database) Shutdown() error

Jump to

Keyboard shortcuts

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