contractplansvc

package
v0.2.0 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: 17 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 contractplansvc persists portable compilation templates.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSourceUnavailable = xerror.New(xerror.KindInvalidInput, "PIPELINE_VERSION_SOURCE_UNAVAILABLE", "pipeline version has no retained source commit and path")
	ErrOperationSource   = xerror.New(xerror.KindInvalidInput, "PIPELINE_OPERATION_SOURCE_REQUIRED", "select an environment with bindings for saved-operation compilation")
)

Functions

This section is empty.

Types

type ContractPin

type ContractPin struct {
	Step, Contract, Revision                                          slug.Slug
	Port, Origin, Object, Digest, Compiler, Representation, RootShape string
}

type ContractResolver

type ContractResolver interface {
	ResolvePipelineContracts(context.Context, slug.Slug, slug.Slug, *pipelinespec.Pipeline) (*pipelinespec.Pipeline, []model.PinnedODCSPort, error)
}

type DataSourceRefResolver

type DataSourceRefResolver interface {
	ResolvePipelineDataSourceRefs(context.Context, slug.Slug, slug.Slug, slug.Slug, *pipelinespec.Pipeline) (*datasourcerefssvc.ResolvedPipeline, error)
}

type OperationIdentity

type OperationIdentity struct {
	Step, Operation        slug.Slug
	Role, Revision, Digest string
	ResourceScope          *resourcescope.Identity
}

type OperationScope

type OperationScope struct {
	Step  slug.Slug
	Role  string
	Scope resourcescope.Scope
}

type ProjectionIdentity

type ProjectionIdentity struct {
	Input                                                                                    int
	Contract, Revision, Object, Digest, ResolvedDigest, MappingID, Representation, RootShape string
}

type Request

type Request struct {
	Pipeline         *pipelinespec.Pipeline
	Source           contractplan.Source
	Projection       *odcs.ProjectionRequest
	ResourceScopes   []OperationScope
	OperationSources map[slug.Slug]slug.Slug
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) Compile

func (s *Service) Compile(ctx context.Context, org, project slug.Slug, request Request) (*compiledplans.Snapshot, error)

Compile explicitly snapshots current authoring inputs once. Recompilation can create another plan for identical authored content without changing old pins.

func (*Service) CompileVersion

func (s *Service) CompileVersion(ctx context.Context, org, project, pipeline slug.Slug, specHash string, environment slug.Slug, projection *odcs.ProjectionRequest, scopes []OperationScope) (*Summary, error)

CompileVersion accepts only a complete retained version identity. Provenance comes from that row, never the mutable current pipeline or a caller's source.

func (*Service) Get

func (s *Service) Get(ctx context.Context, org, project, pipeline slug.Slug, digest string) (*Summary, error)

Get reads only the selected retained identity.

func (*Service) Reload

func (s *Service) Reload(ctx context.Context, org, project, pipeline slug.Slug, digest string) (*contractplan.Plan, error)

type Summary

type Summary struct {
	PipelineSlug                                             slug.Slug
	Digest, SpecHash, Status, CompilerID, StructuralPolicyID string
	AdmissionEnabled                                         bool
	Source                                                   contractplan.Source
	Pins                                                     []ContractPin
	Operations                                               []OperationIdentity
	Projections                                              []ProjectionIdentity
}

Summary contains identity metadata only, never authored or resolved values.

Jump to

Keyboard shortcuts

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