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) FinalizeRunEnd(ctx context.Context, fields m.TestRun) error
- func (r *PostgresRepository) FinalizeRunExecutionEnd(ctx context.Context, execution *m.RunExecution) error
- func (r *PostgresRepository) FinalizeRunShardEnd(ctx context.Context, shard *m.RunShard) (bool, 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) GetRun(ctx context.Context, runID string, includeSteps bool) (*m.TestRun, 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) 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) UpsertRunExecutionStart(ctx context.Context, execution *m.RunExecution) error
- func (r *PostgresRepository) UpsertRunShardStart(ctx context.Context, shard *m.RunShard) error
- func (r *PostgresRepository) UpsertRunStart(ctx context.Context, run *m.TestRun) error
- func (r *PostgresRepository) UpsertRunStartSuites(ctx context.Context, suites []*m.Suite) error
- func (r *PostgresRepository) UpsertRunStartTests(ctx context.Context, tests []*m.Test) 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) FinalizeRunEnd ¶
FinalizeRunEnd applies terminal state from TestRun to the existing run row.
func (*PostgresRepository) FinalizeRunExecutionEnd ¶ added in v0.3.0
func (r *PostgresRepository) FinalizeRunExecutionEnd(ctx context.Context, execution *m.RunExecution) error
FinalizeRunExecutionEnd finalizes an execution-scoped run record and refreshes the aggregate logical run state.
func (*PostgresRepository) FinalizeRunShardEnd ¶
func (r *PostgresRepository) FinalizeRunShardEnd(ctx context.Context, shard *m.RunShard) (bool, error)
FinalizeRunShardEnd upserts the terminal state of a run shard. When all expected shards have finished, it also upserts the parent run row.
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) 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) 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) UpsertRunExecutionStart ¶ added in v0.3.0
func (r *PostgresRepository) UpsertRunExecutionStart(ctx context.Context, execution *m.RunExecution) error
UpsertRunExecutionStart creates or updates an execution-scoped run record and refreshes the aggregate logical run state.
func (*PostgresRepository) UpsertRunShardStart ¶
UpsertRunShardStart upserts a run shard row derived from run-level shard metadata.
func (*PostgresRepository) UpsertRunStart ¶
UpsertRunStart upserts a TestRun row from a mapped run start event. On conflict the mutable fields (name, status, metadata, timing) are updated.
func (*PostgresRepository) UpsertRunStartSuites ¶
UpsertRunStartSuites upserts suite rows emitted in the run-start payload.
func (*PostgresRepository) UpsertRunStartTests ¶
UpsertRunStartTests upserts test rows emitted in the run-start payload.
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.