postgres

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLastAdmin = errors.New("cannot delete the last admin user")
View Source
var ErrNotFound = errors.New("not found")

Functions

func NewAPITokenRepository

func NewAPITokenRepository(db *DB) *apiTokenRepo

func NewContactRepository added in v1.0.10

func NewContactRepository(db *DB) *contactRepo

func NewDeviceConfigRepository

func NewDeviceConfigRepository(db *DB) *deviceConfigRepo

func NewEventLogRepository

func NewEventLogRepository(db *DB) *eventLogRepo

func NewHistorySyncRepository

func NewHistorySyncRepository(db *DB) *historySyncRepo

func NewInstanceRepository

func NewInstanceRepository(db *DB) *instanceRepo

func NewMessageRepository

func NewMessageRepository(db *DB) *messageRepo

func NewUserRepository

func NewUserRepository(db *DB) *userRepo

Types

type DB

type DB struct {
	Pool *pgxpool.Pool
	// contains filtered or unexported fields
}

func New

func New(cfg config.DatabaseConfig, log *zap.Logger) (*DB, error)

func (*DB) Close

func (db *DB) Close()

Jump to

Keyboard shortcuts

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