Documentation
¶
Index ¶
- type ListRunsFilter
- type MarkerInfo
- type PostgresRepository
- func (r *PostgresRepository) AppendTestError(ctx context.Context, runID, executionID, testID string, attemptIndex int32, ...) error
- func (r *PostgresRepository) AppendTestFailure(ctx context.Context, runID, executionID, testID string, attemptIndex int32, ...) error
- func (r *PostgresRepository) DeleteRuns(ctx context.Context, runIDs []string) (int64, error)
- func (r *PostgresRepository) FinalizeTestEnd(ctx context.Context, test *m.Test, attempt *m.TestAttempt) error
- func (r *PostgresRepository) FindAttachmentByStorageKey(ctx context.Context, storageKey string) (map[string]interface{}, error)
- func (r *PostgresRepository) GetAllRunStats(ctx context.Context, limit int64, offset int64) ([]m.RunStat, error)
- func (r *PostgresRepository) GetRun(ctx context.Context, runID string, includeSteps bool) (*m.TestRun, error)
- func (r *PostgresRepository) GetRunMetadataByIDs(ctx context.Context, runIDs []string) (map[string]map[string]interface{}, error)
- func (r *PostgresRepository) GetRunStatsByMarker(ctx context.Context, marker string) ([]m.RunStat, error)
- func (r *PostgresRepository) GetRuns(ctx context.Context, filter ListRunsFilter, limit, offset int64, ...) ([]*m.TestRun, int64, error)
- func (r *PostgresRepository) GetTestTrends(ctx context.Context, testID string, limit int64) ([]*TestTrendItem, error)
- func (r *PostgresRepository) GetUniqueMarkers(ctx context.Context) ([]*MarkerInfo, error)
- func (r *PostgresRepository) HandleRunEnd(ctx context.Context, event *events.TestRunEndEventRequest) error
- func (r *PostgresRepository) HandleRunStart(ctx context.Context, req *events.ReportRunStartEventRequest) error
- func (r *PostgresRepository) IsConfigured() bool
- func (r *PostgresRepository) ListRuns(ctx context.Context, filter ListRunsFilter, limit, offset int64) ([]*m.TestRun, int64, error)
- func (r *PostgresRepository) RemoveRunsMarker(ctx context.Context, runIDs []string) (int64, error)
- func (r *PostgresRepository) UpdateRunsMarker(ctx context.Context, runIDs []string, marker string) (int64, error)
- func (r *PostgresRepository) UpsertSuite(ctx context.Context, suite *m.Suite) error
- func (r *PostgresRepository) UpsertTestBegin(ctx context.Context, test *m.Test, attempt *m.TestAttempt) error
- type TestTrendItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListRunsFilter ¶
type MarkerInfo ¶
type PostgresRepository ¶
type PostgresRepository struct {
// contains filtered or unexported fields
}
PostgresRepository handles PostgreSQL operations for relational execution data.
func NewPostgresRepository ¶
func NewPostgresRepository(db *gorm.DB, logger *slog.Logger) *PostgresRepository
NewPostgresRepository creates a new PostgreSQL repository.
func (*PostgresRepository) AppendTestError ¶
func (r *PostgresRepository) AppendTestError(ctx context.Context, runID, executionID, testID string, attemptIndex int32, errorDoc *m.TestErrorDocument) error
AppendTestError adds an error document to the specified test attempt.
func (*PostgresRepository) AppendTestFailure ¶
func (r *PostgresRepository) AppendTestFailure(ctx context.Context, runID, executionID, testID string, attemptIndex int32, failure *m.TestFailureDocument) error
AppendTestFailure adds a failure document to the specified test attempt.
func (*PostgresRepository) DeleteRuns ¶
func (*PostgresRepository) FinalizeTestEnd ¶
func (r *PostgresRepository) FinalizeTestEnd(ctx context.Context, test *m.Test, attempt *m.TestAttempt) error
FinalizeTestEnd applies terminal state to the relational test row and current attempt.
func (*PostgresRepository) FindAttachmentByStorageKey ¶
func (*PostgresRepository) GetAllRunStats ¶ added in v0.5.0
func (*PostgresRepository) GetRunMetadataByIDs ¶ added in v0.5.0
func (r *PostgresRepository) GetRunMetadataByIDs(ctx context.Context, runIDs []string) (map[string]map[string]interface{}, error)
GetRunMetadataByIDs returns run metadata keyed by run ID. It intentionally reads from runs to keep run_stats queries focused on stats only.
func (*PostgresRepository) GetRunStatsByMarker ¶ added in v0.8.1
func (*PostgresRepository) GetRuns ¶ added in v0.2.4
func (r *PostgresRepository) GetRuns(ctx context.Context, filter ListRunsFilter, limit, offset int64, includeSteps bool) ([]*m.TestRun, int64, error)
func (*PostgresRepository) GetTestTrends ¶
func (r *PostgresRepository) GetTestTrends(ctx context.Context, testID string, limit int64) ([]*TestTrendItem, error)
func (*PostgresRepository) GetUniqueMarkers ¶
func (r *PostgresRepository) GetUniqueMarkers(ctx context.Context) ([]*MarkerInfo, error)
func (*PostgresRepository) HandleRunEnd ¶ added in v0.6.0
func (r *PostgresRepository) HandleRunEnd(ctx context.Context, event *events.TestRunEndEventRequest) error
func (*PostgresRepository) HandleRunStart ¶ added in v0.6.0
func (r *PostgresRepository) HandleRunStart(ctx context.Context, req *events.ReportRunStartEventRequest) error
HandleRunStart handles the ReportRunStartEventRequest by creating or updating the TestRun and associated RunExecution, Suites, and Tests. It ensures that sharded run metadata is merged correctly and that existing records are updated rather than duplicated.
func (*PostgresRepository) IsConfigured ¶
func (r *PostgresRepository) IsConfigured() bool
func (*PostgresRepository) ListRuns ¶
func (r *PostgresRepository) ListRuns(ctx context.Context, filter ListRunsFilter, limit, offset int64) ([]*m.TestRun, int64, error)
func (*PostgresRepository) RemoveRunsMarker ¶
func (*PostgresRepository) UpdateRunsMarker ¶
func (*PostgresRepository) UpsertSuite ¶ added in v0.3.0
func (*PostgresRepository) UpsertTestBegin ¶
func (r *PostgresRepository) UpsertTestBegin(ctx context.Context, test *m.Test, attempt *m.TestAttempt) error
UpsertTestBegin creates or updates the relational test row and its current attempt.
type TestTrendItem ¶
Source Files
¶
- postgres_base.go
- postgres_query_attachments.go
- postgres_query_helpers.go
- postgres_query_hydration.go
- postgres_query_mutations.go
- postgres_query_run_metadata.go
- postgres_query_run_stats.go
- postgres_query_runs.go
- postgres_query_trends.go
- postgres_query_types.go
- postgres_run_begin.go
- postgres_run_end.go
- postgres_run_execution.go
- postgres_run_stats_helper.go
- postgres_suite.go
- postgres_testcase.go
- postgres_testcase_begin.go
- postgres_testcase_end.go