Documentation
¶
Overview ¶
Package starlark provides the Starlark scripting runtime for devlore.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArchivePlan ¶
func NewArchivePlan ¶
func NewArchivePlan(graph *op.Graph, h host.Host, project string, reg *op.ActionRegistry) *ArchivePlan
func (*ArchivePlan) AttrNames ¶
func (p *ArchivePlan) AttrNames() []string
type EncryptionPlan ¶
func NewEncryptionPlan ¶
func NewEncryptionPlan(graph *op.Graph, h host.Host, project string, reg *op.ActionRegistry) *EncryptionPlan
func (*EncryptionPlan) AttrNames ¶
func (p *EncryptionPlan) AttrNames() []string
type FilePlan ¶
func NewFilePlan ¶
type GitPlan ¶
func NewGitPlan ¶
type NetPlan ¶
func NewNetPlan ¶
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 *op.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 ¶
func NewPkgPlan ¶
type PlanFactory ¶
type PlanFactory func(graph *op.Graph, h host.Host, project string, reg *op.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 planned_*_gen.go registers via init()).
func NewPlanRoot ¶
NewPlanRoot creates a new PlanRoot for the given graph and host. Sub-namespaces are built dynamically from the plan registry.
type ServicePlan ¶
func NewServicePlan ¶
func NewServicePlan(graph *op.Graph, h host.Host, project string, reg *op.ActionRegistry) *ServicePlan
func (*ServicePlan) AttrNames ¶
func (p *ServicePlan) AttrNames() []string
type ShellPlan ¶
func NewShellPlan ¶
type TemplatePlan ¶
func NewTemplatePlan ¶
func NewTemplatePlan(graph *op.Graph, h host.Host, project string, reg *op.ActionRegistry) *TemplatePlan
func (*TemplatePlan) AttrNames ¶
func (p *TemplatePlan) AttrNames() []string
type UiReceiver ¶
func NewUiReceiver ¶
func NewUiReceiver(provider *ui.Provider) *UiReceiver
func (*UiReceiver) AttrNames ¶
func (r *UiReceiver) AttrNames() []string