datasourcerefssvc

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataSourceRefNotFound        = datasourcerefs.ErrDataSourceRefNotFound
	ErrDataSourceRefSlugTaken       = datasourcerefs.ErrDataSourceRefSlugTaken
	ErrDataSourceBindingNotFound    = datasourcerefs.ErrDataSourceBindingNotFound
	ErrProjectEnvironmentNotEnabled = datasourcerefs.ErrProjectEnvironmentNotEnabled

	ErrDataSourceRefIncompatible    = xerror.DataSourceRefIncompatible()
	ErrDataSourceBindingUnavailable = xerror.DataSourceBindingUnavailable()
	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 (*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
}

Jump to

Keyboard shortcuts

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