artifacts

package
v0.0.0-...-28a9180 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultL1ContractsLocator = &Locator{
	Tag: standard.DefaultL1ContractsTag,
}
View Source
var DefaultL2ContractsLocator = &Locator{
	Tag: standard.DefaultL2ContractsTag,
}
View Source
var ErrUnsupportedArtifactsScheme = errors.New("unsupported artifacts URL scheme")

Functions

func Download

func Download(ctx context.Context, loc *Locator, progressor DownloadProgressor, targetDir string) (foundry.StatDirFs, error)

Types

type CachingDownloader

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

func (*CachingDownloader) Download

func (d *CachingDownloader) Download(ctx context.Context, url string, progress DownloadProgressor, targetDir string) (string, error)

type DownloadProgressor

type DownloadProgressor func(current, total int64)

func BarProgressor

func BarProgressor() DownloadProgressor

func LogProgressor

func LogProgressor(lgr log.Logger) DownloadProgressor

func NoopProgressor

func NoopProgressor() DownloadProgressor

type Downloader

type Downloader interface {
	Download(ctx context.Context, url string, progress DownloadProgressor, targetDir string) (string, error)
}

type Extractor

type Extractor interface {
	Extract(src string, dest string) (string, error)
}

type HTTPDownloader

type HTTPDownloader struct{}

func (*HTTPDownloader) Download

func (d *HTTPDownloader) Download(ctx context.Context, url string, progress DownloadProgressor, targetDir string) (string, error)

type Locator

type Locator struct {
	URL *url.URL
	Tag string
}

func MustNewFileLocator

func MustNewFileLocator(path string) *Locator

func MustNewLocatorFromTag

func MustNewLocatorFromTag(tag string) *Locator

func MustNewLocatorFromURL

func MustNewLocatorFromURL(u string) *Locator

func NewFileLocator

func NewFileLocator(path string) (*Locator, error)

func NewLocatorFromTag

func NewLocatorFromTag(tag string) (*Locator, error)

func NewLocatorFromURL

func NewLocatorFromURL(u string) (*Locator, error)

func (*Locator) Equal

func (a *Locator) Equal(b *Locator) bool

func (*Locator) IsTag

func (a *Locator) IsTag() bool

func (*Locator) MarshalText

func (a *Locator) MarshalText() ([]byte, error)

func (*Locator) UnmarshalText

func (a *Locator) UnmarshalText(text []byte) error

type TarballExtractor

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

func (*TarballExtractor) Extract

func (e *TarballExtractor) Extract(src string, dest string) error

Jump to

Keyboard shortcuts

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