datasourcerefs

package
v0.0.0-...-5106b98 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataSourceRefNotFound        = xerror.NotFound(xerror.DataSourceRef)
	ErrDataSourceRefSlugTaken       = xerror.AlreadyExists(xerror.DataSourceRef)
	ErrDataSourceBindingNotFound    = xerror.NotFound(xerror.DataSourceBinding)
	ErrProjectEnvironmentNotEnabled = xerror.NotFound(xerror.ProjectEnvironment)
)

Functions

This section is empty.

Types

type CreateDataSourceRefParams

type CreateDataSourceRefParams struct {
	Slug                 slug.Slug
	Name                 string
	DataSourceType       model.DataSourceType
	RequiredCapabilities []model.DataSourceRefCapability
}

type DataSourceBinding

type DataSourceBinding struct {
	PipelineSlug         slug.Slug
	DataSourceRefSlug    slug.Slug
	DataSourceRefName    string
	EnvironmentSlug      slug.Slug
	DataSourceSlug       slug.Slug
	DataSourceName       string
	DataSourceType       model.DataSourceType
	DataSourceActive     bool
	DataSourceReadOnly   bool
	RequiredCapabilities []model.DataSourceRefCapability
	CreatedAt            time.Time
	UpdatedAt            time.Time
}

type DataSourceRef

type DataSourceRef struct {
	PipelineSlug         slug.Slug
	Slug                 slug.Slug
	Name                 string
	DataSourceType       model.DataSourceType
	RequiredCapabilities []model.DataSourceRefCapability
	CreatedAt            time.Time
	UpdatedAt            time.Time
}

type Repository

type Repository interface {
	CreateDataSourceRef(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug slug.Slug,
		params CreateDataSourceRefParams,
	) (*DataSourceRef, error)
	FindDataSourceRefBySlug(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, dataSourceRefSlug slug.Slug,
	) (*DataSourceRef, error)
	ListDataSourceRefs(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug slug.Slug,
		req model.ListRequest,
	) ([]*DataSourceRef, error)
	ListDataSourceRefsByPipeline(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug slug.Slug,
	) ([]*DataSourceRef, error)
	UpdateDataSourceRef(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, dataSourceRefSlug slug.Slug,
		params UpdateDataSourceRefParams,
	) (*DataSourceRef, error)
	DeleteDataSourceRef(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, dataSourceRefSlug slug.Slug,
	) error
	DeleteDataSourceRefsForPipeline(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug slug.Slug,
	) error
	ListProtectedBindingEnvironmentsForDataSourceRef(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, dataSourceRefSlug slug.Slug,
	) ([]model.ProjectEnvironmentProtection, error)
	ProjectEnvironmentEnabled(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
	) (bool, error)
	FindProjectEnvironmentProtection(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
	) (*model.ProjectEnvironmentProtection, error)
	UpsertEnvironmentBinding(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, environmentSlug, dataSourceRefSlug slug.Slug,
		params UpsertEnvironmentBindingParams,
	) (*DataSourceBinding, error)
	FindEnvironmentBinding(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, environmentSlug, dataSourceRefSlug slug.Slug,
	) (*DataSourceBinding, error)
	ListEnvironmentBindings(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
		req model.ListRequest,
	) ([]*DataSourceBinding, error)
	ListEnvironmentBindingsForDataSourceRef(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, dataSourceRefSlug slug.Slug,
	) ([]*DataSourceBinding, error)
	ResolveEnvironmentBinding(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, environmentSlug, dataSourceRefSlug slug.Slug,
	) (*DataSourceBinding, error)
	ListRuntimeVariables(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
	) ([]model.RuntimeVariable, error)
	DeleteEnvironmentBinding(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, pipelineSlug, environmentSlug, dataSourceRefSlug slug.Slug,
	) error
}

func NewRepository

func NewRepository() Repository

type UpdateDataSourceRefParams

type UpdateDataSourceRefParams struct {
	Name                 string
	DataSourceType       model.DataSourceType
	RequiredCapabilities []model.DataSourceRefCapability
}

type UpsertEnvironmentBindingParams

type UpsertEnvironmentBindingParams struct {
	DataSourceSlug slug.Slug
}

Jump to

Keyboard shortcuts

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