dbsqlc

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type JobCountByQueueAndStateRow

type JobCountByQueueAndStateRow struct {
	Queue          string
	CountAvailable int64
	CountRunning   int64
}

type JobCountByStateRow

type JobCountByStateRow struct {
	State RiverJobState
	Count int64
}

type JobListWorkflowParams

type JobListWorkflowParams struct {
	WorkflowID       string
	PaginationOffset int64
	PaginationLimit  int32
}

type NullRiverJobState

type NullRiverJobState struct {
	RiverJobState RiverJobState
	Valid         bool // Valid is true if RiverJobState is not NULL
}

func (*NullRiverJobState) Scan

func (ns *NullRiverJobState) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullRiverJobState) Value

func (ns NullRiverJobState) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Queries

type Queries struct {
}

func New

func New() *Queries

func (*Queries) JobCountByQueueAndState

func (q *Queries) JobCountByQueueAndState(ctx context.Context, db DBTX, queueNames []string) ([]*JobCountByQueueAndStateRow, error)

func (*Queries) JobCountByState

func (q *Queries) JobCountByState(ctx context.Context, db DBTX) ([]*JobCountByStateRow, error)

func (*Queries) JobListWorkflow

func (q *Queries) JobListWorkflow(ctx context.Context, db DBTX, arg *JobListWorkflowParams) ([]*RiverJob, error)

func (*Queries) WorkflowListActive

func (q *Queries) WorkflowListActive(ctx context.Context, db DBTX, arg *WorkflowListActiveParams) ([]*WorkflowListActiveRow, error)

func (*Queries) WorkflowListAll

func (q *Queries) WorkflowListAll(ctx context.Context, db DBTX, arg *WorkflowListAllParams) ([]*WorkflowListAllRow, error)

func (*Queries) WorkflowListInactive

func (q *Queries) WorkflowListInactive(ctx context.Context, db DBTX, arg *WorkflowListInactiveParams) ([]*WorkflowListInactiveRow, error)

type RiverJob

type RiverJob struct {
	ID          int64
	State       RiverJobState
	Attempt     int16
	MaxAttempts int16
	AttemptedAt pgtype.Timestamptz
	CreatedAt   pgtype.Timestamptz
	FinalizedAt pgtype.Timestamptz
	ScheduledAt pgtype.Timestamptz
	Priority    int16
	Args        []byte
	AttemptedBy []string
	Errors      [][]byte
	Kind        string
	Metadata    []byte
	Queue       string
	Tags        []string
}

type RiverJobState

type RiverJobState string
const (
	RiverJobStateAvailable RiverJobState = "available"
	RiverJobStateCancelled RiverJobState = "cancelled"
	RiverJobStateCompleted RiverJobState = "completed"
	RiverJobStateDiscarded RiverJobState = "discarded"
	RiverJobStatePending   RiverJobState = "pending"
	RiverJobStateRetryable RiverJobState = "retryable"
	RiverJobStateRunning   RiverJobState = "running"
	RiverJobStateScheduled RiverJobState = "scheduled"
)

func (*RiverJobState) Scan

func (e *RiverJobState) Scan(src interface{}) error

type RiverLeader

type RiverLeader struct {
	ElectedAt pgtype.Timestamptz
	ExpiresAt pgtype.Timestamptz
	LeaderID  string
	Name      string
}

type RiverQueue

type RiverQueue struct {
	Name      string
	CreatedAt pgtype.Timestamptz
	Metadata  []byte
	PausedAt  pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

type WorkflowListActiveParams

type WorkflowListActiveParams struct {
	After           string
	PaginationLimit int32
}

type WorkflowListActiveRow

type WorkflowListActiveRow struct {
	WorkflowID        string
	WorkflowName      string
	EarliestCreatedAt pgtype.Timestamptz
	CountFailedDeps   int64
	CountAvailable    int64
	CountCancelled    int64
	CountCompleted    int64
	CountDiscarded    int64
	CountPending      int64
	CountRetryable    int64
	CountRunning      int64
	CountScheduled    int64
}

type WorkflowListAllParams

type WorkflowListAllParams struct {
	After           string
	PaginationLimit int32
}

type WorkflowListAllRow

type WorkflowListAllRow struct {
	WorkflowID        string
	WorkflowName      string
	EarliestCreatedAt pgtype.Timestamptz
	CountFailedDeps   int64
	CountAvailable    int64
	CountCancelled    int64
	CountCompleted    int64
	CountDiscarded    int64
	CountPending      int64
	CountRetryable    int64
	CountRunning      int64
	CountScheduled    int64
}

type WorkflowListInactiveParams

type WorkflowListInactiveParams struct {
	PaginationLimit int32
	After           string
}

type WorkflowListInactiveRow

type WorkflowListInactiveRow struct {
	WorkflowID        string
	WorkflowName      string
	EarliestCreatedAt pgtype.Timestamptz
	CountFailedDeps   int64
	CountAvailable    int64
	CountCancelled    int64
	CountCompleted    int64
	CountDiscarded    int64
	CountPending      int64
	CountRetryable    int64
	CountRunning      int64
	CountScheduled    int64
}

Jump to

Keyboard shortcuts

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