blueprint

package
v0.0.0-...-e84d2fa Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 21 Imported by: 0 modules, 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

Index

Constants

View Source
const (
	DefaultReadinessTimeout  = 30 * time.Second
	DefaultReadinessInterval = time.Second
)
View Source
const (
	ContributionProviderOS     = "os"
	ContributionProviderPython = "python"
)
View Source
const DefaultControlScriptName = "appctl"
View Source
const DefaultRuntimeUser = "reploy"
View Source
const IdentityPolicySchemaV1 = "identity-policy-v1"
View Source
const ResolvedDocumentSchemaV1 = "blueprint-resolved-v1"

Variables

Functions

func ApplicationContributionID

func ApplicationContributionID(application string, provider string) string

func ApplicationContributionOwner

func ApplicationContributionOwner(id string, provider string) (string, bool)

func ApplicationExecutableID

func ApplicationExecutableID(application string, executable string) string

func ApplicationID

func ApplicationID(application string) string

func ContributionRuntimeOwner

func ContributionRuntimeOwner(id string, provider string) string

func DocumentDigestV1

func DocumentDigestV1(document Document) (canonical.Digest, error)

func EnvironmentContributionID

func EnvironmentContributionID(provider string) string

func HasLegacyComponentsResolvedShapeV1

func HasLegacyComponentsResolvedShapeV1(payload ResolvedDocumentV1) bool

HasLegacyComponentsResolvedShapeV1 identifies the one unreleased resolved blueprint shape eligible for explicit forced recovery.

func ResolveEnvironmentVariableString

func ResolveEnvironmentVariableString(value string, variables map[string]any) (string, error)

ResolveEnvironmentVariableString interpolates environment-owned variables into one string without enabling runtime namespaces.

func ResolveEnvironmentVariables

func ResolveEnvironmentVariables(source map[string]any) (map[string]any, error)

ResolveEnvironmentVariables resolves one environment-owned variable map for blueprint-adjacent staging inputs such as overrides.yaml.

func ResolveInstallTarget

func ResolveInstallTarget(target InstallTarget, environmentID string, context InstallTargetContext) (string, error)

ResolveInstallTarget resolves the typed environment install target for a concrete host and install scope.

func ResolveOperationStrings

func ResolveOperationStrings(values []string, variables map[string]any, phase Phase, scope *InstallScope, roots map[string]any) ([]string, error)

ResolveOperationStrings performs the final lazy interpolation for values consumed by a concrete staged or installed operation.

func ResolvedDocumentDigestV1

func ResolvedDocumentDigestV1(payload ResolvedDocumentV1) (canonical.Digest, error)

func ValidateAPTPackageRequest

func ValidateAPTPackageRequest(request APTPackageRequest) error

ValidateAPTPackageRequest validates a resolved request, including structured executable exports, without reparsing an author string as an APT expression.

func ValidateContributionID

func ValidateContributionID(field string, id string) error

func ValidateContributionReference

func ValidateContributionReference(field string, id string) error

ValidateContributionReference accepts canonical ownership identities and the provider-local identifiers still used by low-level provider APIs. Blueprint resolution emits only canonical contribution IDs.

func ValidateEnvironmentID

func ValidateEnvironmentID(field string, name string) error

ValidateEnvironmentID applies the portable environment identifier grammar at staging-only sidecar boundaries outside this package.

func ValidateProviderIdentifier

func ValidateProviderIdentifier(field string, name string) error

ValidateProviderIdentifier applies the shared component, option, and output identifier grammar at command and overlay boundaries outside this package.

func ValidatePythonDistributionName

func ValidatePythonDistributionName(field string, name string) error

ValidatePythonDistributionName applies the Python project-name grammar used by staging package overrides and provider-owned package identities.

func ValidateRuntimeMountDestination

func ValidateRuntimeMountDestination(target string) error

ValidateRuntimeMountDestination applies the platform-independent container path restrictions shared by blueprint validation and canonical runtime plans.

func ValidateRuntimeUserName

func ValidateRuntimeUserName(value string) error

func ValidateSelectedPlatform

func ValidateSelectedPlatform(document Document, selected Platform) error

ValidateSelectedPlatform requires one selected concrete target to be covered by the resolved blueprint's declared compatibility set. A declared platform without a variant covers the selected variant for that same OS and architecture.

Types

type APTComponent

type APTComponent struct {
	Packages []APTPackageRequest
}

type APTPackageRequest

type APTPackageRequest struct {
	Name    string
	Version string
	Exports map[string]ExecutableExport
}

APTPackageRequest is the resolved form shared by scalar and structured APT package entries. Name and Version are never retained as an executable APT expression.

func ParseAPTPackageRequest

func ParseAPTPackageRequest(value string) (APTPackageRequest, error)

ParseAPTPackageRequest parses Reploy's strict name or name=exact-version subset. The returned fields are the only values later rendered for APT.

func (APTPackageRequest) Canonical

func (request APTPackageRequest) Canonical() (string, error)

Canonical returns the only APT root-operand spelling permitted for request.

type APTPackageRequestSyntax

type APTPackageRequestSyntax struct {
	Package string                            `yaml:"package"`
	Exports map[string]ExecutableExportSyntax `yaml:"exports"`
}

func (*APTPackageRequestSyntax) UnmarshalYAML

func (request *APTPackageRequestSyntax) UnmarshalYAML(node *yaml.Node) error

type Action

type Action struct {
	Environment []string
}

type ActionSyntax

type ActionSyntax struct {
	Environment []string `yaml:"environment"`
}

type AmbiguousNetworkAccess

type AmbiguousNetworkAccess string
const (
	AmbiguousNetworkAccessRequireBoth AmbiguousNetworkAccess = "require-both"
	AmbiguousNetworkAccessAllow       AmbiguousNetworkAccess = "allow"
)

type Application

type Application struct {
	Packages    ApplicationPackages
	Options     map[string]ApplicationOption
	Executables map[string]Executable
}

type ApplicationOption

type ApplicationOption struct {
	Description string
	Packages    ApplicationOptionPackages
}

type ApplicationOptionPackages

type ApplicationOptionPackages struct {
	OS     []APTPackageRequest
	Python *PythonOptionPackages
}

type ApplicationOptionSyntax

type ApplicationOptionSyntax struct {
	Description string                    `yaml:"description"`
	Packages    ApplicationPackagesSyntax `yaml:"packages"`
}

func (*ApplicationOptionSyntax) UnmarshalYAML

func (option *ApplicationOptionSyntax) UnmarshalYAML(node *yaml.Node) error

type ApplicationPackages

type ApplicationPackages struct {
	OS          []APTPackageRequest
	Python      *PythonComponent
	Tools       []toolrequest.CanonicalRequirementGroupV1
	ToolSources map[string][]string `json:"-"`
}

type ApplicationPackagesSyntax

type ApplicationPackagesSyntax struct {
	OS     []APTPackageRequestSyntax `yaml:"os"`
	Python *PythonPackagesSyntax     `yaml:"python"`
	Tools  []toolrequest.SyntaxV1    `yaml:"tools"`

	// ToolsFieldPresent distinguishes omission from an explicit YAML null.
	ToolsFieldPresent bool `yaml:"-"`
}

func (*ApplicationPackagesSyntax) UnmarshalYAML

func (packages *ApplicationPackagesSyntax) UnmarshalYAML(node *yaml.Node) error

type ApplicationSyntax

type ApplicationSyntax struct {
	Packages    ApplicationPackagesSyntax          `yaml:"packages"`
	Options     map[string]ApplicationOptionSyntax `yaml:"options"`
	Executables map[string]ExecutableSyntax        `yaml:"executables"`
}

func (*ApplicationSyntax) UnmarshalYAML

func (application *ApplicationSyntax) UnmarshalYAML(node *yaml.Node) error

type ArgumentSegment

type ArgumentSegment string
const (
	ArgumentBinary    ArgumentSegment = "binary"
	ArgumentPrefix    ArgumentSegment = "prefix"
	ArgumentCommand   ArgumentSegment = "command"
	ArgumentForwarded ArgumentSegment = "forwarded"
	ArgumentSuffix    ArgumentSegment = "suffix"
)

type BaseComponent

type BaseComponent struct {
	Image   string
	Exports map[string]BaseExecutableExport
}

type BaseExecutableExport

type BaseExecutableExport struct {
	Executable string
}

type BaseSyntax

type BaseSyntax struct {
	Image   string                            `yaml:"image"`
	Exports map[string]ExecutableExportSyntax `yaml:"exports"`
}

func (*BaseSyntax) UnmarshalYAML

func (base *BaseSyntax) UnmarshalYAML(node *yaml.Node) error

type Bind

type Bind struct {
	Address string
}

type BindSyntax

type BindSyntax struct {
	Address string `yaml:"address"`
}

type Command

type Command struct {
	Executable      string
	Trigger         []string
	NativeCommand   bool
	DeployedCommand bool
	ForwardFlags    []string
	Argv            []string
	Order           []ArgumentSegment
	Mounts          map[string]CommandMountOverride `json:",omitempty"`
}

type CommandMountOverride

type CommandMountOverride struct {
	Writable bool
}

type CommandMountSyntax

type CommandMountSyntax struct {
	Writable any `yaml:"writable"`
}

type CommandRequirement

type CommandRequirement struct {
	Command  string
	Version  string
	Supplier string
}

CommandRequirement is a source-neutral logical executable requirement.

func (CommandRequirement) Validate

func (requirement CommandRequirement) Validate(field string) error

type CommandRequirementSyntax

type CommandRequirementSyntax struct {
	Command  string `yaml:"command"`
	Version  string `yaml:"version"`
	Supplier string `yaml:"supplier"`
}

func (*CommandRequirementSyntax) UnmarshalYAML

func (requirement *CommandRequirementSyntax) UnmarshalYAML(node *yaml.Node) error

type CommandSyntax

type CommandSyntax struct {
	Executable      string                        `yaml:"executable"`
	Trigger         []string                      `yaml:"trigger"`
	NativeCommand   any                           `yaml:"native_command"`
	DeployedCommand any                           `yaml:"deployed_command"`
	ForwardFlags    []string                      `yaml:"forward_flags"`
	Argv            []string                      `yaml:"argv"`
	Order           []string                      `yaml:"order"`
	Mounts          map[string]CommandMountSyntax `yaml:"mounts"`
}

type Compatibility

type Compatibility struct {
	Platforms []Platform `json:"platforms"`
}

Compatibility is the canonical target-platform set declared by a blueprint.

func ParseCompatibility

func ParseCompatibility(values []string) (Compatibility, error)

ParseCompatibility parses, deduplicates, and canonically orders a required blueprint platform set.

type CompatibilitySyntax

type CompatibilitySyntax struct {
	Platforms []string `yaml:"platforms"`
}

type Component

type Component struct {
	Type        ComponentType
	Base        *BaseComponent
	Python      *PythonComponent
	APT         *APTComponent
	Options     map[string]ComponentOption
	Executables map[string]Executable
}

type ComponentOption

type ComponentOption struct {
	Description        string
	PythonRequirements []string
	APTPackages        []APTPackageRequest
}

type ComponentType

type ComponentType string
const (
	ComponentTypeBase   ComponentType = "base"
	ComponentTypePython ComponentType = "python"
	ComponentTypeAPT    ComponentType = "apt"
)

type ConcurrentRunPolicy

type ConcurrentRunPolicy string
const (
	ConcurrentRunAuto ConcurrentRunPolicy = "auto"
	ConcurrentRunYes  ConcurrentRunPolicy = "yes"
	ConcurrentRunNo   ConcurrentRunPolicy = "no"
)

type Docker

type Docker struct {
	Image    string
	Mounts   map[string]DockerMount
	Workload *DockerWorkload
}

type DockerEndpoint

type DockerEndpoint struct {
	Extends  string
	Bind     Bind
	Publish  Publication
	Endpoint Endpoint
}

type DockerEndpointSyntax

type DockerEndpointSyntax struct {
	Extends string            `yaml:"extends"`
	Bind    BindSyntax        `yaml:"bind"`
	Publish PublicationSyntax `yaml:"publish"`
}

type DockerMount

type DockerMount struct {
	Extends  string
	Mode     MountMode
	Source   string
	Name     string
	Contract EnvironmentMount
}

type DockerMountSyntax

type DockerMountSyntax struct {
	Extends string `yaml:"extends"`
	Mode    string `yaml:"mode"`
	Source  string `yaml:"source"`
	Name    string `yaml:"name"`
}

type DockerSyntax

type DockerSyntax struct {
	Mounts   map[string]DockerMountSyntax `yaml:"mounts"`
	Workload *DockerWorkloadSyntax        `yaml:"workload"`
}

type DockerWorkload

type DockerWorkload struct {
	Restart   string
	Endpoints map[string]DockerEndpoint
}

type DockerWorkloadSyntax

type DockerWorkloadSyntax struct {
	Restart   string                          `yaml:"restart"`
	Endpoints map[string]DockerEndpointSyntax `yaml:"endpoints"`
}

type Document

type Document struct {
	Blueprint   Metadata
	Environment Environment
	Docker      Docker
}

Document is the fully resolved schema-1 blueprint consumed by Reploy. Parsing retains lazy expressions separately and produces this typed form only when the values required by the current operation are available.

func DecodeResolvedDocumentV1

func DecodeResolvedDocumentV1(payload ResolvedDocumentV1) (Document, error)

func Resolve

func Resolve(source Syntax) (Document, error)

type Endpoint

type Endpoint struct {
	Scheme    string
	Port      int
	Readiness *Readiness
}

type EndpointSyntax

type EndpointSyntax struct {
	Scheme    string           `yaml:"scheme"`
	Port      any              `yaml:"port"`
	Readiness *ReadinessSyntax `yaml:"readiness"`
}

type Environment

type Environment struct {
	ID            string
	ControlScript string
	Vars          map[string]any
	Base          BaseComponent
	Packages      EnvironmentPackages
	Applications  map[string]Application
	// Components is a derived provider-contribution projection used while the
	// provider internals migrate to first-class contribution identities.
	Components      map[string]Component `json:"-"`
	AllowConcurrent ConcurrentRunPolicy
	Runtime         EnvironmentRuntime
	Terminal        Terminal
	Install         Install
	Mounts          map[string]EnvironmentMount
	Commands        map[string]Command
	Workload        *Workload
}

func (*Environment) RebuildProviderContributions

func (environment *Environment) RebuildProviderContributions() error

func (Environment) ResolveExecutableProfile

func (environment Environment) ResolveExecutableProfile(reference string) (string, Executable, bool)

type EnvironmentMount

type EnvironmentMount struct {
	Target       string
	Writable     bool
	UpdatePolicy UpdatePolicy
}

type EnvironmentPackages

type EnvironmentPackages struct {
	OS []APTPackageRequest
}

type EnvironmentPackagesSyntax

type EnvironmentPackagesSyntax struct {
	OS []APTPackageRequestSyntax `yaml:"os"`
}

func (*EnvironmentPackagesSyntax) UnmarshalYAML

func (packages *EnvironmentPackagesSyntax) UnmarshalYAML(node *yaml.Node) error

type EnvironmentRuntime

type EnvironmentRuntime struct {
	User            string
	Network         RuntimeNetwork
	IdentityMapping *IdentityMappingV1 `json:"IdentityMapping,omitempty"`
	IdentityPolicy  *IdentityPolicyV1  `json:"IdentityPolicy,omitempty"`
}

type EnvironmentRuntimeSyntax

type EnvironmentRuntimeSyntax struct {
	User             string               `yaml:"user"`
	Network          RuntimeNetworkSyntax `yaml:"network"`
	IdentityMapping  *IdentityMappingV1   `yaml:"identity_mapping,omitempty"`
	IdentityPolicy   *IdentityPolicyV1    `yaml:"identity_policy,omitempty"`
	UserFieldPresent bool                 `yaml:"-"`
}

func (*EnvironmentRuntimeSyntax) UnmarshalYAML

func (runtime *EnvironmentRuntimeSyntax) UnmarshalYAML(node *yaml.Node) error

type EnvironmentSyntax

type EnvironmentSyntax struct {
	ID              string                       `yaml:"id"`
	ControlScript   string                       `yaml:"control_script"`
	Vars            map[string]any               `yaml:"vars"`
	Base            BaseSyntax                   `yaml:"base"`
	Packages        EnvironmentPackagesSyntax    `yaml:"packages"`
	Applications    map[string]ApplicationSyntax `yaml:"applications"`
	AllowConcurrent string                       `yaml:"allow_concurrent"`
	Runtime         EnvironmentRuntimeSyntax     `yaml:"runtime"`
	Terminal        TerminalSyntax               `yaml:"terminal"`
	Install         InstallSyntax                `yaml:"install"`
	Mounts          map[string]MountSyntax       `yaml:"mounts"`
	Commands        map[string]CommandSyntax     `yaml:"commands"`
	Workload        *WorkloadSyntax              `yaml:"workload"`
}

type Executable

type Executable struct {
	Source     string
	Binary     string
	Role       string `json:",omitempty"`
	Order      []ArgumentSegment
	ArgvPrefix []string
	ArgvSuffix []string
}

type ExecutableExport

type ExecutableExport struct {
	Executable string
}

ExecutableExport declares one singleton absolute executable candidate.

type ExecutableExportSyntax

type ExecutableExportSyntax struct {
	Executable string `yaml:"executable"`
}

func (*ExecutableExportSyntax) UnmarshalYAML

func (export *ExecutableExportSyntax) UnmarshalYAML(node *yaml.Node) error

type ExecutableSyntax

type ExecutableSyntax struct {
	Source     string   `yaml:"source"`
	Binary     string   `yaml:"binary"`
	Role       string   `yaml:"role"`
	Order      []string `yaml:"order"`
	ArgvPrefix []string `yaml:"argv_prefix"`
	ArgvSuffix []string `yaml:"argv_suffix"`
}

func (*ExecutableSyntax) UnmarshalYAML

func (executable *ExecutableSyntax) UnmarshalYAML(node *yaml.Node) error

type HostOS

type HostOS string
const (
	HostLinux   HostOS = "linux"
	HostMacOS   HostOS = "macos"
	HostWindows HostOS = "windows"
)

type HostPaths

type HostPaths struct {
	Home       string
	UserData   string
	LocalData  string
	SystemData string
}

type IdentityMappingOverrideV1

type IdentityMappingOverrideV1 struct {
	Schema  *int                 `yaml:"schema,omitempty"`
	Profile *MappingScalarV1     `yaml:"profile,omitempty"`
	UIDs    *[]MappingIntervalV1 `yaml:"uids,omitempty"`
	GIDs    *[]MappingIntervalV1 `yaml:"gids,omitempty"`
}

IdentityMappingOverrideV1 is sparse deployment input, never host authority. A supplied array replaces the complete corresponding declaration array.

func (*IdentityMappingOverrideV1) UnmarshalYAML

func (override *IdentityMappingOverrideV1) UnmarshalYAML(node *yaml.Node) error

func (*IdentityMappingOverrideV1) Validate

func (override *IdentityMappingOverrideV1) Validate() error

type IdentityMappingV1

type IdentityMappingV1 struct {
	Schema    int                        `yaml:"schema"`
	Profile   MappingScalarV1            `yaml:"profile"`
	UIDs      []MappingIntervalV1        `yaml:"uids"`
	GIDs      []MappingIntervalV1        `yaml:"gids"`
	Variables map[string]MappingScalarV1 `yaml:"-" json:"Variables,omitempty"`
}

IdentityMappingV1 retains portable intent, not allocation or admission. Variables retain every original blueprint variable's scalar type.

func ResolveIdentityMappingV1

func ResolveIdentityMappingV1(document Document, override *IdentityMappingOverrideV1) (*IdentityMappingV1, error)

ResolveIdentityMappingV1 supplies a pure operation-specific candidate. It grants no reservation or execution admission and leaves portable intent intact.

func (*IdentityMappingV1) UnmarshalYAML

func (mapping *IdentityMappingV1) UnmarshalYAML(node *yaml.Node) error

func (*IdentityMappingV1) WithOverride

func (mapping *IdentityMappingV1) WithOverride(override *IdentityMappingOverrideV1) (*IdentityMappingV1, error)

WithOverride validates portable intent without requiring effective values. It does not modify either input or resolve a leaf that an override replaces.

type IdentityPolicyRoleV1

type IdentityPolicyRoleV1 struct {
	User         string   `json:"user"`
	Capabilities []string `json:"capabilities"`
}

type IdentityPolicyUserV1

type IdentityPolicyUserV1 struct {
	UID                 string   `json:"uid"`
	FullName            *string  `json:"full_name,omitempty"`
	PrimaryGroup        string   `json:"primary_group"`
	SupplementaryGroups []string `json:"supplementary_groups"`
}

type IdentityPolicyV1

type IdentityPolicyV1 struct {
	Schema string                          `json:"schema"`
	Users  map[string]IdentityPolicyUserV1 `json:"users"`
	Groups map[string]string               `json:"groups"`
	Roles  map[string]IdentityPolicyRoleV1 `json:"roles"`
}

IdentityPolicyV1 is portable application intent. It does not admit execution.

func (*IdentityPolicyV1) UnmarshalYAML

func (policy *IdentityPolicyV1) UnmarshalYAML(node *yaml.Node) error

func (*IdentityPolicyV1) Validate

func (policy *IdentityPolicyV1) Validate() error

Validate protects resolution, persisted policy and image-evidence boundaries.

type Install

type Install struct {
	Target       InstallTarget
	System       SystemInstall
	AfterInstall []Step
	Success      InstallSuccess
}

type InstallScope

type InstallScope string
const (
	InstallScopeUser   InstallScope = "user"
	InstallScopeSystem InstallScope = "system"
)

type InstallSuccess

type InstallSuccess struct {
	Lines []string
}

type InstallSuccessSyntax

type InstallSuccessSyntax struct {
	Lines []string `yaml:"lines"`
}

type InstallSyntax

type InstallSyntax struct {
	Target       InstallTargetSyntax  `yaml:"target"`
	System       SystemInstallSyntax  `yaml:"system"`
	AfterInstall []StepSyntax         `yaml:"after_install"`
	Success      InstallSuccessSyntax `yaml:"success"`
}

type InstallTarget

type InstallTarget struct {
	DefaultPath  string
	DefaultPaths map[string]string
}

type InstallTargetContext

type InstallTargetContext struct {
	Host      HostOS
	Scope     InstallScope
	Override  string
	Paths     HostPaths
	Variables map[string]any
}

type InstallTargetSyntax

type InstallTargetSyntax struct {
	DefaultPath  string            `yaml:"default_path"`
	DefaultPaths map[string]string `yaml:"default_paths"`
}

type InterpolationContext

type InterpolationContext struct {
	Variables map[string]any
	Roots     map[string]any
}

func (InterpolationContext) WithReployValue

func (context InterpolationContext) WithReployValue(name string, value any) InterpolationContext

func (InterpolationContext) WithRoot

func (context InterpolationContext) WithRoot(name string, value any) InterpolationContext

type LegacyComponentsRecoveryV1

type LegacyComponentsRecoveryV1 struct {
	Source                string
	Document              Document
	ComponentTypes        map[string]ComponentType
	PreviousEnvironmentID string
}

LegacyComponentsRecoveryV1 is the narrow, explicit conversion result for staging state written by the unreleased components-based blueprint model.

func RecoverLegacyComponentsBlueprintV1

func RecoverLegacyComponentsBlueprintV1(
	source string,
	resolved ResolvedDocumentV1,
) (LegacyComponentsRecoveryV1, error)

RecoverLegacyComponentsBlueprintV1 converts only the unambiguous components-based base/Python development shape. The converted author source is decoded and resolved by the current strict blueprint implementation.

type MappingIntervalV1

type MappingIntervalV1 struct {
	ContainerStart MappingScalarV1 `yaml:"container_start"`
	HostStart      MappingScalarV1 `yaml:"host_start"`
	Count          MappingScalarV1 `yaml:"count"`
}

func (*MappingIntervalV1) UnmarshalYAML

func (interval *MappingIntervalV1) UnmarshalYAML(node *yaml.Node) error

type MappingScalarV1

type MappingScalarV1 struct {
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

MappingScalarV1 preserves source type through resolved blueprint JSON. A float variable whose value is 1 must never become an integer mapping ID.

func (MappingScalarV1) MarshalYAML

func (value MappingScalarV1) MarshalYAML() (any, error)

func (*MappingScalarV1) UnmarshalYAML

func (value *MappingScalarV1) UnmarshalYAML(node *yaml.Node) error

type Metadata

type Metadata struct {
	Schema         int
	Version        string
	RequiresReploy string
	Compatibility  Compatibility
}

type MetadataSyntax

type MetadataSyntax struct {
	Schema         int                 `yaml:"schema"`
	Version        string              `yaml:"version"`
	RequiresReploy string              `yaml:"requires_reploy"`
	Compatibility  CompatibilitySyntax `yaml:"compatibility"`
}

type MountMode

type MountMode string
const (
	MountManagedBind MountMode = "managed-bind"
	MountBind        MountMode = "bind"
	MountVolume      MountMode = "volume"
	MountTmpfs       MountMode = "tmpfs"
)

type MountSyntax

type MountSyntax struct {
	Target       string `yaml:"target"`
	Writable     any    `yaml:"writable"`
	UpdatePolicy string `yaml:"update_policy"`
}

type NetworkAccess

type NetworkAccess string
const (
	NetworkAccessDeny  NetworkAccess = "deny"
	NetworkAccessAllow NetworkAccess = "allow"
)

type Phase

type Phase string
const (
	PhaseStaged    Phase = "staged"
	PhaseInstalled Phase = "installed"
)

type Platform

type Platform struct {
	OS           string `json:"os"`
	Architecture string `json:"architecture"`
	Variant      string `json:"variant"`
	Canonical    string `json:"canonical"`
}

Platform is one parsed OCI os/architecture[/variant] target.

func ParsePlatform

func ParsePlatform(value string) (Platform, error)

ParsePlatform parses one canonical lowercase OCI platform string. Backend support is deliberately checked later, after target selection.

func (Platform) Validate

func (platform Platform) Validate() error

Validate rejects a record whose canonical value was not derived from its parsed fields. This is used again when platform records cross a boundary.

type Publication

type Publication struct {
	Address  string
	Staging  int
	Deployed int
}

type PublicationSyntax

type PublicationSyntax struct {
	Address  string `yaml:"address"`
	Staging  any    `yaml:"staging"`
	Deployed any    `yaml:"deployed"`
}

type PythonComponent

type PythonComponent struct {
	Interpreter  CommandRequirement
	Requirements []string
}

type PythonOptionPackages

type PythonOptionPackages struct {
	Requirements []string
}

type PythonPackagesSyntax

type PythonPackagesSyntax struct {
	Interpreter  *CommandRequirementSyntax `yaml:"interpreter"`
	Requirements []string                  `yaml:"requirements"`
}

func (*PythonPackagesSyntax) UnmarshalYAML

func (packages *PythonPackagesSyntax) UnmarshalYAML(node *yaml.Node) error

type Readiness

type Readiness struct {
	Path      string
	Timeout   time.Duration
	Interval  time.Duration
	TLSVerify bool
}

type ReadinessSyntax

type ReadinessSyntax struct {
	Path      string `yaml:"path"`
	Timeout   string `yaml:"timeout"`
	Interval  string `yaml:"interval"`
	TLSVerify any    `yaml:"tls_verify"`
}

type Requirements

type Requirements struct {
	Endpoints []string
}

type RequirementsSyntax

type RequirementsSyntax struct {
	Endpoints []string `yaml:"endpoints"`
}

type ResolvedDocumentV1

type ResolvedDocumentV1 string

ResolvedDocumentV1 is the complete, self-contained resolved blueprint persisted in deployment state. Its JSON text is kept as one string because canonical-json-v1 deliberately rejects the integer and duration fields in a resolved blueprint.

func EncodeResolvedDocumentV1

func EncodeResolvedDocumentV1(document Document) (ResolvedDocumentV1, error)

type RuntimeEvents

type RuntimeEvents struct {
	BeforeStart []Step
	AfterStart  []Step
	BeforeStop  []Step
	AfterStop   []Step
}

type RuntimeEventsSyntax

type RuntimeEventsSyntax struct {
	BeforeStart []StepSyntax `yaml:"before_start"`
	AfterStart  []StepSyntax `yaml:"after_start"`
	BeforeStop  []StepSyntax `yaml:"before_stop"`
	AfterStop   []StepSyntax `yaml:"after_stop"`
}

type RuntimeNetwork

type RuntimeNetwork struct {
	Public    NetworkAccess
	Local     NetworkAccess
	Ambiguous AmbiguousNetworkAccess
}

type RuntimeNetworkSyntax

type RuntimeNetworkSyntax struct {
	Public    string `yaml:"public"`
	Local     string `yaml:"local"`
	Ambiguous string `yaml:"ambiguous"`
}

func (*RuntimeNetworkSyntax) UnmarshalYAML

func (network *RuntimeNetworkSyntax) UnmarshalYAML(node *yaml.Node) error

type Step

type Step struct {
	Requires Requirements
	Actions  []Action
}

type StepSyntax

type StepSyntax struct {
	Requires RequirementsSyntax `yaml:"requires"`
	Actions  []ActionSyntax     `yaml:"actions"`
}

type Syntax

type Syntax struct {
	Blueprint   MetadataSyntax    `yaml:"blueprint"`
	Environment EnvironmentSyntax `yaml:"environment"`
	Docker      DockerSyntax      `yaml:"docker"`
}

Syntax is the structurally decoded blueprint before interpolation, extends, defaults, and cross-reference resolution.

func Decode

func Decode(data []byte) (Syntax, error)

type SystemAccount

type SystemAccount struct {
	User      string
	Group     string
	OnMissing string
}

type SystemAccountSyntax

type SystemAccountSyntax struct {
	User      string `yaml:"user"`
	Group     string `yaml:"group"`
	OnMissing string `yaml:"on_missing"`
}

type SystemInstall

type SystemInstall struct {
	Account SystemAccount
}

type SystemInstallSyntax

type SystemInstallSyntax struct {
	Account SystemAccountSyntax `yaml:"account"`
}

type Terminal

type Terminal struct {
	ColorEnv string
}

type TerminalSyntax

type TerminalSyntax struct {
	ColorEnv string `yaml:"color_env"`
}

type UpdatePolicy

type UpdatePolicy string
const (
	UpdatePreserve  UpdatePolicy = "preserve"
	UpdateReplace   UpdatePolicy = "replace"
	UpdateUnmanaged UpdatePolicy = "unmanaged"
)

type Workload

type Workload struct {
	Command   string
	Endpoints map[string]Endpoint
	Runtime   RuntimeEvents
}

type WorkloadSyntax

type WorkloadSyntax struct {
	Command   string                    `yaml:"command"`
	Endpoints map[string]EndpointSyntax `yaml:"endpoints"`
	Runtime   RuntimeEventsSyntax       `yaml:"runtime"`
}

Jump to

Keyboard shortcuts

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