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 ¶
DownloadWASM mocks base method.
func (*MockWASMDownloader) EXPECT ¶
func (m *MockWASMDownloader) EXPECT() *MockWASMDownloaderMockRecorder
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 ¶
func (mr *MockWASMDownloaderMockRecorder) Close() *gomock.Call
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 ¶
func (m *MocktorrentClient) EXPECT() *MocktorrentClientMockRecorder
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 ¶
func (mr *MocktorrentClientMockRecorder) Close() *gomock.Call
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 ¶
func (m *MocktorrentInfo) EXPECT() *MocktorrentInfoMockRecorder
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 ¶
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.