source

package
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFileRef

func IsFileRef(source *Source) bool

func IsOciRef

func IsOciRef(source *Source) bool

func IsWebRef

func IsWebRef(source *Source) bool

Types

type Backend

type Backend struct {
	Cache              cache.Cache
	CacheType          cache.CacheType
	CacheConfiguration CacheConfiguration
}

func NewBackend

func NewBackend(cacheType cache.CacheType, cacheConfiguration CacheConfiguration) (*Backend, error)

func (*Backend) HandleCache

func (b *Backend) HandleCache(source *Source, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error

func (*Backend) InitCache

func (b *Backend) InitCache() (err error)

type CacheConfiguration

type CacheConfiguration map[string]string

type Downloader

type Downloader interface {
	Get(source *Source, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error
}

func NewBackendFromScheme

func NewBackendFromScheme(url *Source, cacheType cache.CacheType, cacheConfiguration CacheConfiguration) (Downloader, error)

type FileBackend

type FileBackend struct {
	Backend
}

func NewFileDownloader

func NewFileDownloader(cacheType cache.CacheType, cacheConfiguration CacheConfiguration) (*FileBackend, error)

func (*FileBackend) Get

func (d *FileBackend) Get(source *Source, p tui.ProgressReader, callback func(reader io.ReadCloser) error) (err error)

type OciBackend

type OciBackend struct {
	Backend
}

func NewOciDownloader

func NewOciDownloader(cacheType cache.CacheType, cacheConfiguration CacheConfiguration) (*OciBackend, error)

func (*OciBackend) Get

func (d *OciBackend) Get(source *Source, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error

func (*OciBackend) GetFileCache

func (d *OciBackend) GetFileCache(source *Source, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error

func (*OciBackend) GetFromRegistry

func (d *OciBackend) GetFromRegistry(source *Source, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error

type Source

type Source struct {
	Url string
}

type WebBackend

type WebBackend struct {
	Backend
}

func NewWebDownloader

func NewWebDownloader(cacheType cache.CacheType, cacheConfiguration CacheConfiguration) (*WebBackend, error)

func (*WebBackend) Get

func (d *WebBackend) Get(source *Source, p tui.ProgressReader, callback func(reader io.ReadCloser) error) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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