repositorysetups

package
v0.2.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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

Overview

Package repositorysetups persists resumable project repository setup state.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound  = xerror.NotFound(xerror.Project).Detail("project repository setup was not found")
	ErrBusy      = xerror.New(xerror.KindAlreadyExists, "PROJECT_REPOSITORY_SETUP_BUSY", "project repository setup is leased")
	ErrLeaseLost = xerror.New(xerror.KindAlreadyExists, "PROJECT_REPOSITORY_SETUP_LEASE_LOST", "project repository setup lease was lost")
)

Functions

This section is empty.

Types

type Repository

type Repository struct{}

func New

func New() *Repository

func (*Repository) Abandon

func (*Repository) Abandon(ctx context.Context, db postgres.DBTX, org, project, setup slug.Slug, leaseOwner string) (*Row, error)

func (*Repository) Claim

func (*Repository) Claim(ctx context.Context, db postgres.DBTX, org, project, setup slug.Slug, leaseOwner string) (*Row, error)

func (*Repository) Create

func (*Repository) Create(ctx context.Context, db postgres.DBTX, org, project, setupSlug slug.Slug, request json.RawMessage) (bool, error)

func (*Repository) Get

func (*Repository) Get(ctx context.Context, db postgres.DBTX, org, project slug.Slug) (*Row, error)

func (*Repository) GetAttempt

func (*Repository) GetAttempt(ctx context.Context, db postgres.DBTX, org, project, setup slug.Slug) (*Row, error)

func (*Repository) ProjectForSetup

func (*Repository) ProjectForSetup(ctx context.Context, db postgres.DBTX, org, setup slug.Slug) (slug.Slug, error)

func (*Repository) Release

func (*Repository) Release(ctx context.Context, db postgres.DBTX, org, project slug.Slug, leaseOwner string) error

func (*Repository) Update

func (*Repository) Update(ctx context.Context, db postgres.DBTX, org, project slug.Slug, leaseOwner string, row *Row) error

type Row

type Row struct {
	Slug        slug.Slug
	Request     json.RawMessage
	Result      json.RawMessage
	Status      string
	FailureCode string
	AbandonedAt *time.Time
}

Jump to

Keyboard shortcuts

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