starlark

package
v0.1.0-dev.20260222205529 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

FillSlot delegates to projection.FillSlot. The code generator (star devlore actions generate) emits unqualified FillSlot calls in plan_*_gen.go files via the planFillSlots template function. This alias bridges the generator output to the canonical implementation in pkg/projection.

Functions

func PlanNames

func PlanNames() []string

PlanNames returns sorted namespace names from the registry.

Types

type ArchivePlan

type ArchivePlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewArchivePlan

func NewArchivePlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *ArchivePlan

func (*ArchivePlan) Attr

func (p *ArchivePlan) Attr(name string) (starlark.Value, error)

func (*ArchivePlan) AttrNames

func (p *ArchivePlan) AttrNames() []string

type EncryptionPlan

type EncryptionPlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewEncryptionPlan

func NewEncryptionPlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *EncryptionPlan

func (*EncryptionPlan) Attr

func (p *EncryptionPlan) Attr(name string) (starlark.Value, error)

func (*EncryptionPlan) AttrNames

func (p *EncryptionPlan) AttrNames() []string

type FilePlan

type FilePlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewFilePlan

func NewFilePlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *FilePlan

func (*FilePlan) Attr

func (p *FilePlan) Attr(name string) (starlark.Value, error)

func (*FilePlan) AttrNames

func (p *FilePlan) AttrNames() []string

type GitPlan

type GitPlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewGitPlan

func NewGitPlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *GitPlan

func (*GitPlan) Attr

func (p *GitPlan) Attr(name string) (starlark.Value, error)

func (*GitPlan) AttrNames

func (p *GitPlan) AttrNames() []string

type NetPlan

type NetPlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewNetPlan

func NewNetPlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *NetPlan

func (*NetPlan) Attr

func (p *NetPlan) Attr(name string) (starlark.Value, error)

func (*NetPlan) AttrNames

func (p *NetPlan) AttrNames() []string

type PackageContext

type PackageContext struct {
	// Name is the package name being deployed.
	Name string

	// Version is the version being deployed.
	Version string

	// Features are the enabled feature flags for this deployment.
	Features []string

	// Settings are key-value configuration settings.
	Settings map[string]string

	// DryRun indicates this is a preview (no actual changes).
	DryRun bool

	// SourceRoot is the package source directory in the registry cache.
	SourceRoot string

	// TargetRoot is the deployment target directory (usually $HOME).
	TargetRoot string
}

PackageContext provides information about the package being deployed. Passed to phase scripts as the first argument.

func (*PackageContext) HasFeature

func (p *PackageContext) HasFeature(name string) bool

HasFeature checks if a feature is enabled.

func (*PackageContext) Setting

func (p *PackageContext) Setting(key string) string

Setting returns a setting value, or empty string if not set.

func (*PackageContext) ToStarlark

func (p *PackageContext) ToStarlark() starlark.Value

ToStarlark converts the PackageContext to a Starlark receiver.

type PhaseContext

type PhaseContext struct {
	// PhaseName is the lifecycle phase (e.g., "install", "provision").
	PhaseName string

	// Action is the lifecycle action (e.g., "deploy", "remove").
	Action string

	// Retry holds the retry policy configured by the script.
	Retry *projection.RetryPolicy
}

PhaseContext provides phase metadata to lifecycle scripts. Passed as the second call argument: def install(package, phase):

Starlark API:

phase.name         # Phase name (e.g., "install", "provision")
phase.action       # Lifecycle action (e.g., "deploy", "remove")
phase.retry(max_attempts=3, backoff="exponential")

func (*PhaseContext) ToStarlark

func (c *PhaseContext) ToStarlark() starlark.Value

ToStarlark returns a Starlark value exposing phase.name, phase.action, phase.retry().

type PkgPlan

type PkgPlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewPkgPlan

func NewPkgPlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *PkgPlan

func (*PkgPlan) Attr

func (p *PkgPlan) Attr(name string) (starlark.Value, error)

func (*PkgPlan) AttrNames

func (p *PkgPlan) AttrNames() []string

type PlanFactory

type PlanFactory func(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) starlark.Value

PlanFactory creates a plan sub-namespace for the given graph context.

type PlanRoot

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

PlanRoot implements the top-level plan namespace using the slot-based model. Sub-namespaces are dynamically populated from the plan registry (each plan_*_gen.go registers via init()).

func NewPlanRoot

func NewPlanRoot(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *PlanRoot

NewPlanRoot creates a new PlanRoot for the given graph and host. Sub-namespaces are built dynamically from the plan registry.

func (*PlanRoot) Attr

func (p *PlanRoot) Attr(name string) (starlark.Value, error)

Starlark HasAttrs interface

func (*PlanRoot) AttrNames

func (p *PlanRoot) AttrNames() []string

func (*PlanRoot) Freeze

func (p *PlanRoot) Freeze()

func (*PlanRoot) Hash

func (p *PlanRoot) Hash() (uint32, error)

func (*PlanRoot) String

func (p *PlanRoot) String() string

Starlark Value interface

func (*PlanRoot) Truth

func (p *PlanRoot) Truth() starlark.Bool

func (*PlanRoot) Type

func (p *PlanRoot) Type() string

type ServicePlan

type ServicePlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewServicePlan

func NewServicePlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *ServicePlan

func (*ServicePlan) Attr

func (p *ServicePlan) Attr(name string) (starlark.Value, error)

func (*ServicePlan) AttrNames

func (p *ServicePlan) AttrNames() []string

type ShellPlan

type ShellPlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewShellPlan

func NewShellPlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *ShellPlan

func (*ShellPlan) Attr

func (p *ShellPlan) Attr(name string) (starlark.Value, error)

func (*ShellPlan) AttrNames

func (p *ShellPlan) AttrNames() []string

type TemplatePlan

type TemplatePlan struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewTemplatePlan

func NewTemplatePlan(graph *projection.Graph, h host.Host, project string, reg *execution.ActionRegistry) *TemplatePlan

func (*TemplatePlan) Attr

func (p *TemplatePlan) Attr(name string) (starlark.Value, error)

func (*TemplatePlan) AttrNames

func (p *TemplatePlan) AttrNames() []string

type UiReceiver

type UiReceiver struct {
	projection.Receiver
	// contains filtered or unexported fields
}

func NewUiReceiver

func NewUiReceiver(provider *ui.Provider) *UiReceiver

func (*UiReceiver) Attr

func (r *UiReceiver) Attr(name string) (starlark.Value, error)

func (*UiReceiver) AttrNames

func (r *UiReceiver) AttrNames() []string

Jump to

Keyboard shortcuts

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