downloader

package
v0.0.0-...-121e250 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Overview

Package downloader provides a WASM downloader that can download the WASM file from a given URL. The downloader supports both HTTPS URLs and magnet links.

Package downloader is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockWASMDownloader

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

MockWASMDownloader is a mock of WASMDownloader interface.

func NewMockWASMDownloader

func NewMockWASMDownloader(ctrl *gomock.Controller) *MockWASMDownloader

NewMockWASMDownloader creates a new mock instance.

func (*MockWASMDownloader) Close

func (m *MockWASMDownloader) Close() error

Close mocks base method.

func (*MockWASMDownloader) DownloadWASM

func (m *MockWASMDownloader) DownloadWASM(arg0 context.Context, arg1 io.Writer) error

DownloadWASM mocks base method.

func (*MockWASMDownloader) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockWASMDownloaderMockRecorder

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

MockWASMDownloaderMockRecorder is the mock recorder for MockWASMDownloader.

func (*MockWASMDownloaderMockRecorder) Close

Close indicates an expected call of Close.

func (*MockWASMDownloaderMockRecorder) DownloadWASM

func (mr *MockWASMDownloaderMockRecorder) DownloadWASM(arg0, arg1 any) *gomock.Call

DownloadWASM indicates an expected call of DownloadWASM.

type MocktorrentClient

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

MocktorrentClient is a mock of torrentClient interface.

func NewMocktorrentClient

func NewMocktorrentClient(ctrl *gomock.Controller) *MocktorrentClient

NewMocktorrentClient creates a new mock instance.

func (*MocktorrentClient) AddMagnet

func (m *MocktorrentClient) AddMagnet(arg0 string) (torrentInfo, error)

AddMagnet mocks base method.

func (*MocktorrentClient) Close

func (m *MocktorrentClient) Close() []error

Close mocks base method.

func (*MocktorrentClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MocktorrentClientMockRecorder

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

MocktorrentClientMockRecorder is the mock recorder for MocktorrentClient.

func (*MocktorrentClientMockRecorder) AddMagnet

func (mr *MocktorrentClientMockRecorder) AddMagnet(arg0 any) *gomock.Call

AddMagnet indicates an expected call of AddMagnet.

func (*MocktorrentClientMockRecorder) Close

Close indicates an expected call of Close.

type MocktorrentInfo

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

MocktorrentInfo is a mock of torrentInfo interface.

func NewMocktorrentInfo

func NewMocktorrentInfo(ctrl *gomock.Controller) *MocktorrentInfo

NewMocktorrentInfo creates a new mock instance.

func (*MocktorrentInfo) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MocktorrentInfo) GotInfo

func (m *MocktorrentInfo) GotInfo() events.Done

GotInfo mocks base method.

func (*MocktorrentInfo) NewReader

func (m *MocktorrentInfo) NewReader() torrent.Reader

NewReader mocks base method.

type MocktorrentInfoMockRecorder

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

MocktorrentInfoMockRecorder is the mock recorder for MocktorrentInfo.

func (*MocktorrentInfoMockRecorder) GotInfo

func (mr *MocktorrentInfoMockRecorder) GotInfo() *gomock.Call

GotInfo indicates an expected call of GotInfo.

func (*MocktorrentInfoMockRecorder) NewReader

func (mr *MocktorrentInfoMockRecorder) NewReader() *gomock.Call

NewReader indicates an expected call of NewReader.

type WASMDownloader

type WASMDownloader interface {
	DownloadWASM(context.Context, io.Writer) error
	Close() error
}

WASMDownloader is an interface that defines the methods that a WASM downloader

func NewWASMDownloader

func NewWASMDownloader(urls []string, httpClient *http.Client) (WASMDownloader, error)

NewWaterWASMDownloader creates a new WASMDownloader instance.

Jump to

Keyboard shortcuts

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