readinesssvc

package
v0.2.0-linux-arm64 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package readinesssvc evaluates persisted pipeline setup without running connectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Severity        string    `json:"severity"`
	Code            string    `json:"code"`
	EnvironmentSlug slug.Slug `json:"environment_slug"`
	PipelineSlug    slug.Slug `json:"pipeline_slug"`
	StepSlug        slug.Slug `json:"step_slug"`
	RequirementKey  string    `json:"requirement_key"`
	FieldPath       string    `json:"field_path"`
	NextAction      string    `json:"next_action"`
}

type EnvironmentInput

type EnvironmentInput struct {
	Slug      slug.Slug
	Variables map[string]Variable
}

type EnvironmentResult

type EnvironmentResult struct {
	EnvironmentSlug slug.Slug     `json:"environment_slug"`
	Status          string        `json:"status"`
	Diagnostics     []Diagnostic  `json:"diagnostics"`
	Requirements    []Requirement `json:"requirements,omitzero"`
}

type OperationKey

type OperationKey struct{ Source, Ref slug.Slug }

type OperationReader

type OperationReader func(context.Context, slug.Slug, slug.Slug, slug.Slug) (*queriessvc.Query, error)

type PipelineInput

type PipelineInput struct {
	Spec       *pipelinespec.Pipeline
	Refs       []model.DataSourceRef
	Bindings   []model.DataSourceBinding
	Operations map[OperationKey]SavedOperation
}

type Report

type Report struct {
	Status       string              `json:"status"`
	Environments []EnvironmentResult `json:"environments"`
}

func Evaluate

func Evaluate(pipelines []PipelineInput, environments []EnvironmentInput) Report

func Load

func Load(ctx context.Context, pipelines pipelinesvc.Service, environments environmentssvc.Service, refs datasourcerefssvc.Service, readOperation OperationReader, org, project, pipeline slug.Slug) (Report, error)

Load evaluates the current persisted specs. An empty pipeline selects the whole project.

func LoadSpecs

func LoadSpecs(ctx context.Context, environments environmentssvc.Service, refs datasourcerefssvc.Service, readOperation OperationReader, org, project slug.Slug, specs []*pipelinespec.Pipeline) ([]Report, error)

LoadSpecs evaluates incoming pipeline specs against the project's current setup.

type Requirement

type Requirement struct {
	Kind       string                        `json:"kind"`
	Key        string                        `json:"key"`
	Capability model.DataSourceRefCapability `json:"capability,omitempty"`
	Status     string                        `json:"status"`
	Usages     []Usage                       `json:"usages"`
	Target     *Target                       `json:"target,omitempty"`
	Variable   *Variable                     `json:"variable,omitempty"`
}

type SavedOperation

type SavedOperation struct {
	Query           *queriessvc.Query
	WrongDataSource bool
}

type Target

type Target struct {
	Slug               slug.Slug            `json:"slug"`
	Name               string               `json:"name"`
	Type               model.DataSourceType `json:"type"`
	Active             bool                 `json:"active"`
	ReadOnly           bool                 `json:"read_only"`
	SupportsCapability bool                 `json:"supports_capability"`
}

type Usage

type Usage struct {
	StepSlug  slug.Slug `json:"step_slug"`
	FieldPath string    `json:"field_path"`
}

type Variable

type Variable struct {
	Source       model.RuntimeVariableSource `json:"source"`
	Present      bool                        `json:"present"`
	TypeMismatch bool                        `json:"type_mismatch"`
}

Jump to

Keyboard shortcuts

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