Help us shape the future of Go! Take the 2026 Go Developer Survey

recstore

package
v1.149.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package recstore is the PostgreSQL store of managed-script recordings (internal/platform/scriptrec, migration 000166).

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 keeps recordings in script_recordings.

func New

func New(db *sql.DB) *Store

New returns a Store over db.

func (*Store) Get

func (s *Store) Get(ctx context.Context, runID string) (*scriptrec.Stored, error)

Get returns one recording.

func (*Store) Keep

func (s *Store) Keep(ctx context.Context, scriptID, author string, runIDs []string) error

Keep marks the recordings a script's latest version names in its tests.

func (*Store) Purge

func (s *Store) Purge(ctx context.Context, retention time.Duration) (int64, error)

Purge deletes the recordings past retention that no test keeps.

func (*Store) Recent

func (s *Store) Recent(ctx context.Context, scriptID string, limit int) ([]scriptrec.Stored, error)

Recent returns the newest replayable recordings of the script's successful runs.

func (*Store) Save

func (s *Store) Save(ctx context.Context, rec scriptrec.Stored) error

Save stores a recording, replacing one under the same run id.

Jump to

Keyboard shortcuts

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