pgrepo

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func New

func New(pool *pgxpool.Pool) *Repo

func (*Repo) Allowed

func (r *Repo) Allowed(ctx context.Context, userID, typ string) (bool, error)

func (*Repo) Archive

func (r *Repo) Archive(ctx context.Context, userID, notificationID string) error

func (*Repo) EmailAllowed

func (r *Repo) EmailAllowed(ctx context.Context, userID, typ string) (bool, error)

func (*Repo) Insert

func (r *Repo) Insert(ctx context.Context, n app.NotifyInput, now time.Time) (bool, error)

func (*Repo) List

func (r *Repo) List(ctx context.Context, userID string) ([]app.Preference, error)

func (*Repo) ListInbox

func (r *Repo) ListInbox(ctx context.Context, userID string, limit int) ([]app.Notification, error)

func (*Repo) MarkAllRead

func (r *Repo) MarkAllRead(ctx context.Context, userID string) error

func (*Repo) MarkRead

func (r *Repo) MarkRead(ctx context.Context, userID, notificationID string) error

func (*Repo) UnreadCount

func (r *Repo) UnreadCount(ctx context.Context, userID string) (int, error)

func (*Repo) Upsert

func (r *Repo) Upsert(ctx context.Context, userID, typ string, email, inApp *bool) (app.Preference, error)

Jump to

Keyboard shortcuts

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