starlark

package
v0.1.0-dev.20260219034427 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package starlark provides the Starlark runtime and host bindings for lore.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillSlot

func FillSlot(node *execution.Node, graph *execution.Graph, slotName string, value starlark.Value) error

FillSlot fills a slot in a node from a Starlark value.

Any slot accepts:

  • A promise (Output): creates an edge, value flows at runtime
  • A gather (Gather): creates edges from all members (parallel execution)
  • An immediate value: stored directly, known at analysis time

func MakeAttr

func MakeAttr(name string, fn BuiltinFunc) starlark.Value

MakeAttr creates a starlark.Builtin from a receiver method.

func NoSuchAttrError

func NoSuchAttrError(receiver, attr string) error

NoSuchAttrError returns an error for an unknown attribute.

Types

type ArchivePlan

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

ArchivePlan implements plan.archive.* bindings using the slot-based model.

func NewArchivePlan

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

NewArchivePlan creates a new ArchivePlan for the given graph and host.

func (*ArchivePlan) Attr

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

Attr implements starlark.HasAttrs.

func (*ArchivePlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type ArchiveReceiver

type ArchiveReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

func NewArchiveReceiver

func NewArchiveReceiver(provider *archive.Provider, output io.Writer) *ArchiveReceiver

func (*ArchiveReceiver) Attr

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

func (*ArchiveReceiver) AttrNames

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

type Bindings

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

Bindings provides lore's host API to Starlark scripts.

func NewBindings

func NewBindings(features []string, settings map[string]string, output io.Writer) *Bindings

NewBindings creates a new Bindings instance.

func (*Bindings) Globals

func (b *Bindings) Globals() starlark.StringDict

Globals returns the predeclared globals for Starlark scripts.

type BuiltinFunc

type BuiltinFunc func(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

BuiltinFunc is the signature for builtin function implementations.

type ContentPlan

type ContentPlan struct {
	Receiver
	// contains filtered or unexported fields
}

ContentPlan implements plan.content.* bindings using the slot-based model.

func NewContentPlan

func NewContentPlan(graph *execution.Graph, h host.Host, project string, reg *execution.ActionRegistry) *ContentPlan

NewContentPlan creates a new ContentPlan for the given graph and host.

func (*ContentPlan) Attr

func (c *ContentPlan) Attr(name string) (starlark.Value, error)

Attr implements starlark.HasAttrs.

func (*ContentPlan) AttrNames

func (c *ContentPlan) AttrNames() []string

AttrNames implements starlark.HasAttrs.

type DockerReceiver

type DockerReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

DockerReceiver provides the docker.* Starlark namespace.

Backing implementation: os/exec (exec.Command("docker", ...)). Uses kwargs pass-through: any keyword argument is converted to a CLI flag.

Example:

docker.run("nginx", detach=True, name="web", publish=["80:80"])
# Executes: docker run --detach --name web --publish 80:80 nginx

func NewDockerReceiver

func NewDockerReceiver(output io.Writer) *DockerReceiver

NewDockerReceiver creates a new docker receiver.

func (*DockerReceiver) Attr

func (d *DockerReceiver) Attr(name string) (starlark.Value, error)

Attr implements starlark.HasAttrs.

func (*DockerReceiver) AttrNames

func (d *DockerReceiver) AttrNames() []string

AttrNames implements starlark.HasAttrs.

type EncryptionPlan

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

EncryptionPlan implements plan.encryption.* bindings using the slot-based model.

func NewEncryptionPlan

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

NewEncryptionPlan creates a new EncryptionPlan for the given graph and host.

func (*EncryptionPlan) Attr

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

Attr implements starlark.HasAttrs.

func (*EncryptionPlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type EnvReceiver

type EnvReceiver struct {
	Receiver
}

EnvReceiver provides the env.* Starlark namespace.

Backing implementation: os package (Getenv, Setenv, ExpandEnv). No backing struct — delegates directly to the standard library.

func NewEnvReceiver

func NewEnvReceiver() *EnvReceiver

NewEnvReceiver creates a new env receiver.

func (*EnvReceiver) Attr

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

Attr implements starlark.HasAttrs.

func (*EnvReceiver) AttrNames

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

AttrNames implements starlark.HasAttrs.

type FilePlan

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

FilePlan implements plan.file.* bindings using the slot-based model. Each method adds a node to the execution graph.

func NewFilePlan

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

NewFilePlan creates a new FilePlan for the given graph and host.

func (*FilePlan) Attr

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

Attr implements starlark.HasAttrs.

func (*FilePlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type FileReceiver

type FileReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

func NewFileReceiver

func NewFileReceiver(provider *file.Provider, output io.Writer) *FileReceiver

func (*FileReceiver) Attr

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

func (*FileReceiver) AttrNames

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

type Gather

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

Gather represents a collection of outputs that can run in parallel. When used as a slot input, it creates edges from ALL members to the consumer, enabling parallel execution of the gathered nodes.

Usage in Starlark:

a = plan.file.copy(src1, dst1)
b = plan.file.copy(src2, dst2)
c = plan.file.copy(src3, dst3)
group = plan.gather(a, b, c)
d = plan.whatever(group)  # d waits for a, b, c (which run in parallel)

func NewGather

func NewGather(graph *execution.Graph, outputs ...*Output) *Gather

NewGather creates a new Gather from multiple outputs.

func (*Gather) FillSlot

func (g *Gather) FillSlot(consumer *execution.Node, slotName string)

FillSlot fills a slot in the consumer node with all gathered promises, creating edges from each member. This enables parallel execution.

func (*Gather) Freeze

func (g *Gather) Freeze()

func (*Gather) Hash

func (g *Gather) Hash() (uint32, error)

func (*Gather) Outputs

func (g *Gather) Outputs() []*Output

Outputs returns the gathered outputs.

func (*Gather) String

func (g *Gather) String() string

Starlark Value interface

func (*Gather) Truth

func (g *Gather) Truth() starlark.Bool

func (*Gather) Type

func (g *Gather) Type() string

type GitPlan

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

GitPlan implements plan.git.* bindings using the slot-based model.

func NewGitPlan

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

NewGitPlan creates a new GitPlan for the given graph and host.

func (*GitPlan) Attr

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

Attr implements starlark.HasAttrs.

func (*GitPlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type GitReceiver

type GitReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

GitReceiver provides the git.* Starlark namespace. Forward operations (clone, checkout, pull) delegate to git.Provider. All other operations use kwargs pass-through via exec.Command("git", ...).

func NewGitReceiver

func NewGitReceiver(provider *git.Provider, output io.Writer) *GitReceiver

NewGitReceiver creates a new git receiver.

func (*GitReceiver) Attr

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

func (*GitReceiver) AttrNames

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

type LogReceiver

type LogReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

LogReceiver provides the log.* Starlark namespace and root-level output functions (note, warn, error, success, fail).

Backing implementation: io.Writer. Bound to root as both the "log" namespace and as individual builtins.

func NewLogReceiver

func NewLogReceiver(output io.Writer) *LogReceiver

NewLogReceiver creates a new log receiver.

func (*LogReceiver) Attr

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

Attr implements starlark.HasAttrs.

func (*LogReceiver) AttrNames

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

AttrNames implements starlark.HasAttrs.

type NetPlan

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

NetPlan implements plan.net.* bindings using the slot-based model.

func NewNetPlan

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

NewNetPlan creates a new NetPlan for the given graph and host.

func (*NetPlan) Attr

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

Attr implements starlark.HasAttrs.

func (*NetPlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type NetReceiver

type NetReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

NetReceiver provides the net.* Starlark namespace. Forward operations (download) delegate to net.Provider. Query operations (get) perform read-only HTTP requests directly.

func NewNetReceiver

func NewNetReceiver(provider *net.Provider, output io.Writer) *NetReceiver

NewNetReceiver creates a new net receiver.

func (*NetReceiver) Attr

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

func (*NetReceiver) AttrNames

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

type NpmReceiver

type NpmReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

NpmReceiver provides the npm.* Starlark namespace.

Backing implementation: os/exec (exec.Command("npm", ...), exec.Command("npx", ...)). Uses kwargs pass-through: any keyword argument is converted to a CLI flag.

Example:

npm.install("astro", "tailwind", global=True, save_dev=True)
# Executes: npm install --global --save-dev astro tailwind

func NewNpmReceiver

func NewNpmReceiver(output io.Writer) *NpmReceiver

NewNpmReceiver creates a new npm receiver.

func (*NpmReceiver) Attr

func (n *NpmReceiver) Attr(name string) (starlark.Value, error)

Attr implements starlark.HasAttrs.

func (*NpmReceiver) AttrNames

func (n *NpmReceiver) AttrNames() []string

AttrNames implements starlark.HasAttrs.

type Output

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

Output represents a promise - a handle to a node's output that can flow through the graph to fill slots in other nodes.

When passed to a plan function's slot, it creates an edge in the graph. The same promise can flow to multiple slots (fan-out).

func NewOutput

func NewOutput(node *execution.Node, graph *execution.Graph, slot string) *Output

NewOutput creates a new Output (promise) representing a node's output.

func ResolveInput

func ResolveInput(value starlark.Value) (*Output, error)

ResolveInput extracts an *Output from a Starlark value. Returns an error if the value is not an Output.

func (*Output) Attr

func (o *Output) Attr(name string) (starlark.Value, error)

Starlark HasAttrs interface

func (*Output) AttrNames

func (o *Output) AttrNames() []string

func (*Output) DependOn

func (o *Output) DependOn(consumer *execution.Node)

DependOn creates an edge making the given node depend on this output's node.

func (*Output) FillSlot

func (o *Output) FillSlot(consumer *execution.Node, slotName string)

FillSlot fills a slot in the consumer node with this promise, creating an edge. This is called when a promise is passed to a plan function.

func (*Output) Freeze

func (o *Output) Freeze()

func (*Output) Graph

func (o *Output) Graph() *execution.Graph

Graph returns the execution graph.

func (*Output) Hash

func (o *Output) Hash() (uint32, error)

func (*Output) Node

func (o *Output) Node() *execution.Node

Node returns the execution node that produces this output.

func (*Output) Path

func (o *Output) Path() string

Path returns a path from the node's slots.

func (*Output) Slot

func (o *Output) Slot() string

Slot returns which output slot this represents.

func (*Output) String

func (o *Output) String() string

Starlark Value interface

func (*Output) Truth

func (o *Output) Truth() starlark.Bool

func (*Output) Type

func (o *Output) Type() 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 second 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 PackagePlan

type PackagePlan struct {
	Receiver
	// contains filtered or unexported fields
}

PackagePlan implements plan.package.* bindings using the slot-based model. Each method adds a node to the execution graph.

Package names may include manager prefixes (brew:pkg, cask:pkg, port:pkg) for platform-specific package manager overrides.

func NewPackagePlan

func NewPackagePlan(graph *execution.Graph, h host.Host, project string, reg *execution.ActionRegistry) *PackagePlan

NewPackagePlan creates a new PackagePlan for the given graph and host.

func (*PackagePlan) Attr

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

Attr implements starlark.HasAttrs.

func (*PackagePlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type PackageQueries

type PackageQueries interface {
	// Installed checks if a package is installed.
	Installed(name string) bool

	// Version returns the installed version of a package, or empty string if not installed.
	Version(name string) string
}

PackageQueries provides read-only package manager queries.

type PackageReceiver

type PackageReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

PackageReceiver provides the package.* Starlark namespace. Forward operations (install, upgrade, remove, update) delegate to pkg.Provider. Query operations (manager, installed, version, feature, setting) use the platform's PackageManager and manifest data directly.

func NewPackageReceiver

func NewPackageReceiver(pm host.PackageManager, features []string, settings map[string]string, output io.Writer) *PackageReceiver

NewPackageReceiver creates a new package receiver.

func (*PackageReceiver) Attr

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

func (*PackageReceiver) AttrNames

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

type PhaseConfig

type PhaseConfig struct {
	// Retry holds the retry policy configured by the script.
	Retry *execution.RetryPolicy
}

PhaseConfig collects phase configuration from Starlark configure() hooks. Passed to configure(phase) as the single argument.

Starlark API:

def configure(phase):
    phase.retry(max_attempts=3, backoff="exponential", initial_delay="1s")

func NewPhaseConfig

func NewPhaseConfig() *PhaseConfig

NewPhaseConfig creates a new PhaseConfig for collecting script configuration.

func (*PhaseConfig) ToStarlark

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

ToStarlark returns a Starlark value exposing phase.retry().

type PlanRoot

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

PlanRoot implements the top-level plan namespace using the slot-based model. It provides access to sub-namespaces (package, file, template, encryption, archive, git, service, shell, net, content) and top-level bindings (source, gather).

func NewPlanRoot

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

NewPlanRoot creates a new PlanRoot for the given graph and host.

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 Receiver

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

Receiver provides common implementations for Starlark binding namespaces. Embed this in concrete types to satisfy starlark.Value. Concrete types must implement starlark.HasAttrs (Attr and AttrNames) themselves.

func NewReceiver

func NewReceiver(name string) Receiver

NewReceiver creates a new Receiver with the given namespace name.

func (Receiver) Freeze

func (r Receiver) Freeze()

Freeze implements starlark.Value.

func (Receiver) Hash

func (r Receiver) Hash() (uint32, error)

Hash implements starlark.Value.

func (Receiver) String

func (r Receiver) String() string

String implements starlark.Value.

func (Receiver) Truth

func (r Receiver) Truth() starlark.Bool

Truth implements starlark.Value.

func (Receiver) Type

func (r Receiver) Type() string

Type implements starlark.Value.

type ServicePlan

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

ServicePlan implements plan.service.* bindings using the slot-based model. Each method adds a service management node to the execution graph.

func NewServicePlan

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

NewServicePlan creates a new ServicePlan for the given graph and host.

func (*ServicePlan) Attr

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

Attr implements starlark.HasAttrs.

func (*ServicePlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type ServiceQueries

type ServiceQueries interface {
	// Exists checks if a service exists.
	Exists(name string) bool

	// Running checks if a service is currently running.
	Running(name string) bool

	// Enabled checks if a service is enabled at boot.
	Enabled(name string) bool
}

ServiceQueries provides read-only service manager queries.

type ServiceReceiver

type ServiceReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

ServiceReceiver provides the service.* Starlark namespace. Forward operations (start, stop, restart, enable, disable) delegate to service.Provider. Query operations (exists, status) use the platform's ServiceManager directly.

func NewServiceReceiver

func NewServiceReceiver(sm host.ServiceManager, output io.Writer) *ServiceReceiver

NewServiceReceiver creates a new service receiver.

func (*ServiceReceiver) Attr

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

func (*ServiceReceiver) AttrNames

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

type ShellPlan

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

ShellPlan implements plan.shell.* bindings using the slot-based model.

func NewShellPlan

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

NewShellPlan creates a new ShellPlan for the given graph and host.

func (*ShellPlan) Attr

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

Attr implements starlark.HasAttrs.

func (*ShellPlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

type ShellReceiver

type ShellReceiver struct {
	Receiver
	// contains filtered or unexported fields
}

ShellReceiver provides the shell.* Starlark namespace. Forward operations (exec, run) delegate to shell.Provider. Query operations (which) use os/exec directly.

func NewShellReceiver

func NewShellReceiver(provider *shell.Provider, output io.Writer) *ShellReceiver

NewShellReceiver creates a new shell receiver.

func (*ShellReceiver) Attr

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

Attr implements starlark.HasAttrs.

func (*ShellReceiver) AttrNames

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

AttrNames implements starlark.HasAttrs.

type SystemBindings

type SystemBindings interface {
	// Platform returns information about the current system.
	Platform() host.Platform

	// Package provides package manager queries.
	Package() PackageQueries

	// Service provides service manager queries.
	Service() ServiceQueries

	// ToStarlark converts the system bindings to a Starlark value.
	ToStarlark() starlark.Value
}

SystemBindings provides read-only queries about the current platform state. Wraps host.Host to expose platform information to phase scripts.

func NewSystemBindings

func NewSystemBindings(h host.Host) SystemBindings

NewSystemBindings creates a new SystemBindings from a host.Host.

type SystemFile

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

SystemFile implements system.file.* bindings for filesystem queries. These are immediate queries - they execute during analysis, not deferred.

func NewSystemFile

func NewSystemFile(h host.Host) *SystemFile

NewSystemFile creates a new SystemFile for the given host.

func (*SystemFile) Attr

func (f *SystemFile) Attr(name string) (starlark.Value, error)

Starlark HasAttrs interface

func (*SystemFile) AttrNames

func (f *SystemFile) AttrNames() []string

func (*SystemFile) Freeze

func (f *SystemFile) Freeze()

func (*SystemFile) Hash

func (f *SystemFile) Hash() (uint32, error)

func (*SystemFile) String

func (f *SystemFile) String() string

Starlark Value interface

func (*SystemFile) Truth

func (f *SystemFile) Truth() starlark.Bool

func (*SystemFile) Type

func (f *SystemFile) Type() string

type SystemGit

type SystemGit struct{}

SystemGit implements system.git.* bindings for git queries. These are immediate queries - they execute during analysis, not deferred.

func NewSystemGit

func NewSystemGit() *SystemGit

NewSystemGit creates a new SystemGit.

func (*SystemGit) Attr

func (g *SystemGit) Attr(name string) (starlark.Value, error)

Starlark HasAttrs interface

func (*SystemGit) AttrNames

func (g *SystemGit) AttrNames() []string

func (*SystemGit) Freeze

func (g *SystemGit) Freeze()

func (*SystemGit) Hash

func (g *SystemGit) Hash() (uint32, error)

func (*SystemGit) String

func (g *SystemGit) String() string

Starlark Value interface

func (*SystemGit) Truth

func (g *SystemGit) Truth() starlark.Bool

func (*SystemGit) Type

func (g *SystemGit) Type() string

type SystemPackage

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

SystemPackage implements system.package.* bindings for package manager queries. These are immediate queries - they execute during analysis, not deferred.

func NewSystemPackage

func NewSystemPackage(pm host.PackageManager) *SystemPackage

NewSystemPackage creates a new SystemPackage for the given package manager.

func (*SystemPackage) Attr

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

Starlark HasAttrs interface

func (*SystemPackage) AttrNames

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

func (*SystemPackage) Freeze

func (p *SystemPackage) Freeze()

func (*SystemPackage) Hash

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

func (*SystemPackage) String

func (p *SystemPackage) String() string

Starlark Value interface

func (*SystemPackage) Truth

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

func (*SystemPackage) Type

func (p *SystemPackage) Type() string

type SystemRoot

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

SystemRoot implements the top-level system namespace using the Attr receiver pattern. It provides access to sub-namespaces (package, service, git, file) and the platform struct.

Unlike plan.*, system.* bindings query current system state immediately rather than building an execution graph.

func NewSystemRoot

func NewSystemRoot(h host.Host) *SystemRoot

NewSystemRoot creates a new SystemRoot for the given host.

func (*SystemRoot) Attr

func (s *SystemRoot) Attr(name string) (starlark.Value, error)

Starlark HasAttrs interface

func (*SystemRoot) AttrNames

func (s *SystemRoot) AttrNames() []string

func (*SystemRoot) Freeze

func (s *SystemRoot) Freeze()

func (*SystemRoot) Hash

func (s *SystemRoot) Hash() (uint32, error)

func (*SystemRoot) String

func (s *SystemRoot) String() string

Starlark Value interface

func (*SystemRoot) Truth

func (s *SystemRoot) Truth() starlark.Bool

func (*SystemRoot) Type

func (s *SystemRoot) Type() string

type SystemService

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

SystemService implements system.service.* bindings for service manager queries. These are immediate queries - they execute during analysis, not deferred.

func NewSystemService

func NewSystemService(sm host.ServiceManager) *SystemService

NewSystemService creates a new SystemService for the given service manager.

func (*SystemService) Attr

func (s *SystemService) Attr(name string) (starlark.Value, error)

Starlark HasAttrs interface

func (*SystemService) AttrNames

func (s *SystemService) AttrNames() []string

func (*SystemService) Freeze

func (s *SystemService) Freeze()

func (*SystemService) Hash

func (s *SystemService) Hash() (uint32, error)

func (*SystemService) String

func (s *SystemService) String() string

Starlark Value interface

func (*SystemService) Truth

func (s *SystemService) Truth() starlark.Bool

func (*SystemService) Type

func (s *SystemService) Type() string

type TemplatePlan

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

TemplatePlan implements plan.template.* bindings using the slot-based model.

func NewTemplatePlan

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

NewTemplatePlan creates a new TemplatePlan for the given graph and host.

func (*TemplatePlan) Attr

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

Attr implements starlark.HasAttrs.

func (*TemplatePlan) AttrNames

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

AttrNames implements starlark.HasAttrs.

Jump to

Keyboard shortcuts

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