provider

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTitleNotFound = errors.New("title not found")
	ErrURLNotFound   = errors.New("URL not found")
)

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Name() string
	Host() string
	GetTitle(url string) (string, error)
	GetURL(title string) (string, error)
}

func NewAppleProvider

func NewAppleProvider(ctx context.Context) Provider

func NewMockProvider

func NewMockProvider() Provider

func NewSpotifyProvider added in v1.0.0

func NewSpotifyProvider(ctx context.Context, cid, csecret string) Provider

func NewYandexProvider

func NewYandexProvider(ctx context.Context) Provider

func NewYoutubeProvider

func NewYoutubeProvider(ctx context.Context) Provider

type YandexClient added in v1.0.0

type YandexClient interface {
	GetTrack(id int) (string, error)
	Search(title string) (string, error)
}

Jump to

Keyboard shortcuts

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