archive

package
v0.6.19 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExtractFailed = errors.New("extract failed")

Functions

func Extract

func Extract[T Archive](ctx context.Context, a artifact.Local[T], out string) error

Given a downloaded 'Archive', extract the contents and return a local 'Artifact' pointing to it.

func WithProgress

func WithProgress(ctx context.Context, p *progress.Progress) context.Context

WithProgress creates a sub-context with an associated progress reporter. The result can be passed to the extract function(s) in this package to get updates on extraction progress.

Types

type Archivable

type Archivable interface {
	artifact.Artifact

	Archivable()
}

An interface representing an 'Artifact' that can be compressed into an archive.

type Archive

type Archive interface {
	artifact.Artifact
	// contains filtered or unexported methods
}

An interface representing a compressed 'Artifact' archive.

type Local

type Local = artifact.Local[Archive]

An alias for a locally-available 'Archive'.

type TarXZ

type TarXZ[T Archivable] struct {
	Inner T
}

A struct representing an 'XZ'-compressed archive.

func (TarXZ[T]) Artifact

func (a TarXZ[T]) Artifact()

Artifact "registers" 'TarXZ' as a Godot release artifact.

func (TarXZ[T]) Name

func (a TarXZ[T]) Name() string

func (TarXZ[T]) Version added in v0.6.0

func (a TarXZ[T]) Version() version.Version

type Zip

type Zip[T Archivable] struct {
	Inner T
}

A struct representing a 'zip'-compressed archive.

func (Zip[T]) Artifact

func (a Zip[T]) Artifact()

Artifact "registers" 'Zip' as a Godot release artifact.

func (Zip[T]) Name

func (a Zip[T]) Name() string

func (Zip[T]) Version added in v0.6.0

func (a Zip[T]) Version() version.Version

Jump to

Keyboard shortcuts

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