localdir

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFilesystem

func FromFilesystem(dir From, attributes schema.LayerAttributes) (v1.Layer, error)

func Layer

func Layer(filemap map[string][]byte, attributes schema.LayerAttributes) (v1.Layer, error)

Layer creates a layer from a single file map. These layers are reproducible and consistent. A filemap is a path -> file content map representing a file system.

Types

type From added in v0.5.2

type From struct {
	Path          string
	ContainerPath PathMapper
	Ignore        *patternmatcher.PatternMatcher
	MaxFiles      int
	MaxSize       int
	// contains filtered or unexported fields
}

func NewDir added in v0.5.2

func NewDir() From

func NewFile added in v0.5.2

func NewFile() From

type PathMapper

type PathMapper func(string) string

func NewPathMapperAsIs

func NewPathMapperAsIs() PathMapper

func NewPathMapperPrepend

func NewPathMapperPrepend(prependDir string) PathMapper

type SingleFileFS added in v0.5.2

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

func NewSingleFileFS added in v0.5.2

func NewSingleFileFS(filePath string) *SingleFileFS

func (SingleFileFS) Open added in v0.5.2

func (sfs SingleFileFS) Open(name string) (fs.File, error)

func (SingleFileFS) ReadFile added in v0.5.2

func (sfs SingleFileFS) ReadFile(name string) ([]byte, error)

Jump to

Keyboard shortcuts

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