db

package
v0.0.0-...-f589a4c Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUpwardPathTraversal = errors.New("upward path traversal")
)

Functions

func ReadArchive

func ReadArchive(r io.Reader, ext string, stripComponents int) (memtar.TarReader, error)

Types

type ArchiveDirective

type ArchiveDirective struct {
	Kind           string // "Archive"
	Source         FileSource
	TargetFilename string
}

type BaseImageDirective

type BaseImageDirective struct {
	Kind      string // "BaseImage"
	ImageName string
}

type BuildContent

type BuildContent interface {
	Build(def *BuildDef) (string, error)
}

type BuildDef

type BuildDef struct {
	Tag string
	// contains filtered or unexported fields
}

func (*BuildDef) Freeze

func (*BuildDef) Freeze()

func (*BuildDef) Hash

func (*BuildDef) Hash() (uint32, error)

func (*BuildDef) Resolve

func (b *BuildDef) Resolve(ctx BuildContent) (starlark.Value, error)

Resolve implements Resolvable.

func (*BuildDef) String

func (*BuildDef) String() string

func (*BuildDef) Truth

func (*BuildDef) Truth() starlark.Bool

func (*BuildDef) Type

func (*BuildDef) Type() string

type BuildResult

type BuildResult interface {
	starlark.Value
	io.WriterTo
}

type BuildScript

type BuildScript struct {
	Name string
	Args []string
}

type Builder

type Builder struct {
	Name PackageName

	Directives []BuilderDirective
}

func NewBuilder

func NewBuilder(name PackageName) *Builder

func (*Builder) Attr

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

Attr implements starlark.HasAttrs.

func (*Builder) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*Builder) Freeze

func (*Builder) Freeze()

func (*Builder) Hash

func (*Builder) Hash() (uint32, error)

func (*Builder) String

func (f *Builder) String() string

func (*Builder) Truth

func (*Builder) Truth() starlark.Bool

func (*Builder) Type

func (*Builder) Type() string

type BuilderDirective

type BuilderDirective interface {
}

type CPUArchitecture

type CPUArchitecture string
const (
	ArchInvalid CPUArchitecture = ""

	// ARM
	ArchArmV7   CPUArchitecture = "armv7"
	ArchArmHF   CPUArchitecture = "armhf"
	ArchAArch64 CPUArchitecture = "aarch64"

	// MIPS
	ArchMips        CPUArchitecture = "mips"
	ArchMipsN32     CPUArchitecture = "mipsn32"
	ArchMipsN32EL   CPUArchitecture = "mipsn32el"
	ArchMipsN32R6   CPUArchitecture = "mipsn32r6"
	ArchMipsN32R6EL CPUArchitecture = "mipsn32r6el"
	ArchMipsR6      CPUArchitecture = "mipsr6"
	ArchMipsR6EL    CPUArchitecture = "mipsr6el"
	ArchMipsEL      CPUArchitecture = "mipsel"
	ArchMips64      CPUArchitecture = "mips64"
	ArchMips64EL    CPUArchitecture = "mips64el"
	ArchMips64R6    CPUArchitecture = "mips64r6"
	ArchMips64R6EL  CPUArchitecture = "mips64r6el"

	// PowerPC
	ArchPowerPC CPUArchitecture = "powerpc"
	ArchPPC64LE CPUArchitecture = "ppc64le" // PPC64 Little Endian
	ArchPPC64EL CPUArchitecture = "ppc64el" // PPC64 Big Endian

	// Risc-V
	ArchRiscV64 CPUArchitecture = "riscv64"

	// s390x
	ArchS390X CPUArchitecture = "s390x"

	// X86
	ArchI386   CPUArchitecture = "i386"
	ArchI586   CPUArchitecture = "i586"
	ArchI686   CPUArchitecture = "i686"
	ArchX32    CPUArchitecture = "x32" // x32 is an ABI for amd64/x86_64 CPUs using 32-bit integers, longs and pointers.
	ArchX86_64 CPUArchitecture = "x86_64"

	ArchAny    CPUArchitecture = "any"
	ArchSource CPUArchitecture = "src"
)

type CommandResult

type CommandResult struct {
	ExitCode int
	Stdout   string
}

func (*CommandResult) SetExitCode

func (res *CommandResult) SetExitCode(code int) CommandResult

type ContentFetcher

type ContentFetcher struct {
	Func *starlark.Function
	Args starlark.Tuple
}

func (*ContentFetcher) Attr

func (fetch *ContentFetcher) Attr(name string) (starlark.Value, error)

Attr implements starlark.HasAttrs.

func (*ContentFetcher) AttrNames

func (fetch *ContentFetcher) AttrNames() []string

AttrNames implements starlark.HasAttrs.

func (*ContentFetcher) Freeze

func (*ContentFetcher) Freeze()

func (*ContentFetcher) GetDefinition

func (fetch *ContentFetcher) GetDefinition(db *PackageDatabase, pkg *Package, url string) *BuildDef

func (*ContentFetcher) Hash

func (*ContentFetcher) Hash() (uint32, error)

func (*ContentFetcher) String

func (*ContentFetcher) String() string

func (*ContentFetcher) Truth

func (*ContentFetcher) Truth() starlark.Bool

func (*ContentFetcher) Type

func (*ContentFetcher) Type() string

type DecompressSource

type DecompressSource struct {
	Kind      string // "Decompress"
	Source    FileSource
	Extension string
}

type DependencyDirective

type DependencyDirective struct {
	Kind string // "Dependency"
	Name PackageName
}

type DownloadSource

type DownloadSource struct {
	Kind   string // "Download"
	Url    string
	Accept string
}

type Downloader

type Downloader struct {
	Name string
	Url  string
}

type ErrPackageNotFound

type ErrPackageNotFound PackageName

func (ErrPackageNotFound) Error

func (e ErrPackageNotFound) Error() string

Error implements error.

type ExtractArchiveSource

type ExtractArchiveSource struct {
	Kind            string // "ExtractArchive"
	Source          FileSource
	Extension       string
	StripComponents int
}

type FetcherStatus

type FetcherStatus struct {
	Key            string
	Name           string
	Status         RepositoryFetcherStatus
	PackageCount   int
	LastUpdated    time.Time
	LastUpdateTime time.Duration
}

type FileIf

type FileIf interface {
	Open() (io.ReadCloser, error)
	Stat() (FileInfo, error)
}

type FileInfo

type FileInfo interface {
	fs.FileInfo
	OwnerGroup() (int, int)
	Linkname() string
}

type FileSource

type FileSource interface{}

type GitRepository

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

func (*GitRepository) Attr

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

Attr implements starlark.HasAttrs.

func (*GitRepository) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*GitRepository) Freeze

func (*GitRepository) Freeze()

func (*GitRepository) Get

func (g *GitRepository) Get(k starlark.Value) (v starlark.Value, found bool, err error)

Get implements starlark.Mapping.

func (*GitRepository) Hash

func (*GitRepository) Hash() (uint32, error)

func (*GitRepository) String

func (*GitRepository) String() string

func (*GitRepository) Truth

func (*GitRepository) Truth() starlark.Bool

func (*GitRepository) Type

func (*GitRepository) Type() string

type GitTree

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

func (*GitTree) Attr

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

Attr implements starlark.HasAttrs.

func (*GitTree) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*GitTree) Freeze

func (*GitTree) Freeze()

func (*GitTree) Get

func (g *GitTree) Get(k starlark.Value) (v starlark.Value, found bool, err error)

Get implements starlark.Mapping.

func (*GitTree) Hash

func (*GitTree) Hash() (uint32, error)

func (*GitTree) Iterate

func (g *GitTree) Iterate() starlark.Iterator

Iterate implements starlark.Iterable.

func (*GitTree) String

func (t *GitTree) String() string

func (*GitTree) Truth

func (*GitTree) Truth() starlark.Bool

func (*GitTree) Type

func (*GitTree) Type() string

type InstallationPlan

type InstallationPlan struct {
	Packages []*Package
	// contains filtered or unexported fields
}

func (*InstallationPlan) Attr

func (plan *InstallationPlan) Attr(name string) (starlark.Value, error)

Attr implements starlark.HasAttrs.

func (*InstallationPlan) AttrNames

func (plan *InstallationPlan) AttrNames() []string

AttrNames implements starlark.HasAttrs.

func (*InstallationPlan) Freeze

func (*InstallationPlan) Freeze()

func (*InstallationPlan) Hash

func (*InstallationPlan) Hash() (uint32, error)

func (*InstallationPlan) String

func (*InstallationPlan) String() string

func (*InstallationPlan) Truth

func (*InstallationPlan) Truth() starlark.Bool

func (*InstallationPlan) Type

func (*InstallationPlan) Type() string

type LocalFileSource

type LocalFileSource struct {
	Kind     string // "LocalFile"
	Filename string
}

type MemoryFile

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

func NewMemoryFile

func NewMemoryFile(contents []byte) *MemoryFile

func (*MemoryFile) IsDir

func (m *MemoryFile) IsDir() bool

IsDir implements fs.FileInfo.

func (*MemoryFile) Linkname

func (m *MemoryFile) Linkname() string

Linkname implements FileInfo.

func (*MemoryFile) ModTime

func (m *MemoryFile) ModTime() time.Time

ModTime implements fs.FileInfo.

func (*MemoryFile) Mode

func (m *MemoryFile) Mode() fs.FileMode

Mode implements fs.FileInfo.

func (*MemoryFile) Name

func (m *MemoryFile) Name() string

Name implements fs.FileInfo.

func (*MemoryFile) Open

func (m *MemoryFile) Open() (io.ReadCloser, error)

Open implements FileIf.

func (*MemoryFile) OwnerGroup

func (m *MemoryFile) OwnerGroup() (int, int)

OwnerGroup implements FileInfo.

func (*MemoryFile) Size

func (m *MemoryFile) Size() int64

Size implements fs.FileInfo.

func (*MemoryFile) Stat

func (m *MemoryFile) Stat() (FileInfo, error)

Stat implements FileIf.

func (*MemoryFile) Sys

func (m *MemoryFile) Sys() any

Sys implements fs.FileInfo.

func (*MemoryFile) WrapStarlark

func (m *MemoryFile) WrapStarlark(name string) starlark.Value

type OutputDirective

type OutputDirective struct {
	Kind             string // "Output"
	Filename         string
	WorkingDirectory string
}

type Package

type Package struct {
	MetadataVersion PackageMetadataVersion
	Name            PackageName
	Description     string
	License         string
	Size            int
	InstalledSize   int
	RawContents     string
	Downloaders     []Downloader
	Metadata        map[string]string
	Depends         [][]PackageName
	Conflicts       [][]PackageName
	Aliases         []PackageName
	BuildScripts    []BuildScript
	Builders        []*Builder
}

func NewPackage

func NewPackage() *Package

func (*Package) Attr

func (pkg *Package) Attr(name string) (starlark.Value, error)

Attr implements starlark.HasAttrs.

func (*Package) AttrNames

func (*Package) AttrNames() []string

AttrNames implements starlark.HasAttrs.

func (*Package) Decode

func (pkg *Package) Decode(r io.Reader) error

func (*Package) Encode

func (pkg *Package) Encode(w io.Writer) error

func (*Package) Freeze

func (*Package) Freeze()

func (*Package) Hash

func (*Package) Hash() (uint32, error)

func (*Package) Id

func (pkg *Package) Id() string

func (*Package) Matches

func (pkg *Package) Matches(query PackageName) bool

func (*Package) String

func (pkg *Package) String() string

func (*Package) Truth

func (*Package) Truth() starlark.Bool

func (*Package) Type

func (*Package) Type() string

type PackageDatabase

type PackageDatabase struct {
	Eif             *core.EnvironmentInterface
	Fetchers        []*RepositoryFetcher
	ScriptFetchers  []*ScriptFetcher
	SearchProviders []*SearchProvider
	ContentFetchers map[string]*ContentFetcher

	AllowLocal      bool
	ForceRefresh    bool
	NoParallel      bool
	PackageBase     string
	EnableDownloads bool
	ScriptMode      bool
	Rebuild         bool
	// contains filtered or unexported fields
}

func (*PackageDatabase) AllNames

func (db *PackageDatabase) AllNames() []PackageName

func (*PackageDatabase) ArchitectureList

func (db *PackageDatabase) ArchitectureList() []string

func (*PackageDatabase) Attr

func (db *PackageDatabase) Attr(name string) (starlark.Value, error)

Attr implements starlark.HasAttrs.

func (*PackageDatabase) AttrNames

func (db *PackageDatabase) AttrNames() []string

AttrNames implements starlark.HasAttrs.

func (*PackageDatabase) Build

func (db *PackageDatabase) Build(def *BuildDef) (string, error)

Build implements BuildContent.

func (*PackageDatabase) Count

func (db *PackageDatabase) Count() int64

func (*PackageDatabase) DistributionList

func (db *PackageDatabase) DistributionList() []string

func (*PackageDatabase) FetchAll

func (db *PackageDatabase) FetchAll() error

func (*PackageDatabase) FetchParallel

func (db *PackageDatabase) FetchParallel(packages []*Package) (memtar.TarReader, error)

func (*PackageDatabase) FetcherStatus

func (db *PackageDatabase) FetcherStatus() ([]FetcherStatus, error)

func (*PackageDatabase) Freeze

func (*PackageDatabase) Freeze()

func (*PackageDatabase) Get

func (db *PackageDatabase) Get(key string) (*Package, bool)

func (*PackageDatabase) GetBuildScript

func (db *PackageDatabase) GetBuildScript(script BuildScript) (starlark.Value, error)

func (*PackageDatabase) GetFetcher

func (db *PackageDatabase) GetFetcher(key string) (*RepositoryFetcher, error)

func (*PackageDatabase) GetPackageContents

func (db *PackageDatabase) GetPackageContents(pkg *Package, downloader Downloader) (memtar.TarReader, error)

func (*PackageDatabase) Hash

func (*PackageDatabase) Hash() (uint32, error)

func (*PackageDatabase) LoadScript

func (db *PackageDatabase) LoadScript(filename string) error

func (*PackageDatabase) MakeIncrementalPlanner

func (db *PackageDatabase) MakeIncrementalPlanner(opts QueryOptions) *InstallationPlan

func (*PackageDatabase) MakeInstallationPlan

func (db *PackageDatabase) MakeInstallationPlan(packages []PackageName, opts QueryOptions) (*InstallationPlan, error)

func (*PackageDatabase) OpenDatabase

func (db *PackageDatabase) OpenDatabase(filename string) (io.Closer, error)

func (*PackageDatabase) RunRepl

func (db *PackageDatabase) RunRepl() error

func (*PackageDatabase) RunScript

func (db *PackageDatabase) RunScript() error

func (*PackageDatabase) Search

func (db *PackageDatabase) Search(query PackageName, opts QueryOptions) ([]*Package, error)

func (*PackageDatabase) StartAutoRefresh

func (db *PackageDatabase) StartAutoRefresh(maxParallelFetchers int, refreshTime time.Duration, forceRefresh bool)

Start a series of go routines to automatically refresh each package fetcher every refreshTime.

func (*PackageDatabase) String

func (*PackageDatabase) String() string

func (*PackageDatabase) TestAllPackages

func (db *PackageDatabase) TestAllPackages() error

func (*PackageDatabase) Truth

func (*PackageDatabase) Truth() starlark.Bool

func (*PackageDatabase) Type

func (*PackageDatabase) Type() string

func (*PackageDatabase) WriteNames

func (db *PackageDatabase) WriteNames(w io.Writer) error

type PackageMetadataVersion

type PackageMetadataVersion int
const (
	PackageMetadataVersionCurrent PackageMetadataVersion = 2
)

type PackageName

type PackageName struct {
	Distribution string
	Name         string
	Version      string
	Architecture string
	Recommended  bool
}

func NewPackageName

func NewPackageName(distribution, name, version, architecture string) (PackageName, error)

func ParsePackageName

func ParsePackageName(s string) (PackageName, error)

func (PackageName) Attr

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

Attr implements starlark.HasAttrs.

func (PackageName) AttrNames

func (name PackageName) AttrNames() []string

AttrNames implements starlark.HasAttrs.

func (PackageName) Freeze

func (PackageName) Freeze()

func (PackageName) Hash

func (PackageName) Hash() (uint32, error)

func (PackageName) Matches

func (name PackageName) Matches(query PackageName) bool

func (PackageName) Path

func (name PackageName) Path() []string

func (PackageName) ShortName

func (name PackageName) ShortName() string

func (PackageName) String

func (name PackageName) String() string

func (PackageName) Truth

func (PackageName) Truth() starlark.Bool

func (PackageName) Type

func (PackageName) Type() string

func (PackageName) UrlParams

func (name PackageName) UrlParams() string

type QueryOptions

type QueryOptions struct {
	ExcludeRecommends  bool
	MaxResults         int
	PreferArchitecture string
}

type RepositoryFetcher

type RepositoryFetcher struct {
	Packages []*Package

	Distributions map[string]bool
	Architectures map[string]bool
	Distro        string
	Func          *starlark.Function
	Args          starlark.Tuple
	Status        RepositoryFetcherStatus

	LastUpdateTime time.Duration
	LastUpdated    time.Time
	Messages       []logMessage
	Counter        core.Counter
	// contains filtered or unexported fields
}

func (*RepositoryFetcher) Attr

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

Attr implements starlark.HasAttrs.

func (*RepositoryFetcher) AttrNames

func (*RepositoryFetcher) AttrNames() []string

AttrNames implements starlark.HasAttrs.

func (*RepositoryFetcher) Count

func (r *RepositoryFetcher) Count(message string)

Count implements core.Logger.

func (*RepositoryFetcher) Freeze

func (*RepositoryFetcher) Freeze()

func (*RepositoryFetcher) Hash

func (*RepositoryFetcher) Hash() (uint32, error)

func (*RepositoryFetcher) Key

func (r *RepositoryFetcher) Key() string

func (*RepositoryFetcher) Log

func (r *RepositoryFetcher) Log(message string)

Log implements Logger.

func (*RepositoryFetcher) Matches

func (r *RepositoryFetcher) Matches(query PackageName) bool

func (*RepositoryFetcher) String

func (fetcher *RepositoryFetcher) String() string

func (*RepositoryFetcher) Truth

func (*RepositoryFetcher) Truth() starlark.Bool

func (*RepositoryFetcher) Type

func (*RepositoryFetcher) Type() string

type RepositoryFetcherStatus

type RepositoryFetcherStatus int
const (
	RepositoryFetcherStatusNotLoaded RepositoryFetcherStatus = iota
	RepositoryFetcherStatusLoading
	RepositoryFetcherStatusLoaded
	RepositoryFetcherStatusError
)

func (RepositoryFetcherStatus) String

func (status RepositoryFetcherStatus) String() string

type Resolvable

type Resolvable interface {
	Resolve(ctx BuildContent) (starlark.Value, error)
}

type ScriptDirective

type ScriptDirective struct {
	Kind             string // "Script"
	Contents         string
	WorkingDirectory string
}

type ScriptFetcher

type ScriptFetcher struct {
	Name string
	Func *starlark.Function
	Args starlark.Tuple
	// contains filtered or unexported fields
}

func (*ScriptFetcher) Attr

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

Attr implements starlark.HasAttrs.

func (*ScriptFetcher) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*ScriptFetcher) Freeze

func (*ScriptFetcher) Freeze()

func (*ScriptFetcher) Hash

func (*ScriptFetcher) Hash() (uint32, error)

func (*ScriptFetcher) String

func (*ScriptFetcher) String() string

func (*ScriptFetcher) Truth

func (*ScriptFetcher) Truth() starlark.Bool

func (*ScriptFetcher) Type

func (*ScriptFetcher) Type() string

type ScriptFile

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

func (*ScriptFile) Freeze

func (*ScriptFile) Freeze()

func (*ScriptFile) Hash

func (*ScriptFile) Hash() (uint32, error)

func (*ScriptFile) String

func (*ScriptFile) String() string

func (*ScriptFile) Truth

func (*ScriptFile) Truth() starlark.Bool

func (*ScriptFile) Type

func (*ScriptFile) Type() string

type SearchProvider

type SearchProvider struct {
	Distribution string
	Func         *starlark.Function
	Args         starlark.Tuple

	Packages []*Package
	// contains filtered or unexported fields
}

func (*SearchProvider) Attr

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

Attr implements starlark.HasAttrs.

func (*SearchProvider) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*SearchProvider) Freeze

func (*SearchProvider) Freeze()

func (*SearchProvider) Hash

func (*SearchProvider) Hash() (uint32, error)

func (*SearchProvider) Search

func (s *SearchProvider) Search(name PackageName, maxResults int) ([]*Package, error)

func (*SearchProvider) String

func (*SearchProvider) String() string

func (*SearchProvider) Truth

func (*SearchProvider) Truth() starlark.Bool

func (*SearchProvider) Type

func (*SearchProvider) Type() string

type ShellContext

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

func (*ShellContext) Abspath

func (*ShellContext) Abspath(p string) (string, error)

Abspath implements kati.EnvironmentInterface.

func (*ShellContext) Attr

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

Attr implements starlark.HasAttrs.

func (*ShellContext) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*ShellContext) Create

func (p *ShellContext) Create(filename string) (kati.File, error)

Create implements kati.EnvironmentInterface.

func (*ShellContext) Environ

func (p *ShellContext) Environ() []string
func (*ShellContext) EvalSymlinks(p string) (string, error)

EvalSymlinks implements kati.EnvironmentInterface.

func (*ShellContext) Exec

func (p *ShellContext) Exec(args []string) ([]byte, error)

Exec implements kati.EnvironmentInterface.

func (*ShellContext) Freeze

func (*ShellContext) Freeze()

func (*ShellContext) Get

func (p *ShellContext) Get(k starlark.Value) (v starlark.Value, found bool, err error)

Get implements starlark.HasSetKey.

func (*ShellContext) Hash

func (*ShellContext) Hash() (uint32, error)

func (*ShellContext) Lstat

func (p *ShellContext) Lstat(filename string) (fs.FileInfo, error)

Lstat implements kati.EnvironmentInterface.

func (*ShellContext) NumCPU

func (p *ShellContext) NumCPU() int

NumCPU implements kati.EnvironmentInterface.

func (*ShellContext) Open

func (p *ShellContext) Open(filename string) (kati.File, error)

Open implements kati.EnvironmentInterface.

func (*ShellContext) ReadFile

func (p *ShellContext) ReadFile(filename string) ([]byte, error)

ReadFile implements kati.EnvironmentInterface.

func (*ShellContext) Remove

func (p *ShellContext) Remove(filename string) error

Remove implements kati.EnvironmentInterface.

func (*ShellContext) SetKey

func (p *ShellContext) SetKey(k starlark.Value, v starlark.Value) error

SetKey implements starlark.HasSetKey.

func (*ShellContext) Setenv

func (p *ShellContext) Setenv(key string, value string)

Setenv implements kati.EnvironmentInterface.

func (*ShellContext) Stat

func (p *ShellContext) Stat(filename string) (fs.FileInfo, error)

Stat implements kati.EnvironmentInterface.

func (*ShellContext) String

func (t *ShellContext) String() string

func (*ShellContext) Truth

func (*ShellContext) Truth() starlark.Bool

func (*ShellContext) Type

func (*ShellContext) Type() string

func (*ShellContext) Unsetenv

func (p *ShellContext) Unsetenv(key string)

Unsetenv implements kati.EnvironmentInterface.

type StarArchive

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

func (*StarArchive) Entries

func (ar *StarArchive) Entries() []memtar.Entry

Entries implements memtar.TarReader.

func (*StarArchive) Freeze

func (*StarArchive) Freeze()

func (*StarArchive) Get

func (ar *StarArchive) Get(k starlark.Value) (v starlark.Value, found bool, err error)

Get implements starlark.Mapping.

func (*StarArchive) Hash

func (*StarArchive) Hash() (uint32, error)

func (*StarArchive) Iterate

func (ar *StarArchive) Iterate() starlark.Iterator

Iterate implements starlark.Iterable.

func (*StarArchive) String

func (f *StarArchive) String() string

func (*StarArchive) Truth

func (*StarArchive) Truth() starlark.Bool

func (*StarArchive) Type

func (*StarArchive) Type() string

type StarArchiveIterator

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

func (*StarArchiveIterator) Done

func (it *StarArchiveIterator) Done()

Done implements starlark.Iterator.

func (*StarArchiveIterator) Next

func (it *StarArchiveIterator) Next(p *starlark.Value) bool

Next implements starlark.Iterator.

type StarDirectory

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

func (*StarDirectory) Attr

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

Attr implements starlark.HasAttrs.

func (*StarDirectory) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*StarDirectory) Binary

Binary implements starlark.HasBinary.

func (*StarDirectory) Freeze

func (*StarDirectory) Freeze()

func (*StarDirectory) Get

func (f *StarDirectory) Get(k starlark.Value) (v starlark.Value, found bool, err error)

Get implements starlark.Mapping.

func (*StarDirectory) Hash

func (*StarDirectory) Hash() (uint32, error)

func (*StarDirectory) IsDir

func (f *StarDirectory) IsDir() bool

IsDir implements fs.FileInfo.

func (*StarDirectory) Items

func (f *StarDirectory) Items() []starlark.Tuple

Items implements starlark.IterableMapping.

func (*StarDirectory) Iterate

func (f *StarDirectory) Iterate() starlark.Iterator

Iterate implements starlark.IterableMapping.

func (*StarDirectory) Linkname

func (f *StarDirectory) Linkname() string

Linkname implements FileInfo.

func (*StarDirectory) MergeWith

func (f *StarDirectory) MergeWith(other *StarDirectory) (*StarDirectory, error)

func (*StarDirectory) ModTime

func (f *StarDirectory) ModTime() time.Time

ModTime implements fs.FileInfo.

func (*StarDirectory) Mode

func (f *StarDirectory) Mode() fs.FileMode

Mode implements fs.FileInfo.

func (*StarDirectory) Name

func (f *StarDirectory) Name() string

Name implements StarFileIf.

func (*StarDirectory) Open

func (f *StarDirectory) Open() (io.ReadCloser, error)

Open implements StarFileIf.

func (*StarDirectory) OwnerGroup

func (f *StarDirectory) OwnerGroup() (int, int)

OwnerGroup implements FileInfo.

func (*StarDirectory) SetKey

func (f *StarDirectory) SetKey(k starlark.Value, v starlark.Value) error

SetKey implements starlark.HasSetKey.

func (*StarDirectory) SetName

func (f *StarDirectory) SetName(name string) (StarFileIf, error)

SetName implements StarFileIf.

func (*StarDirectory) Size

func (f *StarDirectory) Size() int64

Size implements fs.FileInfo.

func (*StarDirectory) Source

func (f *StarDirectory) Source() FileSource

Source implements StarFileIf.

func (*StarDirectory) Stat

func (f *StarDirectory) Stat() (FileInfo, error)

Stat implements StarFileIf.

func (*StarDirectory) String

func (f *StarDirectory) String() string

func (*StarDirectory) Sys

func (f *StarDirectory) Sys() any

Sys implements fs.FileInfo.

func (*StarDirectory) Truth

func (*StarDirectory) Truth() starlark.Bool

func (*StarDirectory) Type

func (*StarDirectory) Type() string

func (*StarDirectory) WriteTar

func (f *StarDirectory) WriteTar(w *tar.Writer) (int64, error)

type StarFile

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

func NewFile

func NewFile(
	source FileSource,
	name string,
	opener func() (io.ReadCloser, error),
	stat func() (FileInfo, error),
) *StarFile

func (*StarFile) Attr

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

Attr implements starlark.HasAttrs.

func (*StarFile) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*StarFile) Freeze

func (*StarFile) Freeze()

func (*StarFile) Hash

func (*StarFile) Hash() (uint32, error)

func (*StarFile) Name

func (f *StarFile) Name() string

Name implements StarFileIf.

func (*StarFile) Open

func (f *StarFile) Open() (io.ReadCloser, error)

Open implements StarFileIf.

func (*StarFile) SetName

func (f *StarFile) SetName(name string) (StarFileIf, error)

SetName implements StarFileIf.

func (*StarFile) Source

func (f *StarFile) Source() FileSource

Source implements StarFileIf.

func (*StarFile) Stat

func (f *StarFile) Stat() (FileInfo, error)

Stat implements StarFileIf.

func (*StarFile) String

func (f *StarFile) String() string

func (*StarFile) Truth

func (*StarFile) Truth() starlark.Bool

func (*StarFile) Type

func (*StarFile) Type() string

type StarFileIf

type StarFileIf interface {
	starlark.Value
	FileIf
	Source() FileSource
	Name() string
	SetName(name string) (StarFileIf, error)
}

type StarMutex

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

func (*StarMutex) Attr

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

Attr implements starlark.HasAttrs.

func (*StarMutex) AttrNames

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

AttrNames implements starlark.HasAttrs.

func (*StarMutex) Freeze

func (*StarMutex) Freeze()

func (*StarMutex) Hash

func (*StarMutex) Hash() (uint32, error)

func (*StarMutex) String

func (*StarMutex) String() string

func (*StarMutex) Truth

func (*StarMutex) Truth() starlark.Bool

func (*StarMutex) Type

func (*StarMutex) Type() string

Jump to

Keyboard shortcuts

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