mock

package
v1.34.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexerApiClient

type IndexerApiClient interface {
	GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error)
	TestAPI(ctx context.Context) (bool, error)
}

func NewMockClient

func NewMockClient(url string, apiKey string) IndexerApiClient

type IndexerClient

type IndexerClient struct {
	URL    string
	APIKey string
}

func (*IndexerClient) GetTorrentByID

func (c *IndexerClient) GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error)

func (*IndexerClient) TestAPI

func (c *IndexerClient) TestAPI(ctx context.Context) (bool, error)

TestAPI try api access against torrents page

Jump to

Keyboard shortcuts

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