database

package
v0.0.0-...-28d8bff Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: Apache-2.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 DB

type DB struct {
	Pool    *pgxpool.Pool
	Queries *sql.Queries
}

func Connect

func Connect(ctx context.Context, dbURL string, name string, migrate bool) (*DB, error)

func (*DB) SetUserAccessToken

func (db *DB) SetUserAccessToken(
	ctx context.Context,
	id string, token string,
) error

func (*DB) UserByAccessToken

func (db *DB) UserByAccessToken(
	ctx context.Context,
	token string,
) (*sql.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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