slicer

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: AGPL-3.0 Imports: 15 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

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

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
}

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