slicer

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDebug

func SetDebug(debug bool)

Enable the delivery of debug messages to the logger. Only meaningful if a logger is also set.

func SetLogger

func SetLogger(logger log_Logger)

Specify the *log.Logger object where log messages should be sent to.

Types

type Report added in v0.9.1

type Report struct {
	// Root is the filesystem path where the all reported content is based.
	Root string
	// Entries holds all reported content, indexed by their path.
	Entries map[string]ReportEntry
}

Report holds the information about files and directories created when slicing packages.

func NewReport added in v0.9.1

func NewReport(root string) (*Report, error)

NewReport returns an empty report for content that will be based at the provided root path.

func Run

func Run(options *RunOptions) (*Report, error)

func (*Report) Add added in v0.9.1

func (r *Report) Add(slice *setup.Slice, fsEntry *fsutil.Entry) error

func (*Report) Mutate added in v0.10.0

func (r *Report) Mutate(fsEntry *fsutil.Entry) error

Mutate updates the FinalHash and Size of an existing path entry.

type ReportEntry added in v0.9.1

type ReportEntry struct {
	Path      string
	Mode      fs.FileMode
	Hash      string
	Size      int
	Slices    map[*setup.Slice]bool
	Link      string
	FinalHash string
}

type RunOptions

type RunOptions struct {
	Selection *setup.Selection
	Archives  map[string]archive.Archive
	TargetDir string
}

Jump to

Keyboard shortcuts

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