Documentation ¶
Overview ¶
Package testfactory provides low level helpers for inserting records directly into the database.
Index ¶
- func Job(ctx context.Context, tb testing.TB, exec riverdriver.Executor, opts *JobOpts) *rivertype.JobRow
- func Job_Build(tb testing.TB, opts *JobOpts) *riverdriver.JobInsertFullParams
- func Leader(ctx context.Context, tb testing.TB, exec riverdriver.Executor, ...) *riverdriver.Leader
- func Migration(ctx context.Context, tb testing.TB, exec riverdriver.Executor, ...) *riverdriver.Migration
- func Queue(ctx context.Context, tb testing.TB, exec riverdriver.Executor, opts *QueueOpts) *rivertype.Queue
- type JobOpts
- type LeaderOpts
- type MigrationOpts
- type QueueOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Job_Build ¶ added in v0.5.0
func Job_Build(tb testing.TB, opts *JobOpts) *riverdriver.JobInsertFullParams
func Leader ¶
func Leader(ctx context.Context, tb testing.TB, exec riverdriver.Executor, opts *LeaderOpts) *riverdriver.Leader
func Migration ¶
func Migration(ctx context.Context, tb testing.TB, exec riverdriver.Executor, opts *MigrationOpts) *riverdriver.Migration
Types ¶
type JobOpts ¶
type JobOpts struct { Attempt *int AttemptedAt *time.Time CreatedAt *time.Time EncodedArgs []byte Errors [][]byte FinalizedAt *time.Time Kind *string MaxAttempts *int Metadata json.RawMessage Priority *int Queue *string ScheduledAt *time.Time State *rivertype.JobState Tags []string UniqueKey []byte }
type LeaderOpts ¶
type MigrationOpts ¶
Click to show internal directories.
Click to hide internal directories.