testfactory

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package testfactory provides low level helpers for inserting records directly into the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Job

func Job_Build

func Job_Build(tb testing.TB, opts *JobOpts) *riverdriver.JobInsertFullParams

func Leader

func Queue

func Queue(ctx context.Context, tb testing.TB, exec riverdriver.Executor, opts *QueueOpts) *rivertype.Queue

Types

type JobOpts

type JobOpts struct {
	Attempt      *int
	AttemptedAt  *time.Time
	AttemptedBy  []string
	CreatedAt    *time.Time
	EncodedArgs  []byte
	Errors       [][]byte
	FinalizedAt  *time.Time
	Kind         *string
	MaxAttempts  *int
	Metadata     []byte
	Priority     *int
	Queue        *string
	ScheduledAt  *time.Time
	Schema       string
	State        *rivertype.JobState
	Tags         []string
	UniqueKey    []byte
	UniqueStates byte
}

type LeaderOpts

type LeaderOpts struct {
	ElectedAt *time.Time
	ExpiresAt *time.Time
	LeaderID  *string
	Now       *time.Time
	Schema    string
}

type MigrationOpts

type MigrationOpts struct {
	Line    *string
	Schema  string
	Version *int
}

type QueueOpts

type QueueOpts struct {
	Metadata  []byte
	Name      *string
	PausedAt  *time.Time
	Schema    string
	UpdatedAt *time.Time
}

Jump to

Keyboard shortcuts

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