plugins

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedProtocol = errors.New("unsupported protocol")
)

Functions

This section is empty.

Types

type Downloader

type Downloader interface {
	Download(ctx context.Context, target string, src *url.URL) error
}

type FileDownloader

type FileDownloader struct{}

func (FileDownloader) Download

func (f FileDownloader) Download(_ context.Context, target string, src *url.URL) error

type GenericDownloader

type GenericDownloader map[string]Downloader

func (GenericDownloader) Download

func (g GenericDownloader) Download(ctx context.Context, target string, src *url.URL) error

type HTTPDownloader

type HTTPDownloader struct {
	Client *http.Client
}

func (HTTPDownloader) Download

func (h HTTPDownloader) Download(ctx context.Context, target string, src *url.URL) (err error)

type Manager

type Manager struct {
	Downloader Downloader
	// contains filtered or unexported fields
}

func (*Manager) Init

func (p *Manager) Init(plugins state.Plugins, cacheDir string)

func (*Manager) Register

func (p *Manager) Register(ctx context.Context, registry *modules.TypeRegistry) error

func (*Manager) UpdatePlugins

func (p *Manager) UpdatePlugins(ctx context.Context, refs ...config.PluginReference) error

Jump to

Keyboard shortcuts

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