store

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

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Store is the package that manages the database connection and migrations. It is used by other packages that need access to the database.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when the resource could not be found. It should only be used for Get or Update operations.

Functions

func StringToUUID

func StringToUUID(in string) (pgtype.UUID, error)

func UUIDToString

func UUIDToString(in pgtype.UUID) string

Types

type DB

type DB struct {
	*pgxpool.Pool
}

func New

func New(ctx context.Context, logger *slog.Logger, pgURL *url.URL) (*DB, error)

New creates a new Directory, connecting it to the postgres server on the URL provided.

Jump to

Keyboard shortcuts

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