Documentation
¶
Index ¶
Constants ¶
const ( LibraryName = "scriptling.provision.file" LibraryDesc = "File provisioning utilities for creating and updating files with correct permissions and owners" )
const ( StatusCreated = "created" StatusUpdated = "updated" StatusUnchanged = "unchanged" StatusRemoved = "removed" StatusAbsent = "absent" StatusExists = "exists" )
Variables ¶
This section is empty.
Functions ¶
func RegisterConfigured ¶ added in v0.27.0
func RegisterConfigured(registrar interface{ RegisterLibrary(*object.Library) }, paths fssecurity.Config, opts ...Option)
RegisterConfigured registers the library with a filesystem allow-path policy. It threads the same fssecurity.Config used by os/pathlib/shutil/zipfile so that scriptling.provision.file obeys --allowed-paths. Pass fssecurity.Config{} for no restriction.
A fresh library is built on every call, so each registrar gets exactly the policy it passed — safe for an embedder that registers this library against interpreters with different per-request/per-tenant configs, not just a single process-wide policy set once at startup.
Types ¶
type Option ¶ added in v0.37.0
type Option func(*libraryInstance)
Option configures the library.
func WithBecome ¶ added in v0.37.0
WithBecome lets scripts run the library's operations as root with become=True, through b. Without it, become=True fails unless the process is already root.