starlark

package
v0.1.0-dev.20260127201926 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 11 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

This section is empty.

Types

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.

func (*Bindings) UpdateFeatures

func (b *Bindings) UpdateFeatures(features []string)

UpdateFeatures allows changing features after creation.

func (*Bindings) UpdateSettings

func (b *Bindings) UpdateSettings(settings map[string]string)

UpdateSettings allows changing settings after creation.

type DockerBindings

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

DockerBindings provides the docker.* API to Starlark scripts.

Uses kwargs pass-through: any keyword argument is converted to a CLI flag. This means all docker flags work automatically without explicit binding code.

Example:

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

func NewDockerBindings

func NewDockerBindings(b *Bindings) *DockerBindings

NewDockerBindings creates docker bindings attached to the parent bindings.

func (*DockerBindings) Struct

func (d *DockerBindings) Struct() *starlarkstruct.Struct

Struct returns the docker.* namespace for Starlark.

type GitBindings

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

GitBindings provides the git.* API to Starlark scripts.

Uses kwargs pass-through: any keyword argument is converted to a CLI flag. This means all git flags work automatically without explicit binding code.

Example:

git.clone("https://github.com/user/repo", depth=1, branch="main")
# Executes: git clone --depth 1 --branch main https://github.com/user/repo

func NewGitBindings

func NewGitBindings(b *Bindings) *GitBindings

NewGitBindings creates git bindings attached to the parent bindings.

func (*GitBindings) Struct

func (g *GitBindings) Struct() *starlarkstruct.Struct

Struct returns the git.* namespace for Starlark.

type NpmBindings

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

NpmBindings provides the npm.* API to Starlark scripts.

Uses kwargs pass-through: any keyword argument is converted to a CLI flag. This means all npm flags work automatically without explicit binding code.

Example:

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

func NewNpmBindings

func NewNpmBindings(b *Bindings) *NpmBindings

NewNpmBindings creates npm bindings attached to the parent bindings.

func (*NpmBindings) Struct

func (n *NpmBindings) Struct() *starlarkstruct.Struct

Struct returns the npm.* namespace for Starlark.

Jump to

Keyboard shortcuts

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