postgres

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements regression.RegressionStore against PostgreSQL.

func NewStore

func NewStore(pool *pgxpool.Pool) *Store

NewStore creates a Store backed by the given pool.

func (*Store) ActiveForDeploy

func (s *Store) ActiveForDeploy(ctx context.Context, deployID string) ([]regression.Regression, error)

ActiveForDeploy returns all active regressions for the given deploy ID.

func (*Store) Get

func (s *Store) Get(ctx context.Context, id string) (*regression.Regression, error)

Get returns the regression with the given ID. Returns regression.ErrNotFound if no row exists.

func (*Store) List

List returns regressions matching the given filter, ordered by detected_at DESC.

func (*Store) Save

func (s *Store) Save(ctx context.Context, r *regression.Regression) error

Save inserts a Regression into the database. If r.ID is empty, a new UUID is generated and written back to r.ID.

func (*Store) UpdateStatus

func (s *Store) UpdateStatus(ctx context.Context, id string, status string) error

UpdateStatus sets the status of the regression with the given ID. If the new status is "resolved" or "dismissed", resolved_at is set to now().

Jump to

Keyboard shortcuts

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