mock

package
v1.54.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 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(apiKey string, opts ...OptFunc) IndexerApiClient

type IndexerClient

type IndexerClient struct {
	APIKey string
	// contains filtered or unexported fields
}

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

type OptFunc added in v1.35.0

type OptFunc func(client *IndexerClient)

func WithUrl added in v1.35.0

func WithUrl(url string) OptFunc

Jump to

Keyboard shortcuts

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