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 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
}
Click to show internal directories.
Click to hide internal directories.