Documentation
¶
Index ¶
- Variables
- func PipelineDataSourceRefSyncStatusStrings() []string
- type PipelineDataSourceRefSyncItem
- type PipelineDataSourceRefSyncResult
- type PipelineDataSourceRefSyncStatus
- func (i PipelineDataSourceRefSyncStatus) IsAPipelineDataSourceRefSyncStatus() bool
- func (i PipelineDataSourceRefSyncStatus) MarshalJSON() ([]byte, error)
- func (i PipelineDataSourceRefSyncStatus) MarshalText() ([]byte, error)
- func (i PipelineDataSourceRefSyncStatus) String() string
- func (i *PipelineDataSourceRefSyncStatus) UnmarshalJSON(data []byte) error
- func (i *PipelineDataSourceRefSyncStatus) UnmarshalText(text []byte) error
- type ResolutionDiagnostic
- type ResolvedPipeline
- type Service
Constants ¶
This section is empty.
Variables ¶
var ( ErrDataSourceRefNotFound = datasourcerefs.ErrDataSourceRefNotFound ErrDataSourceRefSlugTaken = datasourcerefs.ErrDataSourceRefSlugTaken ErrDataSourceBindingNotFound = datasourcerefs.ErrDataSourceBindingNotFound ErrProjectEnvironmentNotEnabled = datasourcerefs.ErrProjectEnvironmentNotEnabled ErrDataSourceRefIncompatible = xerror.DataSourceRefIncompatible() ErrInvalidDataSourceRefInput = xerror.ValidationFailed() )
Functions ¶
func PipelineDataSourceRefSyncStatusStrings ¶
func PipelineDataSourceRefSyncStatusStrings() []string
PipelineDataSourceRefSyncStatusStrings returns a slice of all String values of the enum
Types ¶
type PipelineDataSourceRefSyncItem ¶
type PipelineDataSourceRefSyncItem struct {
PipelineSlug slug.Slug
RefSlug slug.Slug
DataSourceType model.DataSourceType
RequiredCapabilities []model.DataSourceRefCapability
Status PipelineDataSourceRefSyncStatus
}
PipelineDataSourceRefSyncItem reports one logical ref touched by spec sync.
type PipelineDataSourceRefSyncResult ¶
type PipelineDataSourceRefSyncResult struct {
Items []PipelineDataSourceRefSyncItem
}
PipelineDataSourceRefSyncResult reports logical refs found in a pipeline spec.
type PipelineDataSourceRefSyncStatus ¶
type PipelineDataSourceRefSyncStatus int
PipelineDataSourceRefSyncStatus describes the idempotent ref sync action.
const ( PipelineDataSourceRefSyncStatusCreated PipelineDataSourceRefSyncStatus = iota // created PipelineDataSourceRefSyncStatusUpdated // updated PipelineDataSourceRefSyncStatusUnchanged // unchanged )
func PipelineDataSourceRefSyncStatusString ¶
func PipelineDataSourceRefSyncStatusString(s string) (PipelineDataSourceRefSyncStatus, error)
PipelineDataSourceRefSyncStatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func PipelineDataSourceRefSyncStatusValues ¶
func PipelineDataSourceRefSyncStatusValues() []PipelineDataSourceRefSyncStatus
PipelineDataSourceRefSyncStatusValues returns all values of the enum
func (PipelineDataSourceRefSyncStatus) IsAPipelineDataSourceRefSyncStatus ¶
func (i PipelineDataSourceRefSyncStatus) IsAPipelineDataSourceRefSyncStatus() bool
IsAPipelineDataSourceRefSyncStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (PipelineDataSourceRefSyncStatus) MarshalJSON ¶
func (i PipelineDataSourceRefSyncStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for PipelineDataSourceRefSyncStatus
func (PipelineDataSourceRefSyncStatus) MarshalText ¶
func (i PipelineDataSourceRefSyncStatus) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for PipelineDataSourceRefSyncStatus
func (PipelineDataSourceRefSyncStatus) String ¶
func (i PipelineDataSourceRefSyncStatus) String() string
func (*PipelineDataSourceRefSyncStatus) UnmarshalJSON ¶
func (i *PipelineDataSourceRefSyncStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for PipelineDataSourceRefSyncStatus
func (*PipelineDataSourceRefSyncStatus) UnmarshalText ¶
func (i *PipelineDataSourceRefSyncStatus) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for PipelineDataSourceRefSyncStatus
type ResolutionDiagnostic ¶
type ResolutionDiagnostic struct {
Field string
StepSlug *slug.Slug
DataSourceRefSlug slug.Slug
DataSourceRef slug.Slug
ResolvedDataSourceSlug slug.Slug
EnvironmentSlug slug.Slug
DataSourceType model.DataSourceType
ExpectedDataSourceType model.DataSourceType
RequiredCapability model.DataSourceRefCapability
}
func AsResolutionDiagnostic ¶
func AsResolutionDiagnostic(err error) (ResolutionDiagnostic, bool)
type ResolvedPipeline ¶
type ResolvedPipeline struct {
Inputs []deploymentplan.Input
Pipeline *pipelinespec.Pipeline
Resolutions []model.ResolvedPipelineDataSourceRef
}
type Service ¶
type Service interface {
CreateDataSourceRef(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug slug.Slug,
newRef model.NewDataSourceRef,
actor model.EventActor,
) (*model.DataSourceRef, error)
GetDataSourceRef(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug, refSlug slug.Slug,
) (*model.DataSourceRef, error)
ListDataSourceRefs(
ctx context.Context,
orgSlug, projectSlug slug.Slug,
req model.ListRequest,
) (model.ListResponse[model.DataSourceRef], error)
UpdateDataSourceRef(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug, refSlug slug.Slug,
update model.UpdateDataSourceRef,
actor model.EventActor,
) (*model.DataSourceRef, error)
DeleteDataSourceRef(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug, refSlug slug.Slug,
actor model.EventActor,
) error
UpsertEnvironmentBinding(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug, environmentSlug, refSlug slug.Slug,
binding model.UpsertDataSourceBinding,
actor model.EventActor,
) (*model.DataSourceBinding, error)
GetEnvironmentBinding(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug, environmentSlug, refSlug slug.Slug,
) (*model.DataSourceBinding, error)
ListEnvironmentBindings(
ctx context.Context,
orgSlug, projectSlug, environmentSlug slug.Slug,
req model.ListRequest,
) (model.ListResponse[model.DataSourceBinding], error)
DeleteEnvironmentBinding(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug, environmentSlug, refSlug slug.Slug,
confirmation *slug.Slug,
actor model.EventActor,
) error
ResolvePipelineDataSourceRefs(
ctx context.Context,
orgSlug, projectSlug, environmentSlug slug.Slug,
pipeline *pipelinespec.Pipeline,
) (*ResolvedPipeline, error)
SyncPipelineDataSourceRefs(
ctx context.Context,
orgSlug, projectSlug slug.Slug,
pipeline *pipelinespec.Pipeline,
actor model.EventActor,
) (*PipelineDataSourceRefSyncResult, error)
ReconcilePipelineDataSourceRefs(
ctx context.Context,
orgSlug, projectSlug slug.Slug,
pipeline *pipelinespec.Pipeline,
actor model.EventActor,
) (*PipelineDataSourceRefSyncResult, error)
DeleteDataSourceRefsForPipeline(
ctx context.Context,
orgSlug, projectSlug, pipelineSlug slug.Slug,
actor model.EventActor,
) error
}
func New ¶
func New( txm postgres.TransactionManager, repo datasourcerefs.Repository, dataSources datasourcessvc.Service, eventProducer workerproducer.EventProducer, ) Service