environments

package
v0.0.0-...-cb886e6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEnvironmentNotFound = errors.New("environment not found")

Functions

func NewDBEnvironmentsProvider

func NewDBEnvironmentsProvider(
	db *database.DB,
	paymentProvider payment.PaymentProvider,
	envLimitAmount int,
	permanentBranchesProvider permanentbranches.PermanentBranchesProvider,
	clusterClient cluster.Client,
) *dbEnvironmentsProvider

Types

type EnvironmentsProvider

type EnvironmentsProvider interface {
	IsOwnerLimited(ctx context.Context, owner string) (bool, error)
	GetEnvironmentFromHost(ctx context.Context, host string) (*database.Environment, error)
	SaveEnvironment(ctx context.Context, env *database.Environment) error
	ListSuccessEnvironments(ctx context.Context) ([]*database.Environment, error)
	ShouldDeploy(ctx context.Context, owner string, repo string, branch string) (bool, error)
	ListEnvironmentsByBranch(ctx context.Context, owner, repo, branch string) ([]*database.Environment, error)
	DeleteEnvironment(ctx context.Context, id uuid.UUID) error
	TerminateEnvironment(ctx context.Context, req TerminateEnvironmentRequest) error
}

type TerminateEnvironmentRequest

type TerminateEnvironmentRequest struct {
	Owner    string
	Repo     string
	Branch   string
	PrNumber *int
}

Jump to

Keyboard shortcuts

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