archive

package
v0.1.0-dev.20260218175020 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *execution.ActionRegistry)

Register registers all archive actions with the given registry.

Types

type Extract

type Extract struct{ Impl *Provider }

Extract extracts an archive to a target directory.

func (*Extract) Do

func (*Extract) Name

func (o *Extract) Name() string

func (*Extract) Undo

func (o *Extract) Undo(_ *execution.Context, _ map[string]any, state execution.UndoState) error

type Provider

type Provider struct{}

Provider provides archive extraction operations.

Compensable Forward methods return (map[string]any, error). The map is the compensation receipt — opaque to the executor, meaningful only to the corresponding Compensate* Backward method.

func (*Provider) CompensateExtract

func (p *Provider) CompensateExtract(state map[string]any) error

CompensateExtract removes files created during extraction, then cleans up empty directories under dest.

func (*Provider) Extract

func (p *Provider) Extract(source, prefix string) (map[string]any, error)

Extract extracts an archive (tar.gz or zip) from source into the prefix directory. The archive format is detected from the file extension. Returns compensation state with the list of created files.

Jump to

Keyboard shortcuts

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