Documentation ¶
Index ¶
- func Connect(dsn string) (*sql.DB, error)
- func Postgres(options ...PostgresOption) (*postgresDB, error)
- type MockRepository
- func (m *MockRepository) Close() error
- func (m *MockRepository) CreateRun(_ context.Context, t test.Test, run test.Run) (test.Run, error)
- func (m *MockRepository) CreateTest(_ context.Context, t test.Test) (test.Test, error)
- func (m *MockRepository) CreateTestRunEvent(_ context.Context, event model.TestRunEvent) error
- func (m *MockRepository) CreateTransaction(_ context.Context, t testsuite.TestSuite) (testsuite.TestSuite, error)
- func (m *MockRepository) CreateTransactionRun(ctx context.Context, run testsuite.TestSuite) error
- func (m *MockRepository) DeleteRun(_ context.Context, run test.Run) error
- func (m *MockRepository) DeleteTest(_ context.Context, test test.Test) error
- func (m *MockRepository) DeleteTransaction(_ context.Context, transaction testsuite.TestSuite) error
- func (m *MockRepository) DeleteTransactionRun(ctx context.Context, run testsuite.TestSuite) error
- func (m *MockRepository) Drop() error
- func (m *MockRepository) GetLatestRunByTestVersion(_ context.Context, testID id.ID, version int) (test.Run, error)
- func (m *MockRepository) GetLatestRunByTransactionVersion(_ context.Context, transactionID id.ID, version int) (testsuite.TestSuite, error)
- func (m *MockRepository) GetLatestTestVersion(_ context.Context, id id.ID) (test.Test, error)
- func (m *MockRepository) GetLatestTransactionVersion(_ context.Context, id id.ID) (testsuite.TestSuite, error)
- func (m *MockRepository) GetRun(_ context.Context, testID id.ID, id int) (test.Run, error)
- func (m *MockRepository) GetRunByTraceID(_ context.Context, tid trace.TraceID) (test.Run, error)
- func (m *MockRepository) GetSpec(_ context.Context, t test.Test) (maps.Ordered[test.SpanQuery, []test.Assertion], error)
- func (m *MockRepository) GetTestRunEvents(_ context.Context, testID id.ID, runID int) ([]model.TestRunEvent, error)
- func (m *MockRepository) GetTestRuns(_ context.Context, t test.Test, take int32, skip int32) ([]test.Run, error)
- func (m *MockRepository) GetTestVersion(_ context.Context, id id.ID, version int) (test.Test, error)
- func (m *MockRepository) GetTests(_ context.Context, take, skip int32, query, sortBy, sortDirection string) (model.List[test.Test], error)
- func (m *MockRepository) GetTransactionRun(ctx context.Context, transactionID id.ID, runID int) (testsuite.TestSuite, error)
- func (m *MockRepository) GetTransactionVersion(_ context.Context, id id.ID, version int) (testsuite.TestSuite, error)
- func (m *MockRepository) GetTransactions(_ context.Context, take, skip int32, query, sortBy, sortDirection string) (model.List[testsuite.TestSuite], error)
- func (m *MockRepository) GetTransactionsRuns(ctx context.Context, transactionID id.ID, take, skip int32) ([]testsuite.TestSuite, error)
- func (m *MockRepository) ServerID() (string, bool, error)
- func (m *MockRepository) SetSpec(_ context.Context, test test.Test, ...) error
- func (m *MockRepository) TestIDExists(_ context.Context, id id.ID) (bool, error)
- func (m *MockRepository) TransactionIDExists(_ context.Context, id id.ID) (bool, error)
- func (m *MockRepository) UpdateRun(_ context.Context, run test.Run) error
- func (m *MockRepository) UpdateTest(_ context.Context, t test.Test) (test.Test, error)
- func (m *MockRepository) UpdateTestVersion(_ context.Context, test test.Test) error
- func (m *MockRepository) UpdateTransaction(_ context.Context, t testsuite.TestSuite) (testsuite.TestSuite, error)
- func (m *MockRepository) UpdateTransactionRun(ctx context.Context, run testsuite.TestSuite) error
- type PostgresOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Postgres ¶
func Postgres(options ...PostgresOption) (*postgresDB, error)
Types ¶
type MockRepository ¶
func (*MockRepository) Close ¶
func (m *MockRepository) Close() error
Close implements model.Repository
func (*MockRepository) CreateTest ¶
func (*MockRepository) CreateTestRunEvent ¶
func (m *MockRepository) CreateTestRunEvent(_ context.Context, event model.TestRunEvent) error
func (*MockRepository) CreateTransaction ¶
func (*MockRepository) CreateTransactionRun ¶
func (*MockRepository) DeleteTest ¶
func (*MockRepository) DeleteTransaction ¶
func (*MockRepository) DeleteTransactionRun ¶
DeleteTransactionRun implements model.Repository
func (*MockRepository) Drop ¶
func (m *MockRepository) Drop() error
func (*MockRepository) GetLatestRunByTestVersion ¶
func (*MockRepository) GetLatestRunByTransactionVersion ¶
func (*MockRepository) GetLatestTestVersion ¶
func (*MockRepository) GetLatestTransactionVersion ¶
func (*MockRepository) GetRunByTraceID ¶
func (*MockRepository) GetTestRunEvents ¶
func (m *MockRepository) GetTestRunEvents(_ context.Context, testID id.ID, runID int) ([]model.TestRunEvent, error)
func (*MockRepository) GetTestRuns ¶
func (*MockRepository) GetTestVersion ¶
func (*MockRepository) GetTransactionRun ¶
func (m *MockRepository) GetTransactionRun(ctx context.Context, transactionID id.ID, runID int) (testsuite.TestSuite, error)
GetTransactionRun implements model.Repository
func (*MockRepository) GetTransactionVersion ¶
func (*MockRepository) GetTransactions ¶
func (*MockRepository) GetTransactionsRuns ¶
func (m *MockRepository) GetTransactionsRuns(ctx context.Context, transactionID id.ID, take, skip int32) ([]testsuite.TestSuite, error)
GetTransactionsRuns implements model.Repository
func (*MockRepository) TestIDExists ¶
func (*MockRepository) TransactionIDExists ¶
func (*MockRepository) UpdateTest ¶
func (*MockRepository) UpdateTestVersion ¶
func (*MockRepository) UpdateTransaction ¶
func (*MockRepository) UpdateTransactionRun ¶
UpdateTransactionRun implements model.Repository
type PostgresOption ¶
type PostgresOption func(*postgresDB) error
func WithDB ¶
func WithDB(db *sql.DB) PostgresOption
Click to show internal directories.
Click to hide internal directories.