pgrepo

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

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

func New

func New(pool *pgxpool.Pool) *Repo

func (*Repo) AdminRedeliver

func (r *Repo) AdminRedeliver(ctx context.Context, deliveryID string) (app.AdminDeliveryView, error)

func (*Repo) ClaimPending

func (r *Repo) ClaimPending(ctx context.Context, batchSize int) ([]app.PendingDelivery, error)

func (*Repo) CreateSubscription

func (r *Repo) CreateSubscription(ctx context.Context, sub app.Subscription, secret string) (app.Subscription, error)

func (*Repo) DeleteSubscription

func (r *Repo) DeleteSubscription(ctx context.Context, workspaceID, id string) error

func (*Repo) EmitForEvent

func (r *Repo) EmitForEvent(ctx context.Context, workspaceID string, event app.OutboundEvent) (int, error)

func (*Repo) EnqueuePing

func (r *Repo) EnqueuePing(ctx context.Context, workspaceID, subscriptionID string) error

func (*Repo) FirstFailureAt

func (r *Repo) FirstFailureAt(ctx context.Context, subscriptionID string) (*time.Time, error)

func (*Repo) GetSubscription

func (r *Repo) GetSubscription(ctx context.Context, workspaceID, id string) (app.Subscription, bool, error)

func (*Repo) ListAllDeliveries

func (r *Repo) ListAllDeliveries(ctx context.Context, f app.DeliveryFilter, limit, offset int) ([]app.AdminDeliveryView, int, error)

func (*Repo) ListDeliveries

func (r *Repo) ListDeliveries(ctx context.Context, workspaceID string, limit int) ([]app.Delivery, error)

func (*Repo) ListSubscriptions

func (r *Repo) ListSubscriptions(ctx context.Context, workspaceID string) ([]app.Subscription, error)

func (*Repo) MarkDelivered

func (r *Repo) MarkDelivered(ctx context.Context, deliveryID string, statusCode int, now time.Time) error

func (*Repo) MarkRetry

func (r *Repo) MarkRetry(ctx context.Context, deliveryID string, statusCode int, errMsg string, nextAt time.Time, dead bool) error

func (*Repo) Redeliver

func (r *Repo) Redeliver(ctx context.Context, workspaceID, deliveryID string) (app.Delivery, error)

func (*Repo) RotateSecret

func (r *Repo) RotateSecret(ctx context.Context, workspaceID, subscriptionID, newSealed string, oldExpiresAt, now time.Time) error

func (*Repo) SetSubscriptionActive

func (r *Repo) SetSubscriptionActive(ctx context.Context, workspaceID, id string, active bool, now time.Time) error

Jump to

Keyboard shortcuts

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