interpreter

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 27 Imported by: ? 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

Overview

Package interpreter implements the execution of raspberry-box box files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCPClientConfProxy

type DHCPClientConfProxy struct {
	Conf *net.DHCPClientConf
}

DHCPClientConfProxy proxies access to DHCPClientConf structure.

func (*DHCPClientConfProxy) Attr

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

Attr implements starlark.Value.

func (*DHCPClientConfProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*DHCPClientConfProxy) Freeze

func (p *DHCPClientConfProxy) Freeze()

Freeze implements starlark.Value.

func (*DHCPClientConfProxy) Hash

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

Hash implements starlark.Value.

func (*DHCPClientConfProxy) SetField

func (p *DHCPClientConfProxy) SetField(name string, val starlark.Value) error

SetField implements starlark.HasSetField.

func (*DHCPClientConfProxy) String

func (p *DHCPClientConfProxy) String() string

func (*DHCPClientConfProxy) Truth

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

Truth implements starlark.Value.

func (*DHCPClientConfProxy) Type

func (p *DHCPClientConfProxy) Type() string

Type implements starlark.Value.

type DHCPProfileProxy

type DHCPProfileProxy struct {
	Kind    string
	Profile *net.DHCPClientProfile
}

DHCPProfileProxy proxies access to DHCP profile structure.

func (*DHCPProfileProxy) Attr

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

Attr implements starlark.Value.

func (*DHCPProfileProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*DHCPProfileProxy) Freeze

func (p *DHCPProfileProxy) Freeze()

Freeze implements starlark.Value.

func (*DHCPProfileProxy) Hash

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

Hash implements starlark.Value.

func (*DHCPProfileProxy) SetField

func (p *DHCPProfileProxy) SetField(name string, val starlark.Value) error

SetField implements starlark.HasSetField.

func (*DHCPProfileProxy) String

func (p *DHCPProfileProxy) String() string

func (*DHCPProfileProxy) Truth

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

Truth implements starlark.Value.

func (*DHCPProfileProxy) Type

func (p *DHCPProfileProxy) Type() string

Type implements starlark.Value.

type FS

type FS interface {
	Close() error
	Cat(path string) ([]byte, error)
	Stat(path string) (os.FileInfo, error)
	LStat(path string) (os.FileInfo, error)
	Symlink(at, to string) error
	Mkdir(at string) error
	Write(path string, data []byte, perms os.FileMode) error
	Remove(path string) error
	RemoveAll(path string) error
	Chmod(path string, mode os.FileMode) error
	Chown(path string, uid, gid int) error
	CopyInto(sysPath, path string) error
	Mountpoint() string
}

FS describes an interface to the filesystem.

type FSMountProxy

type FSMountProxy struct {
	Kind string
	Path string
	// contains filtered or unexported fields
}

FSMountProxy proxies access to a mounted filesystem.

func (*FSMountProxy) Attr

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

Attr implements starlark.Value.

func (*FSMountProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*FSMountProxy) Close

func (p *FSMountProxy) Close() error

Close implements io.Closer.

func (*FSMountProxy) Freeze

func (p *FSMountProxy) Freeze()

Freeze implements starlark.Value.

func (*FSMountProxy) Hash

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

Hash implements starlark.Value.

func (*FSMountProxy) String

func (p *FSMountProxy) String() string

func (*FSMountProxy) Truth

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

Truth implements starlark.Value.

func (*FSMountProxy) Type

func (p *FSMountProxy) Type() string

Type implements starlark.Value.

type Script

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

Script represents a raspberry-box script.

func NewScript

func NewScript(data []byte, fname string, verbose bool, loader ScriptLoader, args []string) (*Script, error)

NewScript initializes a new raspberry-box script environment.

func (*Script) Build

func (s *Script) Build() error

Build calls the build() method in the script.

func (*Script) CallFn

func (s *Script) CallFn(fname string) (string, error)

CallFn calls an arbitrary function

func (*Script) Close

func (s *Script) Close() error

Close shuts down all resources associated with the script.

func (*Script) Setup

func (s *Script) Setup(templatePath string) error

Setup calls the setup() method in the script.

type ScriptLoader

type ScriptLoader interface {
	// contains filtered or unexported methods
}

ScriptLoader provides a means for arbitrary imports to be resolved.

type SystemdConditionProxy

type SystemdConditionProxy struct {
	Kind string
	Arg  string
}

SystemdConditionProxy proxies access to a condition structure.

func (*SystemdConditionProxy) Attr

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

Attr implements starlark.Value.

func (*SystemdConditionProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*SystemdConditionProxy) Freeze

func (p *SystemdConditionProxy) Freeze()

Freeze implements starlark.Value.

func (*SystemdConditionProxy) Hash

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

Hash implements starlark.Value.

func (*SystemdConditionProxy) String

func (p *SystemdConditionProxy) String() string

func (*SystemdConditionProxy) Truth

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

Truth implements starlark.Value.

func (*SystemdConditionProxy) Type

func (p *SystemdConditionProxy) Type() string

Type implements starlark.Value.

type SystemdMountProxy

type SystemdMountProxy struct {
	Conf *sysd.Mount
}

SystemdMountProxy proxies access to a mount structure.

func (*SystemdMountProxy) Attr

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

Attr implements starlark.Value.

func (*SystemdMountProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*SystemdMountProxy) Freeze

func (p *SystemdMountProxy) Freeze()

Freeze implements starlark.Value.

func (*SystemdMountProxy) Hash

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

Hash implements starlark.Value.

func (*SystemdMountProxy) SetField

func (p *SystemdMountProxy) SetField(name string, val starlark.Value) error

SetField implements starlark.HasSetField.

func (*SystemdMountProxy) String

func (p *SystemdMountProxy) String() string

func (*SystemdMountProxy) Truth

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

Truth implements starlark.Value.

func (*SystemdMountProxy) Type

func (p *SystemdMountProxy) Type() string

Type implements starlark.Value.

type SystemdServiceProxy

type SystemdServiceProxy struct {
	Unit    *sysd.Unit
	Service *sysd.Service
}

SystemdServiceProxy proxies access to a service structure.

func (*SystemdServiceProxy) Attr

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

Attr implements starlark.Value.

func (*SystemdServiceProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*SystemdServiceProxy) Freeze

func (p *SystemdServiceProxy) Freeze()

Freeze implements starlark.Value.

func (*SystemdServiceProxy) Hash

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

Hash implements starlark.Value.

func (*SystemdServiceProxy) SetField

func (p *SystemdServiceProxy) SetField(name string, val starlark.Value) error

SetField implements starlark.HasSetField.

func (*SystemdServiceProxy) String

func (p *SystemdServiceProxy) String() string

func (*SystemdServiceProxy) Truth

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

Truth implements starlark.Value.

func (*SystemdServiceProxy) Type

func (p *SystemdServiceProxy) Type() string

Type implements starlark.Value.

type SystemdUnitProxy

type SystemdUnitProxy struct {
	Unit *sysd.Unit
	// contains filtered or unexported fields
}

SystemdUnitProxy proxies access to a unit structure.

func (*SystemdUnitProxy) Attr

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

Attr implements starlark.Value.

func (*SystemdUnitProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*SystemdUnitProxy) Freeze

func (p *SystemdUnitProxy) Freeze()

Freeze implements starlark.Value.

func (*SystemdUnitProxy) Hash

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

Hash implements starlark.Value.

func (*SystemdUnitProxy) SetField

func (p *SystemdUnitProxy) SetField(name string, val starlark.Value) error

SetField implements starlark.HasSetField.

func (*SystemdUnitProxy) String

func (p *SystemdUnitProxy) String() string

func (*SystemdUnitProxy) Truth

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

Truth implements starlark.Value.

func (*SystemdUnitProxy) Type

func (p *SystemdUnitProxy) Type() string

Type implements starlark.Value.

type WDLoader

type WDLoader struct{}

WDLoader loads scripts relative to the working directory.

type WifiConfigurationProxy

type WifiConfigurationProxy struct {
	Conf *net.WPASupplicantConfig
}

WifiConfigurationProxy proxies a net.WPASupplicantConfig structure.

func (*WifiConfigurationProxy) Attr

Attr implements starlark.Value.

func (*WifiConfigurationProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*WifiConfigurationProxy) Freeze

func (p *WifiConfigurationProxy) Freeze()

Freeze implements starlark.Value.

func (*WifiConfigurationProxy) Hash

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

Hash implements starlark.Value.

func (*WifiConfigurationProxy) SetField

func (p *WifiConfigurationProxy) SetField(name string, val starlark.Value) error

SetField implements starlark.HasSetField.

func (*WifiConfigurationProxy) String

func (p *WifiConfigurationProxy) String() string

func (*WifiConfigurationProxy) Truth

Truth implements starlark.Value.

func (*WifiConfigurationProxy) Type

func (p *WifiConfigurationProxy) Type() string

Type implements starlark.Value.

type WifiNetworkProxy

type WifiNetworkProxy struct {
	Conf *net.WPASupplicantNetwork
}

WifiNetworkProxy proxies access to a net.WPASupplicantNetwork structure.

func (*WifiNetworkProxy) Attr

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

Attr implements starlark.Value.

func (*WifiNetworkProxy) AttrNames

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

AttrNames implements starlark.Value.

func (*WifiNetworkProxy) Freeze

func (p *WifiNetworkProxy) Freeze()

Freeze implements starlark.Value.

func (*WifiNetworkProxy) Hash

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

Hash implements starlark.Value.

func (*WifiNetworkProxy) SetField

func (p *WifiNetworkProxy) SetField(name string, val starlark.Value) error

SetField implements starlark.HasSetField.

func (*WifiNetworkProxy) String

func (p *WifiNetworkProxy) String() string

func (*WifiNetworkProxy) Truth

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

Truth implements starlark.Value.

func (*WifiNetworkProxy) Type

func (p *WifiNetworkProxy) Type() string

Type implements starlark.Value.

Directories

Path Synopsis
Package lib contains libraries written in starlark.
Package lib contains libraries written in starlark.

Jump to

Keyboard shortcuts

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