dbgen

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 GetOutgoingHeartbeatResultRow

type GetOutgoingHeartbeatResultRow struct {
	Configured                     bool
	OutgoingHeartbeatLastAttemptAt pgtype.Timestamptz
	OutgoingHeartbeatLastOk        pgtype.Bool
	OutgoingHeartbeatLastError     pgtype.Text
}

type GetRuntimeStateRow

type GetRuntimeStateRow struct {
	LeaderReplicaID pgtype.Text
	AliveAt         pgtype.Timestamptz
	RecoveryUntil   pgtype.Timestamptz
}

type LatestDowntimeRow

type LatestDowntimeRow struct {
	StartedAt time.Time
	EndedAt   time.Time
}

type ListActiveStormsRow

type ListActiveStormsRow struct {
	PublicID        string
	Name            string
	StartedAt       time.Time
	AlertGroupCount int64
}

type ListBrokenDestinationsRow

type ListBrokenDestinationsRow struct {
	PublicID    string
	Name        string
	BrokenSince time.Time
	Reason      string
}

type ListDeliveryQueuesParams

type ListDeliveryQueuesParams struct {
	Now   time.Time
	OrgID int64
}

type ListDeliveryQueuesRow

type ListDeliveryQueuesRow struct {
	PublicID string
	Name     string
	Queued   int64
}

type ListIntegrationsAttentionRow

type ListIntegrationsAttentionRow struct {
	PublicID string
	Name     string
	Issue    string
	Since    pgtype.Timestamptz
}

type ListTemplateErrorsRow

type ListTemplateErrorsRow struct {
	Kind     string
	PublicID string
	Name     string
	Template string
	Since    time.Time
	Error    string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) GetOutgoingHeartbeatResult

func (q *Queries) GetOutgoingHeartbeatResult(ctx context.Context, orgID int64) (GetOutgoingHeartbeatResultRow, error)

GetOutgoingHeartbeatResult reads whether the outgoing heartbeat has a URL and the result of its last attempt; organizations is keyed by id.

func (*Queries) GetRuntimeState

func (q *Queries) GetRuntimeState(ctx context.Context) (GetRuntimeStateRow, error)

SPDX-License-Identifier: AGPL-3.0-only Copyright The Muster Authors GetRuntimeState reads the Leader and the recovery window of the installation; runtime_state has one row and no org_id.

func (*Queries) LatestDowntime

func (q *Queries) LatestDowntime(ctx context.Context) (LatestDowntimeRow, error)

LatestDowntime reads the last recorded downtime of the installation; downtime_periods has no org_id.

func (*Queries) ListActiveStorms

func (q *Queries) ListActiveStorms(ctx context.Context, orgID int64) ([]ListActiveStormsRow, error)

ListActiveStorms lists the Storms that have not ended, with their Route; a Storm of a deleted Route, which may not have ended yet, is left out, as muster_storm_active leaves it out.

func (*Queries) ListBrokenDestinations

func (q *Queries) ListBrokenDestinations(ctx context.Context, orgID int64) ([]ListBrokenDestinationsRow, error)

ListBrokenDestinations lists the Broken Destinations that are not deleted, with the masked reason.

func (*Queries) ListDeliveryQueues

func (q *Queries) ListDeliveryQueues(ctx context.Context, arg ListDeliveryQueuesParams) ([]ListDeliveryQueuesRow, error)

ListDeliveryQueues lists the Destinations that are not deleted with pending deliveries that no Storm holds, Thread replies due at @now or pending outgoing webhook events, and their count. It counts as CountDeliveryQueues of internal/delivery counts muster_delivery_queue; a change of one changes the other.

func (*Queries) ListIntegrationsAttention

func (q *Queries) ListIntegrationsAttention(ctx context.Context, orgID int64) ([]ListIntegrationsAttentionRow, error)

ListIntegrationsAttention lists the Integrations that are not deleted and are Heartbeat lost, or have a truncated groupKey, since when.

func (*Queries) ListTemplateErrors

func (q *Queries) ListTemplateErrors(ctx context.Context, orgID int64) ([]ListTemplateErrorsRow, error)

ListTemplateErrors lists the Routes and the Destinations that are not deleted and whose template keeps failing.

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

Jump to

Keyboard shortcuts

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