pgrepo

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 5 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, log *slog.Logger) *Repo

func (*Repo) CountByType

func (r *Repo) CountByType(ctx context.Context, eventType string, since time.Time) (int, error)

func (*Repo) CountByTypeInWorkspace

func (r *Repo) CountByTypeInWorkspace(ctx context.Context, workspaceID, eventType string, since time.Time) (int, error)

func (*Repo) Recent

func (r *Repo) Recent(ctx context.Context, since time.Time, limit int) ([]app.EventRow, error)

func (*Repo) RecentByType

func (r *Repo) RecentByType(ctx context.Context, eventType string, limit int) ([]app.EventRow, error)

func (*Repo) Track

func (r *Repo) Track(ctx context.Context, e app.Event, now time.Time)

Jump to

Keyboard shortcuts

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